What is a UART in an FPGA? Basics of Serial Ports, COM Port, RS-232, RS-485

What is a UART in an FPGA? Basics of Serial Ports, COM Port, RS-232, RS-485

nandland

4 года назад

42,731 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Hungry_Devs
Hungry_Devs - 25.08.2023 08:55

Can you recommend any books for me to find more information please?

Ответить
baghdadi abdellatif
baghdadi abdellatif - 30.01.2023 19:15

Thank you
Can you send commands ligne with tera term if connected to ms dos pc not to Arduino?

Ответить
s-max
s-max - 09.10.2022 02:07

Hello sir we have one question for you. Hare you online?
Thank s

Ответить
Roberto Cannella
Roberto Cannella - 09.06.2022 23:04

Hi, Great Video! Is there a video detailing the coding?

Ответить
Зыков Алексей
Зыков Алексей - 13.05.2022 00:22

Thank you for your content, it is really high quality!

Ответить
Ivan Borisenko
Ivan Borisenko - 22.04.2022 02:12

ASCII came from 1963

Ответить
Monotoba
Monotoba - 10.11.2021 19:23

7 bits were used on old teletypes and video terminals. A lot of early serial devices also used 7 data bits. If speed counted, the time used to send that one bit at 110 Baud was an issue. Also, the early character encodings also used 7 bits. So only 7 bits were needed for a teletype or similar character-oriented devices. I restored a paper tape reader in the 90s that used 7 bit encoding and 7 bits data at a rate of 300 baud.

Ответить
Magnus Wootton
Magnus Wootton - 08.08.2021 16:58

why do you even need a uart module if its this simple, a wire would do.

Ответить
Maxi Cardozo
Maxi Cardozo - 21.04.2021 21:03

Excellent

Ответить
Tim Hosking
Tim Hosking - 20.03.2021 23:59

7 data bits was frequently used when baud rates were significantly lower than your blisteringly fast 9600 baud. Remember that ASCII is at heart a 7 bit code, so why waste precious bandwidth on an unused bit? RS-232 allows 5, 6, 7 or 8 data bits. Yes, I said 5! Look up Baudot Code, which was used in telegraph systems. It used only 5 bits achieved using a shift between letters and numbers.

Another sneaky way to maximise bandwidth was by using split baud rates. An example of this was the Videotex terminal which used 1200/75 baud. The bulk of the bandwidth was downstream to the terminal. As humans don’t type as fast as computers, the upstream was only 75 baud.

Flow control is nothing to do with arbitrating who is using the line. It’s about preventing buffer overruns. Hardware flow control uses the RTS (Request to send) and CTS (Clear to send) wires on the RS-232 interface. Software flow control uses the XOn/DC1/Ctrl-S and XOff/DC3/Ctrl-Q ASCII characters. You can still type those codes in a terminal window to pause and resume fast scrolling output. Imagine for a moment that your terminal is connected via a serial link such as a modem, typing Ctrl-Q is sending an XOff to the remote telling it to stop sending as your mental buffer can’t keep up and is about to overflow. You can then send an XOn to resume.


You kids just don’t know how good you have it.

Ответить
Jason Crawford
Jason Crawford - 15.01.2021 07:50

It's just two wires, but both ends need to agree on what the ground voltage is, right?

Ответить
Nino Porcino
Nino Porcino - 28.07.2020 21:12

Some time ago I wrote a decoder for a cassette tape format, the old "Kansas City Standard" from the '70s... it's 600 baud, 8 bits, parity even, 2 stop bits. I had to decode it exactly the way you described, looking for the start bit negative edge, the jumping on the middle of the bit for sampling. The stop bit can be any length, not just two stop bits, because the data is asynchrounous. Back to the teletype days when the data was generated from typing on the keyboard.

Ответить
bob mcgrath
bob mcgrath - 14.05.2020 03:34

How are you getting tera term to send characters without hitting enter?

Ответить
Anthony
Anthony - 24.12.2019 17:48

I'm an engineer here in the UAE developing a custom BMS. I'm using Atomic Pi's connected to a USB hub and creating virtual Serial ports which communicate to my RS232/485 and one MCU. The touch screens use COM1 and the MCU uses COM4. The COM1 and COM4 seem to be symbiotic but when I plug in the DTU, it takes up COM6. I wrote the interface code in C++ and the COMs seem to work perfectly when the USB Hub isn't connected. But once the MCU and DTU are plugged into the system, I noticed sometimes when I send a command out the DTU, it messes with the MCU. Is it possible there is a cross in the RX/TX bus in the USB hub? I don't know if it uses an FTDI chip and Maxim RS232 or not. IT seems the handshake is happening between the MCU COM4 and DTU COM6. I don't know enough about USB hubs but I was hoping you might shed some light on what's happening. Every USB Hub from the same company is doing the same thing on all the CPU's.

Ответить
Ezio Auditore
Ezio Auditore - 22.12.2019 22:00

U r Lazy and skip many topic😥

Ответить
Ričardas Šukniis
Ričardas Šukniis - 17.11.2019 21:32

Thank you, now I know what is this think you humans call "keyboard".

Ответить
iLikeMouth
iLikeMouth - 03.10.2019 07:53

Not a good video for educational purposes. Very shallow explanation and not enough depth of knowledge on the subject. Also, very biased and opinionated description on the topic. Just because you don't use something does not mean it's not important.

Ответить
Zeeshan Rafique
Zeeshan Rafique - 28.09.2019 14:43

please upload a video, which tells that how can we see our fpga output on serial monitor

Ответить
Fun In Sun
Fun In Sun - 19.09.2019 15:45

great job man can u send me the slides that u have

Ответить
Gurkiran Singh Bhatia
Gurkiran Singh Bhatia - 07.09.2019 04:54

You could have typed some word and asked us to guess what it is based on the ASCII values displayed :p

Great video btw. Appreciate your efforts. To the point and simple explanations.
-(I'm just a random person trying to explore more of concepts like FPGA, Logic Gates, etc. and who stumbled upon your channel over a couple of years ago)

Ответить
Billie Hilton
Billie Hilton - 03.09.2019 23:06

Oh my gosh, I wish I knew/remembered there was a UART on the Go Board! I wrote a whole Go program for a Raspberry Pi to convert USB keyboard events into a SPI and used your SPI Master code to read them lol.

Ответить
Boonedock Journeyman
Boonedock Journeyman - 02.09.2019 18:44

Great stuff. Hang in there while the Patreon builds.

Ответить
Factory400
Factory400 - 01.09.2019 20:50

I go my Go Board! Excellent practical intro into FPGA concepts. Thanks Russell.

Ответить
David Dennis
David Dennis - 01.09.2019 20:49

Looking forward to seeing the code behind this! I have a need to implement a UART and was just about to tackle that. It will be much easier to have someone explain me throught it. Thanks!

Ответить
Paul
Paul - 01.09.2019 18:00

OH my god another video! This is such a lovely topic. So timely for me! I really love your basics videos. You simplify FPGA implementation sio much with giving us code examples. Doing a UART engine in the FPGA is just so great.

Ответить
Spacedock8
Spacedock8 - 01.09.2019 14:54

FYI - Asynchronous does NOT mean that there are no clocks, just that a synchronous clock is not shared between the parties. The clocks are separate and internal to each UART and the start bit is there to align these clocks to the bitstream. Flow control is/was provided to cater for devices such as line printers and teletypes that could not process the data as quickly as it was received due to slow mechanisms and small or non-existent buffers. The flow control allowed the receiver to tell the transmitter to pause until it was ready to process more data.

Ответить
Sumit kavathekar
Sumit kavathekar - 01.09.2019 05:05

Please do these videos more frequently! We just wait for it

Ответить
Sumit kavathekar
Sumit kavathekar - 01.09.2019 05:05

That's really great @russel ! Thank you for such videos !

Ответить
Chris Dreher
Chris Dreher - 31.08.2019 23:48

Overall good intro to UARTs. Thanks.

One thing to mention: parity comes in several flavors. When someone says that their serial port is set up as "9600, 8N1" the N stands for no parity. Other options include O for odd parity and E for even parity. Some obscure setups even use 1 or 0 parity, which just means that the parity bit is hardcoded to a value or 1 or 0 (not a very useful setting).

Ответить
NivagSwerdna
NivagSwerdna - 31.08.2019 19:41

wot no code?

Ответить
Mike Rob
Mike Rob - 31.08.2019 17:39

UART for President

Ответить
Shrikant Charthal
Shrikant Charthal - 31.08.2019 12:08

That's great video ... pls make such videos each week if possible. can you make a video related to Network On Chip along with different network topologies and its implementation on FPGA....pls

Ответить
Duke Nuke
Duke Nuke - 31.08.2019 11:24

not like todays kids :_D

Ответить
LLDevLab
LLDevLab - 31.08.2019 10:03

Thank you for great video :) Just couple weeks ago created own UART implementation on FPGA (just for fun). Noticed, that data bits can be 5 – 8 bits. This feels strange for me as well, why someone would send less then 8 bits at once...

Ответить
Phillip Neal
Phillip Neal - 31.08.2019 08:56

If there is no clock driving the uart_rx and uart_tx then how do I compute something on a byte received and send the result back on uart_tx ?

Ответить
Brock
Brock - 31.08.2019 06:08

Youre back! 🤗

Ответить
Triangle Enjoyer
Triangle Enjoyer - 31.08.2019 04:31

Great video, thanks!

Ответить