For some reason I am trouble with serrxd . The values I get are sometimes off by one bit or two ie. I may receive 12 instead of 140. I know the serial in and out line to the chip is ok. If I connect them together I echo values perfectly to my terminal. Here is my code. I'm using a 20X2
main:
disconnect
serrxd b0
reconnect
sertxd (b0)
goto main
The chip programs ok. I'm sending b0 back out the serial port to see if the chip received it correctly. Even when I wasn't sending the data back out the serial pin on the 20X2 the data wasn't being received correctly. I have a decoupling cap at the chip and tried changing all inputs to outputs in case it was some noise acting on the inputs? Any ideas?
Thanks,
Jim
main:
disconnect
serrxd b0
reconnect
sertxd (b0)
goto main
The chip programs ok. I'm sending b0 back out the serial port to see if the chip received it correctly. Even when I wasn't sending the data back out the serial pin on the 20X2 the data wasn't being received correctly. I have a decoupling cap at the chip and tried changing all inputs to outputs in case it was some noise acting on the inputs? Any ideas?
Thanks,
Jim