Guest Venkatesh Posted September 9, 2005 Report Share Posted September 9, 2005 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 More sharing options...
marke Posted September 9, 2005 Report Share Posted September 9, 2005 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, Mark Empson | administratorSkype Contact = markempson | phone +64 274 363 067LMPForum | Power Factor | L M Photonics Ltd | Empson family | Advanced Motor Control Ltd | Pressure Transducers | Smart Relay | GSM Control | Mark Empson Website | AuCom | Soft Starters Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now