| ??? 09/29/03 16:53 Read: times |
#55719 - RE: i2c and spi with aduc812 Responding to: ???'s previous message |
You should study the data sheet. On Page 15 it says....
SERIAL PERIPHERAL INTERFACE The ADuC812 integrates a complete hardware Serial Peripheral Interface (SPI) on-chip. SPI is an industry-standard synchronous serial interface that allows eight bits of data to be synchronously transmitted and received simultaneously, i.e., full duplex. It should be noted that the SPI pins are shared with the I2C interface, and therefore the user can only enable one or the other interface at any given time. What this means is that the hardware circuit on-board the controller can only talk I2C or SPI at any given time. However there are two things to consider.... 1) You could connect one type of interface up to the hardware circuit and then you could connect the other type of device up to a separate set of I/O pins and write a software bit-bang driver for the second device type. 2) In some cases you may be able to connect the SPI and the I2C devices up to their respective sets of the shared I/O pins. NOTE THAT I DO NOT RECOMMEND THIS BUT IT MAY BE POSSIBLE. Then you could software enable one of the I2C or SPI interfaces at a time and communicate with the attached device and then when finished disable the interface circuit. This would work as long as you could ensure that the communication protocol to the I2C device would not accidently wake up the SPI device. And conversely you would have to evaluate and make sure that active communication to the SPI device would not accidently wake up the I2C device. I have actually had this work in an implementation where I had a total software bit-bang to both types of devices. I shared the SPI clock line with the I2C SCL line and the SPI data out line with the I2C SDA line. Of course the SPI device had a CS (chip select) line and this permitted me to separately disable that device during I2C transfers. Likewise it turned out that the I2C device being used had a separate mechanism to permit me to disable it so it was kept inactive during SPI transfers. Note that not all I2C devices have this capability and so generally I would discourage trying to share the hardware interfaces of the ADuC812 between the two types of serial devices. Michael Karas |
| Topic | Author | Date |
| i2c and spi with aduc812 | 01/01/70 00:00 | |
| RE: i2c and spi with aduc812 | 01/01/70 00:00 | |
| RE: i2c and spi with aduc812 | 01/01/70 00:00 | |
RE: i2c and spi with aduc812 | 01/01/70 00:00 | |
| RE: i2c and spi with aduc812 | 01/01/70 00:00 |



