Post your whole code, RX and TX.
Remember that arrays start at zero [0]
Post your whole code, RX and TX.
Remember that arrays start at zero [0]
Dave
Always wear safety glasses while programming.
After testing at different Bauds, trying different Hser defines, I found that if I always use a short define string before my needed data all reception is exceptable. Sending a string of “SINKABCDEFG…… and receive with
hserin 2000,TimeOut , [wait("SINK"),str Rxdata\16]
is successful each loop without error. I’ve seen other examples like this and I’m sure it’s a good practice. I’m sending with 16F819 at 8Mhz internal driving a LT108CN RS232 shifter. Resulting in NO errors on Tera Term.
Receive on X1 board, 16F877A at 20Mhz also with LT108CN. Wired connection from bread board w/ F819. My only question now is why this works on receive end:
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_BAUD 9600 ' Baud rate
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
And this doesn’t work on receive end with my X1 board:
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
DEFINE HSER_SPBRG 0 ' 9600 KBaud @ 20MHz, -86.98%
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
Thank you guys for all your comments!
Hi Mountain :-)
Glad you're winning !
You left a few things out :-)
Try this
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 20h ' Enable transmit, BRGH = 0
DEFINE HSER_SPBRG 12 ' 9600 Baud @ 8MHz, 0.16%
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
Hope that helps :-)
Dennis
Bookmarks