Texas Instruments MSP50C614 User Manual
Page 363
Implementation Details
5-63
Code Development Tools
DATA
_cprte
;–––––––––––––––––––––––––––––––––––––––––––––––––––––
;–––––––––––––––––––––––––––––––––––––––––––––––––––––
; called from C––
; void wait(int msec)
; waits for the amount of msec passed
; Calls: wait1ms
;–––––––––––––––––––––––––––––––––––––––––––––––––––––
_wait
mov a0, *r7 – 2
shlac a0, a0
mov *tempa, a0
mov r4, *tempa
_rep call
wait1ms
;wait 1ms
jrnzp
_rep,r4––
;decrement counter by 2
ret
;–––––––––––––––––––––––––––––––––––––––––––––––––––––
;****************************************************************
; Pause for 1ms
;
; Input
; Output
; Uses
; Calls
wait200us
;****************************************************************
wait1ms
call
wait200us
call
wait200us
call
wait200us
call
wait200us
call
wait200us
ret
;****************************************************************
; Pause for 200us
;
; Input
; Output
; Uses
;****************************************************************
wait200us
rpt
256–2
nop
rpt
256–2
nop
rpt
256–2
nop
rpt
256–2
nop
rpt
256–2
nop
rpt
256–2
nop
rpt
64–2