The 16384+12 is correct, I have used that before.
The calculation is: (1.000.000/Baudrate) - 20 , so 1.000.000 / 31250 = 32 -20 = 12.
For inverted output set bit 14, = 16384.
But even with a different baudrate I don't get any output.
I did a quick test to trace the problem.
With this code, nothing 'toggles':
Code:
Progstart:
if PORTB.0 = 1 then
Toggle PORTB.6
endif
Debounce:
Pause 20 ' ? shorter ?
If PORTB.0=1 then
goto Debounce ' Button still pressed?
endif
Goto Progstart
So I suspect the problem is in the line (and similar lines)
Although I don't see what could be wrong with this...
Bookmarks