Jump to content


SPI devices on i2c bus


  • Please log in to reply
1 reply to this topic

#1 Guest_Venkatesh_*

Guest_Venkatesh_*
  • Guests

Posted 09 September 2005 - 05:49 AM

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 ........???

#2 marke

marke

    Posting Freak

  • Moderator
  • PipPipPipPipPipPip
  • 2,617 posts
  • Gender:Male
  • Location:Christchurch, New Zealand

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,




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users