I'am using a ADE7758 chip for Energy monitering in my application.This is having a SPI interface.
But my controller is having an i2c port.....So i need to connect an spi device to a i2c bus.....
can anybody help me out ........???

SPI devices on i2c bus
Started by
Guest_Venkatesh_*
, Sep 09 2005 05:49 AM
1 reply to this topic
#1
Guest_Venkatesh_*
Posted 09 September 2005 - 05:49 AM
#2
Posted 09 September 2005 - 06:24 AM
Hello Venkatesh
Welcome to the forum.
The SPI bus and I2C bus are totally different bus systems. If the micro does not support the SPI device, you can create a software routine to drive the SPI device. This will be a lot more processor intensive than a hardware interface would be. You need to "bit bash" the protocol. That means that you toggle the clock line by setting the bit ON and OFF and you either toggle the output data line or read the input data line at the correct clock polarity. You do not use any of the I2C hardware to do this. If you are using the I2C for other devices, you should use alternative port pins to talk to the SPI device.
Best regards,
Welcome to the forum.
The SPI bus and I2C bus are totally different bus systems. If the micro does not support the SPI device, you can create a software routine to drive the SPI device. This will be a lot more processor intensive than a hardware interface would be. You need to "bit bash" the protocol. That means that you toggle the clock line by setting the bit ON and OFF and you either toggle the output data line or read the input data line at the correct clock polarity. You do not use any of the I2C hardware to do this. If you are using the I2C for other devices, you should use alternative port pins to talk to the SPI device.
Best regards,
Mark Empson | administrator
Skype Contact = markempson | phone +64 274 363 067
LMPForum | Power Factor | L M Photonics Ltd | Empson family | Advanced Motor Control Ltd | Pressure Transducers | Smart Relay | GSM Control | Mark Empson Website | AuCom | Soft Starters
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users