Close

^6 I2C1 Checked With i2c-debug

A project log for RPUadpt - a shield for multidrop serial over CAT5

Serial mezzanine with management for host to one or many targets.

ronald.sutherlandronald.sutherland 07/14/2018 at 06:170 Comments

BlinkLED allows the I2C1 port (e.g. the secnond I2C port on ATmega328pb) to interface with a host SBC.

The i2c-debug firmware can be used to test the I2C1 port, its address is at 0x2A. The Uno clone running i2c-debug has another I2C interface at 0x29.

picocom -b 38400 /dev/ttyUSB0
...
Terminal ready
/0/iscan?
{"scan":[{"addr":"0x29"},{"addr":"0x2A"}]}
/0/iaddr 42
{"address":"0x2A"}
/0/ibuff 0,3
{"txBuffer[2]":[{"data":"0x0"},{"data":"0x3"}]}
/0/iwrite
{"returnCode":"success"}

blinking has stopped

/0/ibuff 0
{"txBuffer[2]":[{"data":"0x0"}]}
/0/iread? 2
{"rxBuffer":[{"data":"0x0"},{"data":"0xFC"}]}

Note: I incuded the command byte befor reading the data because I think that is what SMBus does.

^6 I2C1_Checked_With_i2c-debug

Discussions