Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
18 years ago

Help with RS232

hello all,

i am newbie here. would any of u know how to take in 10 bytes of data serially from RS232 to MAX using VHDL codes?

Please further explain it with how the thing works including how the baud rate,frequency..etc is being used.

thanks~!!

7 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    First be aware of the voltage levels. Check out an RS232 driver data sheet and compare the electrical interface to your system requiremnts Then, search on UART Universal Asynchronous Reciever Transmitter. There are some code examples I found from google that get you half the way there. Looking for help from Altera I only find UART IP core references, such as users manuals. Putting one in a PLD, I assume you don't need all the fnctionality of a 16650. A 16650 is an old UART discrete part that is pretty much a standard now, and you can also search on that. There is also a Xilinx application note that promises a code exaple download: XAPP341. The two sentance summary is a minimalist asynchronous serial interface with an idle data line that you over sample to detect a transition that indicates a start of a word (start bit). You assume the bit period +-5%, clock in a byte, and wait the number of stop bit periods. There are optional buffers, controls, and handshaking. I see a couple complete descriptions on the web when I search on RS232 white paper .

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    First of all, thanks for your reply. do you deal with RS232 before? may show me the basic concept? (using block diagram,flow chart etc..)

    sorry that i got no idea about how both RS232 and FPGA communicate using the codes..

    i am currently doing on assignment and i am so lost..

    thank you!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    i know there is a lot of codes can be found online. am i deal with both the transmitter and receiver codes? i found some codes but i hardly understand how both the things talk to each others....

    sorry for troubling...

    thank you.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I can only help with small bits and helpful pointers. For in depth help, you would do well to find a local coworker to dialog with. On your own, start with tutorials like:

    http://jamesthornton.com/freebsd/articles/serial-uart/

    Start with understanding the simple two wire serial communications interface that transfers a byte, and expand from there. Two wire serial is in many EE text or reference books.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    although i am not fully understand..anyway thanks a lot!

    and what do u mean by the uart provided in SOPC Builder?

    how does it works?

    thanks...