Intel 80C188EC User Manual page 286

Hide thumbs Also See for 80C188EC:
Table of Contents

Advertisement

_CMPB
equ word ptr[bp+6]
push
ax
push
dx
mov
dx, T1CNT
xor
ax, ax
out
dx, al
mov
dx, T1CMPA
mov
ax, 1
out
dx, al
mov
dx, T1CMPB
mov
ax, _CMPB
out
dx, al
mov
dx, T1CON
mov
ax, C002H
out
dx, al
CountDown:
in ax, dx
test
ax, MaxCount
jz
CountDown
and
ax, not MaxCount
out
dx, al
pop
dx
pop
ax
pop
bp
ret
_one_shot
endp
lib_80186
ends
end
Example 9-3. Configuring a Digital One-Shot (Continued)
;get parameter off the stack
;save registers that will be
;modified
;Clear Timer 1 Counter
;set time before t_shot to 0
;set pulse time
;start Timer 1
;read in T1CON
;max count occurred?
;no: then wait
;clear max count bit
;update T1CON
;restore saved registers
;restore caller's bp
TIMER/COUNTER UNIT
9-23

Advertisement

Table of Contents
loading

This manual is also suitable for:

80c186ec

Table of Contents