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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/28/04 22:42
Read: times


 
#82134 - Getting back to the original subject
Responding to: ???'s previous message
UARTS are asynchronous serial devices that don't need a clock.
SPI, I2C and Microwire are serial protocols that need a clock.

Because UARTS are self timed, they need to have a knowledge of what speed the communication is going to be. This is called the BAUD rate which is the number of bits per second that are being transmitted. The protocol requires you surround a data byte (8 bits) with a start bit on the leading edge ("0" level) and at least one stop bit on the trailing edge ("1" level).

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

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 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) and then the every bit time after that for 7 bits. The 8 data data bits are then collected as a single byte.

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.

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.
Philips also use auto baud rate with its ISP micros like the 89C51Rx2. In this case the first character seen must be a "U".

Other serial protocols (SPI, I2C etc) send the clock signal along with the data so can transmit 25% faster than asynchronous protocol.
I2C uses a single data line to transmit and receive data so must use a bi-directional port
SPI uses a separate transmit and receive data line.

Peter



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