I2C serial and expansion


Author Message
stuarts

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 199
Posted: 09:18am 29 Jun 2011      

I've currently got 2 DS1631Z thermometer chips running on my maximite. The I2C has been bitbanged using basic. Its not really fast, actually its quite slow. But it is working.
I've looked at a Philips I2C UART that emulates a 16C450 UART. I has 64 bytes of FIFO for send and receive. Just haven't bothered to find one yet. At the speed that I can get with I2C from basic, it would only allow very low speed comms.

The other IC I've been looking at is the Maxim DS2482 I2C to 1wire bridge. The timings on 1wire are way too tight to do from basic, but the bridge will allow 1wire to be run from I2C.

I've previously used the SN8574 to provide button and led from I2C as well as driving 16x2 LCD from I2c. It's a great way to provide remote I/O.

Next on my list is an RTC. I have several different ICs from different vendors, its just a matter of deciding which one to use.

The difficulty is that while the I2C protocol is nicely defined, every different I2C IC needs different requirements. Some just want a device address and a command byte, some need device address, command, address within the device and data either send or received. Its not just as simple send a byte to the device.

I've worked with several basics that made assumptions like the I2C device is a memory and therefore wanted addresses and data supplied when I just had to send one byte to a register.

At the moment the code I have is rough and tied to the DS1631. I'm hoping that I can clean it up and make it easily usable on any pins on the expansion connector. I'll then release it for anyone to use as it seems it might be a while before I2C is natively supported on Maximite.

Stuart