PropBasic - how to use WAITCNT
camelot2
Posts: 54
hi, I am still a newbie to PropBasic and have a problem
trying to use the command WAITCNT. What I want to do is
use WAITCNT to make the program execution wait for 80nS
in several locations of the program as in the following.
Could someone please lead me to an example and/or some
clues as how to do this. thanks for your help - Dave
DEVICE P8X32A, XTAL1, PLL16X
XIN 6_250_000
value VAR LONG(150)
target VAR LONG
delta VAR LONG
PROGRAM Start
value(1) = ina
waitcnt target,delta 'wait for 80nS
value(2) = ina
waitcnt target,delta 'wait for 80nS
'
'
value(149) = ina
waitcnt target,delta 'wait for 80nS
value(150) = ina
waitcnt target,delta 'wait for 80nS
END
trying to use the command WAITCNT. What I want to do is
use WAITCNT to make the program execution wait for 80nS
in several locations of the program as in the following.
Could someone please lead me to an example and/or some
clues as how to do this. thanks for your help - Dave
DEVICE P8X32A, XTAL1, PLL16X
XIN 6_250_000
value VAR LONG(150)
target VAR LONG
delta VAR LONG
PROGRAM Start
value(1) = ina
waitcnt target,delta 'wait for 80nS
value(2) = ina
waitcnt target,delta 'wait for 80nS
'
'
value(149) = ina
waitcnt target,delta 'wait for 80nS
value(150) = ina
waitcnt target,delta 'wait for 80nS
END
Comments
Bean
is the minimum wait and how do I code it ?thanks again - Dave