Ive found where the problem is. I commented all the relative code out then turned it back on 1 line at a time until it broke again.
At the top i have this code
Code:
cServoOffTime con 255
pServo1 var PORTA.3
vServo1Pos var WORD
In the interrupt handler for TMR0 i have this code
Code:
if vservo1pos>=cservoofftime then
pServo1=1
vservo1pos=0
endif
If i comment out the if statement (not the code in it, just if-then and endif) or i change vServo1Pos to a byte then it works fine. As it is above it stops any serial data from being received. I dont get how that could possibly affect it
Bookmarks