Connect with us

Much Help needed with 8251 USART Problem.......

Discussion in 'Microcontrollers, Programming and IoT' started by analopconst201, Aug 30, 2020.

Scroll to continue with content
  1. analopconst201


    Aug 30, 2020
    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

  2. bertus

    bertus Moderator

    Nov 8, 2019
  3. analopconst201


    Aug 30, 2020
  4. bertus

    bertus Moderator

    Nov 8, 2019

    Thanks for the link. It might also help others with the same problem.

  5. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    8251, from 1980, really?

    The chip is, as its name says, an asynchrounous transceiver. Meaning that the asynchronous data needs to be synchronized. This is where the 16 x oversampling comes into play. A standard technique with these UARTs.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day