I created a speed test program that acts as a crude SW PWM running on the 18X. I had expected this to run so fast I couldn't see the LED blinking.
However this program is running at about 10 cycles per second. I had played with the debugger earlier and thought perhaps it was still on, but I have not figured out why it is running so slowly.
The program is below. The LED attached to output 2 blinks at about 10 Hz. I had expected it to fade on then reset to off and cycle again. Is this the speed I should expect or have I configured something wrong?
The PWM period is 256 cycles thru main.
Thanks,
-- Dan
symbol mark = b0
symbol i = b1
symbol space = b2
main:
inc mark
space = 255 - mark
high 2
for i = 0 to mark
next i
low 2
for i = 0 to space
next i
goto main
However this program is running at about 10 cycles per second. I had played with the debugger earlier and thought perhaps it was still on, but I have not figured out why it is running so slowly.
The program is below. The LED attached to output 2 blinks at about 10 Hz. I had expected it to fade on then reset to off and cycle again. Is this the speed I should expect or have I configured something wrong?
The PWM period is 256 cycles thru main.
Thanks,
-- Dan
symbol mark = b0
symbol i = b1
symbol space = b2
main:
inc mark
space = 255 - mark
high 2
for i = 0 to mark
next i
low 2
for i = 0 to space
next i
goto main