UART, FPGA VHDL

OP (Company: Stu) #7401912

Hello, I have a problem and I'm asking for help. I want to implement this code on the nexys 50 a7 ​​board. The idea of ​​how the board should work is that if I enter an eight-bit number on the switch, the segment display will show me what works. But when you click the button where the rd_uart variable is, nothing happens. it should be downloaded to the PC through putty. When typing on the keyboard, it should be displayed on the segment board, but only the tx light on the board flashes, but the rx vbc led does not flash, do you know where the problem is? I am sending a link to gifthub. : https://github.com/KrizLuk0/digital-electronics1/tree/main/UART_FPGA/project_U25

Divide your problem and debug:

  • build an UART test transmitter to transmit a known pattern every e.g. 100 ms
  • if the tx works connect a counter/fsm to the transmitter and send a more complex pattern (e.g. 1-2-3-4-...)
  • if the counter/fsm output is the same as you expect it, connect your keyboard to the fsm...
Moderator (Company: Titel)

Lukáš K. wrote:

nothing happens

Your task sounds reasonably simple. Your solution looks incredible complicated. Why the heck do you need a fifo here? All interaction ist done by humans, so it is really sllllllooooowwwwwww regarding the 50MHz FPGA.

Lukáš K. wrote:

if I enter an eight-bit number on the switch

What switch?

the segment display will show me what works.

In what manner?

But when you click the button

Which one?

the button where the rd_uart variable is

???

it

What ist "it"?

should be downloaded to the PC through putty.

Putty is a software running on the PC. So maybe it should be received and visualized by Putty.

When typing on the keyboard

What keayboard?

it should be displayed on the segment board

In what manner?

So you want do display 2 informations on the 7seg display: the switches and the RX value? So: what has priority on the 7seg display?

I understand your description this way:

  • from FPGA to PC
  1. you enter some binary code on the dip siwtches
  2. this code is displayed on the 7seg display (in hex? or decimal?)
  3. when you press a button the code is sent via async serial (and afterwards somehow displayed on the PC Screen)
  • from PC to FPGA
  1. when you hit a key on the PC keyboard, some (ASCII?) code is sent via serial
  2. the FPGA receives the data and shows it in some manner on the 7seg display

Is that correct?

OP (Company: Stu)

I'm not sure if I understand correctly. Are you saying that I should separate the FIFO because it's unnecessary? Then, can I connect the output from RX (DOUT) directly to the segment display? And similarly, connect the switches directly to TX?

Moderator (Company: Titel)

Lukáš K. wrote:

Are you saying...

Correct, thats would be my direction. Why using a fifo when nothing is stopping you from writing the display whenever you want. An adjustment of a new value takes longer for sure than sending the last value.

But as said: simulate your design before going on hardware.

Have a look at my RS232 implementation. Think about it and why it needs much less lines of code than yours: http://www.lothar-miller.de/s9y/categories/42-RS232

Reply

A question of your own? This thread is over 3 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.