Jump to content

pc send data to UART receiver on Basys3


newt

Recommended Posts

I am learning how to build an UART on Basys3 board. The UART took the received signal from the PIN RsRx and extracted the data. A Tera Term emulator sent the data to the UART through the COM port of the PC. When I sent the data (any number from 0 to 9), the led light LD18 TX on the Basys board blinked, but the UART displayed the different data with respect to the data sent. It can only display two numbers 0 and E. When I sent any number from 0 to 9, the UART displayed the number 0. When I send any character from a to z, the UART displayed the character E.

I wonder if you see anything wrong in the overall approach/setup. Simulation demonstrated that the UART could receive data correctly. Bit streaming had the above issue. Switching from simulation to bit streaming involve only 2 simple changes, the source of clock and data signal.

 

 

 

 

Link to comment
Share on other sites

@newt,

Your approach of using a terminal program to communicate with the UART on the receiver sounds good.  Not getting the right value can be a result of not using the right baud rate, grabbing the wrong bits, or even getting the bits out of order (UARTs send the LSB first).

Since UARTs are sort of fundamental to talking with most Digilent circuit boards, I put together a UART example repository containing series of tests that can be used with a UART, together with a simulator that actually simulates the correct UART protocol.  There's a good hello world test within there, as well as an echo test, line test, and even a Gettysburg address test of a UART with FIFO.  Each of these tests can be used as your top level file, or as a Verilator simulation which you can run on your PC to make certain things work.  Indeed, you might wish to attach your own code and run it within the Verilator simulation to watch what happens.  Examples included will also create VCD files that can be reviewed and examined within GtkWave.

Hope this is useful,

Dan

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...