Hello everyone... i am facing one problem on PIC18 EUSART..
My EUSART Tx work great... can transmit string correctly
but the problem is Rx part...
It can receive as well... but i try to echo back (by code) ... i get the other things...
I check the RCREG via debug mode, i found weird data...
for example:
PC --> [0x80 - 10000000] --> USART
PC <-- [0x00 - 00000000] <-- USART
PC --> [0x40 - 01000000] --> USART
PC <-- [0x0D - 00001101] <-- USART
PC --> [0x20 - 00100000] --> USART
PC <-- [0x1D - 00011101] <-- USART
PC --> [0xF7 - 11110111] --> USART
PC <-- [0x40 - 01000000] <-- USART
PC --> [0xFB - 11111011] --> USART
PC <-- [0x02 - 00000010] <-- USART
PC --> [0xFD - 11111101] --> USART
PC <-- [0x01 - 00000001] <-- USART
PC --> [0xFE - 11111110] --> USART
PC <-- [0x00 - 00000000] <-- USART
PC --> [0x7F - 01111111] --> USART
PC <-- [0x40 - 01000000] <-- USART
PC --> [0xBF - 10111111] --> USART
PC <-- [0x20 - 00100000] <-- USART
PC --> [0xDF - 11011111] --> USART
PC <-- [0x10 - 00010000] <-- USART
curently i use EUSART interrupt to Rcv data...
when interrupt flag set, then jump into Rx routine...
then DATA = RCREG
then printf(DATA) to echo the Byte in DATA or RCREG..
Please help...
thanks...