I2C for the 8051
I recently found a library (albeit small) that bit bangs the I2C protocol on port1 of a non-i2c 8051. This is GREAT!. I could now get my legacy development system to talk to some of the newer RTCC's, eeproms, and port expansion chips.
My first order of business was to get my dev board wired to a Microchip MCP7940N RTCC I've had laying around for a while. I was stunned when it worked the first time! Fascination ensued and I spent the rest of the day coding a menu system to read/write the clock chip with time and date, alarms, alarm trigger output, and the ability to turn the backup battery on and off. I'd like to share this code with anyone else struggling with I2C or the MCP7940N (or both). I'll have it bundled and posted shortly. (17SEPT11)
I needed a new development system for some time, so I started in on a new board using a Microchip PIC18F4550. Boards should be here today, I can't wait. I've ported the above code over to the '4550 and made use of the I2C module built into the chip. I have to say it's a lot easier, and the code that I wrote didn't need that much work, just the I2C routines needed replacing. I'll be posting a bunch of code and examples for this board soon, maybe a few pix while I'm at it ;)
--Dave