![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| i'm new in PIC,can anyone tell me what is the different between UART,& I2C.thanks for your help | |
| |
| | (permalink) |
| UARTS are used for asycronous serial communication. No clock is required and the timing of the bits is determined from the leading edge of each character. A minimal full-duplex interface requires three wires, TxD(Transmit Data), RxD(Receive Data) and Ground. The full duplex means there can be data going in both direction at the same time. I2C is sycnronous data transfer with a data line and a clock line. It is half duplex, meaning data can only go one way at any given time.
__________________ We never have time to do it right; but we always have time to do it over. | |
| |
| | (permalink) |
| thanks a lot | |
| |
| | (permalink) |
| adding further, UART is a point-to-point communication i.e. only two devices talk to each other, u can not connect extra device on the same UART (unless u r using RS485 drivers/lines)!! I2C gives freedom over that, u can connect as many as 128 devices on the same 2 wire line (with 7-bit address range), saving a lots of wiring for u!! common use of UART is to talk outside the board using RS232, RS422 etc. drivers,while I2C is used mainly to communicate between the devices on the same board!! ---------------------- http://dharmanitech.blogspot.com | |
| |
| | (permalink) |
| I am not sure what you meant by this, I assume you mean that the clock is not part of the communciations protocol such as I2C which uses a clock from DTE to DCE? But just to clarify, a clock is required when using UARTs, whether it be an internal or external clock, it is still used. A PLL is commonly used to sync the clock with the incoming received data.
__________________ "Remember, you're special.....just like everyone else." | |
| |
| | (permalink) |
| The very name UART, being an Asynchronous communication method, is that it is not SYNCHRONIZED with a clock. Rather, unintelligent UART methods only rely on being set with the same parameters such as baud, parity, and stop bits. Intelligent UARTs(not an official name, just one I use) can look at a frame of data and determine it's parity, baud rate and stop bits by itself, but it's only used in more complex devices. EDIT: It's also important to mention that the I2C interface supports clock stretching, where devices that need more time to receive and process data can pull the clock line low (due to being designed to be open-drain) to tell the master device that it's not ready. Though I2C can theoretically support 127 devices, your average I2C slave device can't have it's address fully configured,
__________________ Feels good, man. Last edited by ArtemisGoldfish; 31st August 2008 at 10:29 PM. | |
| |
| | (permalink) | |
| Quote:
__________________ "Remember, you're special.....just like everyone else." | ||
| |
| | (permalink) |
| Uh, no, if the data isn't synchronized with a clock pulse, what's the point of it? A UART only needs to work with 3 lines: Tx, Rx, and ground. The only clock signals involved here are at each device, where they both have to generate a timing signal for internal UART handling. There is NO clock signal connection between the two devices. Also, if you're referring to the clock element of the UART itself, of course it needs a clock, all electronics need a time element to actually progress in execution.
__________________ Feels good, man. Last edited by ArtemisGoldfish; 1st September 2008 at 04:41 AM. | |
| |
| | (permalink) | |
| Quote:
I think you misunderstood my earlier posts. Here's the jist of it: NO clock signal between devices. Thereby making asynchronous. LOCAL TX/RX clocks required for shifting data in to, and out of the ports. You may say at this point, "Well no xxxx". But not knowing the experience of the OP, I wanted to clarify the requirements of the clocks that work locally at the device because of what was said in an earlier post. If you still disagree, feel free to provide a data sheet of a device you are referring to and I will do the same.
__________________ "Remember, you're special.....just like everyone else." | ||
| |
| | (permalink) |
| Sorry, but that isn't so - as it's an asyncronous process there's no clock signal to be recovered, so PLL's aren't used - and couldn't be. You use a completely separate clock at the receiving end, which needs to be close enough to remain in sync only for a single word length, as it resyncronises every start bit. | |
| |
| | (permalink) | |
| Quote:
__________________ Feels good, man. Last edited by ArtemisGoldfish; 1st September 2008 at 12:11 PM. | ||
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) | |
| Quote:
But my point was simply this, a seperate clock is used at the receiving end, just as you said.
__________________ "Remember, you're special.....just like everyone else." Last edited by rezer; 1st September 2008 at 04:46 PM. | ||
| |
| | (permalink) | |
| Quote:
Do you know of any hardware UART's that use a PLL?, presumably if you have experience using such a device, it was built from scratch to overcome a specific problem?. Many of the older UART's don't even have their own clock, you have to provide it, at a multiple of that required. | ||
| |
| | (permalink) | |
| Quote:
Actually you said PLLs "couldn't be" used. Read your post. And yes, many UARTs don't provide their own clock but I don't know what you mean by "...at a multiple of that required." Multiple of the baud rate?
__________________ "Remember, you're special.....just like everyone else." | ||
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Buzzer/Speaker...What's the diff? | Urahara | Micro Controllers | 28 | 31st July 2008 11:15 AM |
| Choosing transistors for a VCA diff pair | atferrari | Electronic Projects Design/Ideas/Reviews | 5 | 5th March 2008 04:30 PM |
| the diff. in the applications of PIC & PLC | h.d | Electronic Projects Design/Ideas/Reviews | 5 | 12th October 2007 02:22 PM |
| Accurate low voltage diff measurement | Oznog | General Electronics Chat | 3 | 3rd May 2004 05:41 AM |
| npn vs pnp diff. amp | mozikluv | General Electronics Chat | 0 | 27th September 2003 04:44 AM |