Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

What is a UART

Status
Not open for further replies.

Marks256

New Member
Simple question; what is a UART? Now for you Google happy people, that is getting old. I ask because i want a response here. I should not have to explain that anymore...

Anyways, i know that UART stands for Universal Asynchronous Receiver Transmitter, but what exactly does a UART do? And how much does it do? Since it is used in RS232 communications, how much of that does it do? For example, could i just send an 8bit number to it, and have it do all the work of sending it for me? Or would the sender (microcontroller) have to do more work than just send the number to it? Also, on the other hand, with a MAX232, could i just send data to it from my RS232 port (com) on my computer, and have it decode the number sent to it and put it into 8bit parallel?
 
Marks256 said:
Simple question; what is a UART? Now for you Google happy people, that is getting old. I ask because i want a response here. I should not have to explain that anymore...

what's wrong with the information on google ... would you prefer that I look it up on google for you, and copy and paste the information into my message like this?

Definition

Transmitting and receiving serial data

Bits have to be moved from one place to another using wires or some other medium. Over many miles, the expense of the wires becomes large. To reduce the expense of long communication links carrying several bits in parallel, data bits are sent sequentially, one after another, using a UART to convert the transmitted bits between sequential and parallel form at each end of the link. Each UART contains a shift register which is the fundamental method of conversion between serial and parallel forms.

By convention, teletype-style UARTs send a "start" bit, five to eight data bits, least-significant-bit first, an optional "parity" bit, and then one, one and a half, or two "stop" bits. The start bit is the opposite polarity of the data-line's idle state. The stop bit is the data-line's idle state, and provides a delay before the next character can start. (This is called asynchronous start-stop transmission). In mechanical teletypes, the "stop" bit was often stretched to two bit times to give the mechanism more time to finish printing a character. A stretched "stop" bit also helps resynchronization. The parity bit can either make the number of "one" bits between any start/stop pair odd, or even, or it can be omitted. Odd parity is more reliable because it assures that there will always be at least one data transition, and this permits many UARTs to resynchronize.

The UART usually does not directly generate or receive the external signalling levels (such as voltages on wires) that are used between different equipment. Typically, an interface is used to convert the logic level signals of the UART to the external signalling levels. "Signalling levels" is a very broad term encompassing all the various possible schemes to convey a level from one place to another. Voltage is by far the most common kind of signalling used. Examples of standards for voltage signalling are RS-232, RS-422 and RS-485 from the EIA. Historically, the presence or absence of current (in current loops) was the dominant kind of signalling used. Depending on the limits of the communication channel to which the UART is ultimately connected, communication may be "full duplex" (both send and receive at the same time) or "half duplex" (devices take turns transmitting and receiving). Some signalling schemes do not use electrical wires. Examples of such are optical fiber, infrared, and (wireless) Bluetooth in its Serial Port Profile (SPP). Some signalling schemes use modulation (with or without wires). Examples are modulation of audio signals with phone line modems, RF modulation with data radios, and the DC-LIN for power line communication.

As of 2006, UARTs are commonly used with RS-232 for embedded systems communications. It is useful to communicate between microcontrollers and also with PCs. Many chips provide UART functionality in silicon, and low-cost chips exist to convert logic level signals (such as TTL voltages) to RS-232 level signals (for example, Maxim MAX232).

(1) Wikipedia: https://en.wikipedia.org/wiki/UART
 
I'll try to be slightly less of an ass Marks. I will not however succeed =) JustDIY is right, it's all out there.

The single most important purpose of a UART is to generate and synchronize the baud rate signals required for transmitting and receiving a data stream.
 
Last edited:
Sceadwain said:
I will not however succeed

It is the thought that counts...


Ok, so i did a bit of reading, and from what i got out of it, the UART does it all. Is this right?
 
Well, yes. I was looking at the datasheet for a UART (dont remember the part#), and it looked fairly simple. My last question is, is there a pin that needs to be strobed to send the data, or does it send the data as soon as it shows up on the parallel register?
 
Hi,

I think that early home made personal computers used a 'Uart' chip
as a sort of video display.

I am a bit vague on exactly how this was done, and it may have been
a text only arrangement, as i think it was used in conjunction with
a 'character generator' which was a i think a rom chip loaded with
the alphabet in seven bit ascii.

This setup made a simple display for a TV (television set) driven
from a home made PC.

John :)
 
Marks256 said:
Well, yes. I was looking at the datasheet for a UART (dont remember the part#), and it looked fairly simple. My last question is, is there a pin that needs to be strobed to send the data, or does it send the data as soon as it shows up on the parallel register?

Perhaps you might like to mention what you're trying to do? (and what with), anything remotely modern probably already includes an internal UART, and if not it's trivial to write one in software - this was common place back in the days when PC (Personal Computer) didn't have anything to do with IBM.

But no matter what the location or type of the UART, you need 'something' to tell it to transmit.
 
Perhaps you might like to mention what you're trying to do? (and what with), anything remotely modern probably already includes an internal UART, and if not it's trivial to write one in software - this was common place back in the days when PC (Personal Computer) didn't have anything to do with IBM.

But no matter what the location or type of the UART, you need 'something' to tell it to transmit.

You will probably want to kill me for this :)D), but i am still working on my Z80 system... :D Also, if i get ahold of a PIC that doesn't have an internal UART, then i may need to interface one to the PIC (although most PICs i have seen have internal UARTs...)


So something has to be strobed, or the like, yes?
 
Marks256 said:
You will probably want to kill me for this :)D), but i am still working on my Z80 system... :D Also, if i get ahold of a PIC that doesn't have an internal UART, then i may need to interface one to the PIC (although most PICs i have seen have internal UARTs...)


So something has to be strobed, or the like, yes?

Oh well now that you mentioned the ancient Z80, UART might just be a little too high-tech for that. As mentioned you can software emulate a hardware UART - you dont need to interface to an external chip (though they exist!)

Anyways, leave the 1980's behind and do a USB 2.0 controller instead.
 
Marks256 said:
You will probably want to kill me for this :)D), but i am still working on my Z80 system... :D Also, if i get ahold of a PIC that doesn't have an internal UART, then i may need to interface one to the PIC (although most PICs i have seen have internal UARTs...)

I presume you still haven't done anything with it?, like get it working?, so why bother asking about UART's?.

And why not tell us what you're doing?, you're just wasting everyone's time and bandwidth on the site asking vague questions with no information!.

Why not, as already suggested, simply use google to find what you want?, simply entering 'z80 uart' in google brings up masses of hits, which would let you know (which we've have told you if you had let us know in the first place) is that there's a specific Z80 UART chip. Here's another link found on the same first page from google, which you may find interesting?.



Quick edit: try this site, again from the first page of google, and NEVER ask any more Z80 questions here again! :D
 
Last edited:
The Z80 SIO was a more sophisticated UART then most before or since. It sure was a winner in terms of the number of configuration registers, and it could do bit oriented syncronous protocols, unlike the PIC USART which blew the implementation of syncronous big time.
 
Quick edit: try this site, again from the first page of google, and NEVER ask any more Z80 questions here again!

http://www.geocities.com/siliconvall...8/z80_home.htm

Umm, i have that site in my favorites already...


I presume you still haven't done anything with it?, like get it working?, so why bother asking about UART's?.

Ok, you and I both know that my chances of actually finishing the Z80 system are little to none, but the things i learn along the way is all i need. I know know how addressing works, and what opcodes are. I also now know what muliplexers and demultiplexers are, as well as how pullup/down resistors work. There is a TON of stuff i have learned just by toying around, and i would like UARTs to be another one of them. Do you really think i don't use google? I use google for searching ALL of the time.
 
Hi Mark,

Feel free to PM me if you are unwilling to post further questions
about your Z80 musings.
I am no expert on it, but i will try to help.

John :)
 
Marks you really need to get your hands on a nice simple PIC or AVR with a parellel port programmer (built using a passive components an a couple transistors) you'll learn more getting that working and learning how to program than you'll know what to do with.
 
Yum, knowledge...

**broken link removed**

I do have a PIC laying around here somewhere... Something like a PIC16F872?
I dont' know. The "7" is scratched off, so i don't quite know what it is... it looks like a 7... anyways. Would that work? I would like to start with PICs now... :D

How hard would it be to make a simple parallel programmer? Also, aren't transistors considered passive components?
 
No, i don't think transistors are generally considered passive components.

John :)
 
For electrical purposes capacitors, resistors and inductors are passive devices, while all semi conductor devices (including diodes) are active devices, though simple diodes are often considered a passive device. Tunnel diodes in their negative resistance region are a good example of a diode as an active device. Or a PIN diode used in a relaxation oscillator
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top