Hi,
I have a problem with EUSART(18F4550) Interface. I can't connect this MCU with PC via RS232.
When I transmit byte from MCU, the PC receive somethink else. For example: MCU transmit 0xaa and PC receive 0xff. So, I think it's problem with baudrate...
The problem isn't in hardware, because with 16F877A everythink works fine...
I'am using 20MHz crystal, and I want 20Mhz Fosc. So, configuration bits are:
CONFIG1L = 0b00100100;
CONFIG1H = 0b00001100;
Is that rigth ?
There is my code, i dont known what I doing wrong...
When I transmit byte from MCU, the PC receive somethink else. For example: MCU transmit 0xaa and PC receive 0xff. So, I think it's problem with baudrate...
Hi,
why do you think it's a baudrate problem?
How are you displaying your sent (or received) data?
Isn't it a format problem? you may want to check the ASCII Table to be sure what your're sending (or receiving).
Send 0x00 ten(10) times and each time write down what you received.
Then send 0xFF ten times and write down again what you received.
Analysing the data you've written down, you may be able, I think, to understand what is going wrong.
Send 0x00 ten(10) times and each time write down what you received.
Then send 0xFF ten times and write down again what you received.
Analysing the data you've written down, you may be able, I think, to understand what is going wrong.
Hi,
is that what you are receiving sending 0x00 or 0xFF ?
Please post both results if the one for sending 0x00 are not zeros.
You may also want to check the format of your data on both PC's and MCU's sides: they must be the same.