Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


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?

Reply
 
LinkBack Thread Tools Display Modes
Old 16th February 2007, 03:24 PM   (permalink)
Exclamation Serial communication

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?
Electronics4you is offline  
Old 16th February 2007, 11:27 PM   (permalink)
Default

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.
Papabravo is offline  
Old 17th February 2007, 12:06 AM   (permalink)
Default

Quote:
Originally Posted by Electronics4you
Hi there,

What's the difference on USART, UART, I2C and SPI and where to use which?
Not much they are all boering.
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:
Originally Posted by Electronics4you
Can't you do serial communiation with all pins on a PIC, if you just make a function in the source code?
Yes, you can ignore all the built in support and do what is know as bitbang (software serial interface) on any general purpose IO pin. But this loads the processor. It is better to use the built in hardware to do serial IO if the chip has it.

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
3v0 is offline  
Old 17th February 2007, 12:57 AM   (permalink)
Default

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."
Sceadwian is offline  
Old 13th March 2007, 07:12 PM   (permalink)
Default

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.
tnay is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
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



All times are GMT. The time now is 04:51 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker