Beginner PASM ?
AGCB
Posts: 327
What causes this? This is a slight modification of the PM PASM Blink program.
When loaded it does not start to alternately toggle till about 45 seconds later, then works correctly. Why the long initial delay?
Thanks
Aaron
When loaded it does not start to alternately toggle till about 45 seconds later, then works correctly. Why the long initial delay?
Thanks
Aaron
CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 PUB main cognew(@toggle, 0) DAT org 0 toggle mov dira, pin mov time, cnt add time, #9 mov outa, out 'start w/ 17 on, 16 off :loop waitcnt time, delay xor outa, pin jmp #:loop '----------------------- pin long %11_0000_0000_0000_0000 'pins 16 & 17 out long %10_0000_0000_0000_0000 ' starting outa value delay long 10_000_000 time res 1
Comments
And what is happening in the 45 seconds? edit: I assume the cnt register is counting up ang rolling over to get back to the original value when time was set
Correct and that happens to take about 53sec @80MHz.
Is there a different way of adding a short delay that avoids this?
Aaron