Difference between uart and spi
Discussion in "PIC Microcontroller Discussion" started by PrabakarDeva Oct 24, 2013.
Thu Oct 24 2013, 03:21 pm
They both are different hardware peripherals thats the biggest difference. If you are looking for list of differences then here are some:
1. UART is one to one communication where as SPI is a bus protocol with multi-device Master-slave configuration
2. UART is two wire SPI is 4/3 wire
3. UART is asynchronous, SPI is synchronous
4. UART is slower than SPI
5. UART Data transfer is limited to 9bits at a time where as SPI can go for higher word size per transmission
6. UART communication can be initiated by either connected device, SPI can only be initiated by Master device.
If you have doubts, feel free to post again
1. UART is one to one communication where as SPI is a bus protocol with multi-device Master-slave configuration
2. UART is two wire SPI is 4/3 wire
3. UART is asynchronous, SPI is synchronous
4. UART is slower than SPI
5. UART Data transfer is limited to 9bits at a time where as SPI can go for higher word size per transmission
6. UART communication can be initiated by either connected device, SPI can only be initiated by Master device.
If you have doubts, feel free to post again
PrabakarDeva like this.
Mon Oct 28 2013, 03:41 pm
Thank u so much...i had started to learn spi....i had finished that now...i had written a program to check the spi transmission was completed or not...i was connected the led at the spi output pin(SDO)...I don't know that am i doing right or not?can u tell me?
Tue Oct 29 2013, 01:05 pm
Which controller are you working on. You can connect Led on data pin, but due to fast data transfer you will barely see the LED glowing.
Wed Oct 30 2013, 09:40 am
I am using Pic 16F877A controller.I didn't connect the led directly to the data pin.i connected led through shift register to the data pin.Is that way correct?
Sat Dec 14 2013, 03:34 am
I'm not 100% sure what you are doing, but in Proteus use the oscilloscope.
Connect the scope to the SPI output, it can capture trains of pulses to see exactly what is happening.
Add a 1k pullup just in case the pin is floating part of the time.
Connect the scope to the SPI output, it can capture trains of pulses to see exactly what is happening.
Add a 1k pullup just in case the pin is floating part of the time.
Powered by e107 Forum System