Jump to content
LMPForum

SPI devices on i2c bus


Guest Venkatesh
 Share

Recommended Posts

Guest Venkatesh

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

Link to comment
Share on other sites

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,

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...