I2C on a NSLU2
From Ywiki
Contents |
Hardware
This page shows how to use the internal I2C hardware of the NSLU2.
Hardware modifications
The I2C ports are available on the RTC chip on the baseboard. This is an X1205 in an SO-IC package. See data-sheet for connection details. I used an RJ-45 connector to take the I2C and power out-side. This connector is place next to the network connector. On the base usually a crystal is placed on that location, but I moved it to the bottom of the PCB. Note: the RTC has an operating voltage of 3v3.
Software
The factory firmware does not support anything we want. (ssh gcc etc.) So I upgraded my NSLU2 to DebianSlug 3.10 Beta. I know there is a newer version released, but in that version no gcc compiler is yet available. If you have succesfully flashed this firmware you should as first step turnup your NSLU2, follow instruction on this page. Be absolutely sure you have turned up your NSLU2 or the following steps will trash it.
install the native compile environment.
ipkg install slugos-native ipkg install libc6-dev
This will take a while. If it failes try "ipkg update" first.
Master
The NSLU2 is the master on the NSLU2 bus. This code is used to communicate with the PIC microcontroller.
Slave
The PIC is the slave on the bus. The source can be found here
Software to communicate with a PCF8574 and a LM75, are currently kind of working, to be described soon.
