Much Help needed with 8251 USART Problem....

Status
Not open for further replies.

pconst201

New Member
Hi friends.

I have been trying to debug an 8251 UART for 5 days now. In fact 3 of them and they all error the same way. I got 1 from a different source, and the last 2 from a single source.

The problem is when receiving characters from my PC, into a simple system with a CPU + UART.

Most characters are received correctly, but 1 out of 10 or so chars are junk.

I have set up the USART for asynchronous communications, 8 data bits, 1 stop bit, no parity.

I configure Putty for the exact same setting.

I have even tried to test the USART on a breadboard, and do it manually. I still get the same issue.

I am initializing the USART correctly I think, the mode byte is 0x4D, and command is 0x37. This is exactly for 8 data bits, 1 stop, no parity, etc.


I am out of ideas, and this is driving me nuts. The issue was happening with my first 8251, so after a while I assumed it was damaged. Bought another 2. Same issue.

Same issue whether when USART used with CPU, or breadboard.

The only thing I can think of is that I am initializing it incorrectly, but that would be unlikely. I have tried many many times.


If someone has any ideas please let me know. I am getting desperate now.

Thank you and best wishes

Paul
 
How is the baud rate clock produced; what crystal or oscillator and what divider?
A speed error marginally out of tolerance could cause occasional errors.

And, what electrical drive circuit are you using to interface to the PC serial port?
Some online stuff uses just 0V/5V levels, which are not strictly RS232 compatible and not guaranteed to work without error on all true RS232 COM port inputs.
That is especially true if the driver is not rail-to-rail or is using 3.3V levels...

I usually use two stop bits at the transmitting end, to make the timing a fraction less critical; though it should not matter, but if something does get out of sync it has a better chance of resyncing, if a continuous data stream is being sent.
But no difference at all for individual characters with gaps..
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…