Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Basic devices to practice I2c and SPI

Status
Not open for further replies.

SimonW

New Member
Dear Friends,

I ultimately wish to interface a pic with a

microchip i/o expander -> I2c

rf soloutions RF Tx/Rx - > SPI
**broken link removed**

using a ccs pic C compiler which has built in libraries to use i2c and SPI

MY QUESTION

Which IC's are best IC to *practice* I2c and SPI between the PIC

Thanks in advance,

SimonW
 
Last edited:
You could do pic to pic but it's probably easier to start with serial memory. The 24LC16 is I²C and the 25LC16 is the SPI.

Mike.
 
Last edited:
I personally would like to use an I2C memory of some sort because you can easily read the data after it has been written to the device. Although Ian's idea would be a nice idea too, you can simply measure the voltage output to see if it is working properly.
 
Last edited:
I haven't yet played with I2C but SPI is super stupid simple. You have an SPI master device and one or several SPI slave devices. SPI is full duplex...meaning that both master and slave transmit/receive simultaneously. However, ONLY the master generates the shift clock.

The clock can be thought of as a "trigger" signal. There are several modes of SPI, the most common being that the clock idles in the low state and the SPI devices transmit on the rising edge of the clock while receiving in the middle of the rising/falling edges of the clock signal. In this mode, the SPI devices do nothing while the clock is low. The "pulsing high" of the clock signal "triggers" the slave devices to transmit data to/receive data from the master SPI device.

The SPI protocol transmits/receives MSB first.

Some SPI devices also feature a "slave select" or a "chip select" pin. The master will drive the SS pin low on the SPI device it wishes to interact with prior to transmitting to/receiving from said slave SPI device. This allows multiple slave SPI devices to co-exist on the same SPI buss, but only one SPI device gets interacted with by the master SPI device. With I2C, it uses device addressing instead of a separate slave select pin, which allows two wire communication between the master I2C and the several I2C slave devices which exist on the same I2C buss.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top