The program has to follow the parallel port conventions and timing dia-
gram. For this reason the timing specification of the PC printer port can be
consulted to achieve the correct operation.
Program
#include
ht48300.inc
;------------------------------------------------------------
data
.section
’data’
; data section
addrl
db ?
; low byte address register
addrh
db ?
; high byte address register
timer_ov
db ?
; timer overflow register
;------------------------------------------------------------
; PC0
WR
;
PC1
OE
;
PC2
ACK
;
PC3
BUSY
;------------------------------------------------------------
code
.section
at 0 ’code’
; program section
org
00h
; ISR address setup
jmp
start
org
04h
; external INT ISR
jmp
int_sub
;
org
08h
; timer ISR
jmp
timer_sub
;
org
0Ch
int_sub:
;
mov
a,00000011b
; move acc=00000011,
; (BUSY=0, ACK=0, OE=1, WR=1)
mov
pc,a
;(5)
; output acc to port c
reti
; return from external ISR
timer_sub:
;
inc
timer_ov
; increment timer overflow register
mov
a,timer_ov
;
Chapter 17 Parallel Port
221
Содержание HT-IDE
Страница 11: ...P a r t I Integrated Development Environment Part I Integrated Development Environment 1 ...
Страница 12: ...HT IDE User s Guide 2 ...
Страница 20: ...Fig 1 6 Fig 1 7 HT IDE User s Guide 10 ...
Страница 24: ...HT IDE User s Guide 14 ...
Страница 70: ...HT IDE User s Guide 60 ...
Страница 76: ...HT IDE User s Guide 66 ...
Страница 92: ...HT IDE User s Guide 82 ...
Страница 93: ...P a r t I I Development Language and Tools Part II Development Language and Tools 83 ...
Страница 94: ...HT IDE User s Guide 84 ...
Страница 148: ...HT IDE User s Guide 138 ...
Страница 150: ...Fig 12 1 Fig 12 2 HT IDE User s Guide 140 ...
Страница 154: ...HT IDE User s Guide 144 ...
Страница 192: ...HT IDE User s Guide 182 ...
Страница 194: ...HT IDE User s Guide 184 ...
Страница 218: ...HT IDE User s Guide 208 ...
Страница 235: ...P a r t V Appendix Part V Appendix 225 ...
Страница 236: ...HT IDE User s Guide 226 ...
Страница 250: ...HT IDE User s Guide 240 ...