Having a strange problem with addition to a word. I'm outputting the number to the PIC18F8722 EUSART. I'm using PBP v2.60. I can output a constant, e.g. 31416, but if I add one to a word value starting at zero, I get some weird results.
Here's a snippet from my code:
IF (bXMIT_CNTR >= 20) THEN
CONV_X = CONV_X + 1
'CONV_X = 31416
bXMIT_CNTR = 0
SERIAL_MSG_FLAG = 1
ENDIF
And here are some of the results. I would expect 1, 2, 3...:
11111
22222
33333
44444
55555
66666
77777
88888
99999
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
22220
22221
22222
22223
Any ideas?
Thanks!
Bookmarks