mov
a,10h
; setup delay time
call delays
;(8)
; call delays subroutine
mov
a,00000011b
; move acc=00000011,
; (BUSY=0, ACK=0, OE=1, WR=1)
mov
pc,a
; output acc to port C
mov
a,7
; setup delay time
call
delays
; call delays subroutine
mov
a,00000111b
; move acc=00000111,
; (BUSY=0, ACK=1, OE=1, WR=1)
mov
pc,a
; output acc to port C
mov
a,5
; setup delay time
call
delays
; call delays subroutine
mov
a,00000011b
; move acc=00000011,
; (BUSY=0, ACK=0, OE=1, WR=1)
mov
pc,a
;(9)
; output acc to port C
mov
a,5
; setup delay time
call
delays
; call delays subroutine
clr
tmr
; clear timer
set
tmrc.4
;(10)
; setup timer control reg. start
; counting
mov
a,00001011b
; move acc=00001011,
; (BUSY=1, ACK=0, OE=1, WR=1)
mov
pc,a
;(11)
; output acc to port C
clr
acc
; clear acc
store1:
; store1
snz acc.0
;(4)
;
check
if
acc.0=“0”
.if
external
;
INT
;
interrupt,
will
change
acc.0=“1”
jmp
store1
;
if
“0”
jump
storel
clr
tmrc.4
; set timer control reg. stop
; counting
snz
acc.3
;(12)
; check acc.3=1 (acc.3=“1” timer
; time-out , acc.3=“0” external INT)
jmp
next
; if not 1 jump next
jmp
top
; acc.3=1 jump top
delays proc
; delay subroutine
d1:
; d1
sdz
acc
;
jmp
d1
;
ret
;
delays endp
;
end
;
Program description
The program begins (1) by setting up the interrupt control. The external
interrupt and timer/counter are enabled and the timer/counter is setup to
be an internal type. Section (2) sets Port A and B to be inputs and Port C to
Chapter 17 Parallel Port
223
Содержание 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 ...