Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/29/04 00:50
Read: times


 
#82138 - Picky, picky,...
Responding to: ???'s previous message
UARTS are asynchronous serial devices that don't need a clock.

As Michael said, the UART itself does require a clock; it's just that the clock is not transmitted along with the data.

SPI, I2C and Microwire are serial protocols that need a clock.

So, continuing in the pedantic vein, SPI, I2C and Microwire are serial protocols that include a clock along with their data line(s).

Two data lines are used, TXD or transmitted data and RXD for received data.

In RS232, note that TXD is an output from a DTE, but an input to the DCE; similarly, RXD is an output from a DCE, but an input to a DTE.
See: http://www.8052.com/forum/read.phtml?id=60533

The UART transmitter transmits a "0" for 1 bit, then eight data bits for 1 bit time each and then a "1" level for at least 1 bit time.

The 'U' in "UART" stands for "Universal." Part of its Universality is the ability to use many different frame sizes - 5, 6, 7, or 8 bits. (The 8051 UART can only do 8 or 9 bits).
As I mentioned before, a UART may also do other stuff like automatic parity generation & checking, automatic software and/or hardware flow-control, etc, etc,...

The UART receiver synchronizes itself by looking for a 1-->0 transition of a start bit and then measures the level 1.5 bit times later (middle of first data bit)

Actually, the UART will take more samples during the start bit time to ensure that it's a real start bit, and not just a glitch.
Similarly, each data bit is sampled multiple times.
Commonly, UARTs sample at 16x the baud rate.

and then the every bit time after that for 7 bits. The 8 data data bits are then collected as a single byte.

Again, the number of bits per character may be programmable.
The UART will also sample the stop bit for the specified time to check for a valid stop bit before delivering a valid character.

Thus a UART transmits a minimum of 10 bits per byte. Thus the maximum data rate of a 9600 baud communication is 960 bytes per second.

Again, the character width is programmable.

Note some asynchronous protocols like the "Hayes" modem protocol are auto baud rating where the first character of every command is an "A". The receiver measures the start bit width and sets its baud rate to that time.

This is nothing to do with Hayes.
This is a feature implemented by many (most?) modems, having spotted that (almost) every Hayes command begins with an 'A'

I2C uses a single data line to transmit and receive data so must use a bi-directional port

It is not necessarily true that this requires a bi-directional port: you could use an open-collector, output-only pin to drive the data line for transmitting; and in input-only pin to sense the data line for receiving.


List of 34 messages in thread
TopicAuthorDate
serial port/UART/SPI?            01/01/70 00:00      
   Google first            01/01/70 00:00      
      RE:Google first            01/01/70 00:00      
         UART/SPI            01/01/70 00:00      
            correction            01/01/70 00:00      
               More on SPI            01/01/70 00:00      
            SPI vs UART            01/01/70 00:00      
            That would be I2C?            01/01/70 00:00      
            UART and SPI, the main difference            01/01/70 00:00      
               The real difference...            01/01/70 00:00      
                  rs232c            01/01/70 00:00      
                     Component vs Protocol            01/01/70 00:00      
                     Not all UARTs are RS-232!            01/01/70 00:00      
                        232 is more than just a UART            01/01/70 00:00      
               Nice discussion going            01/01/70 00:00      
         Google not so helpful            01/01/70 00:00      
            SPI - Correction            01/01/70 00:00      
            SPI            01/01/70 00:00      
               SPI or SPI?!            01/01/70 00:00      
                  Atmel            01/01/70 00:00      
                  OT: ISO and interfaces            01/01/70 00:00      
                  SPI            01/01/70 00:00      
   Serial Port - ambiguous!            01/01/70 00:00      
      SPI STANDARD            01/01/70 00:00      
         try            01/01/70 00:00      
   Getting back to the original subject            01/01/70 00:00      
      Not quite....            01/01/70 00:00      
      Picky, picky,...            01/01/70 00:00      
         Chapter & Verse            01/01/70 00:00      
      Hayes Commands            01/01/70 00:00      
         nice discussion            01/01/70 00:00      
   Where is Mohammad            01/01/70 00:00      
   Summary of Buses etc            01/01/70 00:00      
      RS232 is NOT a bus!            01/01/70 00:00      

Back to Subject List