![]() | ![]() | ![]() |
| | |||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Hi there, What's the difference on USART, UART, I2C and SPI and where to use which? Can't you do serial communiation with all pins on a PIC, if you just make a function in the source code? | |
| |
| | (permalink) |
| You need to read the datasheets to see the differences. These integrated hardware peripherals allow you to spend your hardware cycles on an application rather than bit banging serial communication. Using the hardware allows you to move data at higher speeds than would be possible with bit banging. BTW you can't use ANY pin to do serial communication, you can only use IO pins to perform that function. | |
| |
| | (permalink) | ||
| Quote:
Start by looking at UART on wikipedia pay attention sync vrs async. Once you understand a UART look at the datasheets (or wikipedia) and the rest will make sense. Quote:
On the other hand it is a very good learning experience to write a bitbang routine and get it working. In practice they should only be used if the chip does not have hardware support. HTH 3v0 | |||
| |
| | (permalink) |
| A UART is for asynchronous signals only (like an RS232 style signal) a USART is synchronous (meaning it requires a clock line) or asynchronous. SPI and I2c are serial busses that have both physical and protocol specifications. Any USART can be used as a UART even if doesn't nativly support asynchronous operation by feeding the USART a custom clock line.
__________________ "Because I be what I be. I would tell you what you want to know if I could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." | |
| |
| | (permalink) |
| Hi, I'm curious too. I have read about UART and USART, I2C, SPI. For all I know, SPI was developed to provide relatively high-speed, short distance communication using a minumum number of microcontroller pins. How fast is it? How many clock cycle for 1 byte of communication, as compared to I2C? Since it uses hardware cycle, doesthat means my main program will execute with no delay? Pardon me, i come from a mechanical background, I'm concern about the performance of SPI right now. I search through to web but nothing was mention. Maybe because it's common, and I would like to find out. | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| serial communication in Atmel 89c51 | Peter Nabil | Micro Controllers | 9 | 4th August 2008 01:18 PM |
| serial communication between two pic with RF modules | amindzo | Micro Controllers | 8 | 16th August 2006 04:59 PM |
| serial communication | jaikanth | General Electronics Chat | 1 | 12th December 2004 04:43 PM |
| Serial Communication with mobile phone | remi | Micro Controllers | 0 | 31st March 2004 05:22 PM |
| Serial communication problem | tbrown | Micro Controllers | 12 | 13th February 2004 11:32 AM |