The Bus Pirate Demo Board has five I2C devices: two 24AA02 EEPROMs (2 KBit), one TC74 temperature sensor, one MCP4725 D/A Converter, and one DS1307 Real-Time Clock.  This post is about the EEPROMS and the TC74 - next week's post will be about the D/A converter and the RTC.

Pull-up Resistors & Connections

One thing that is not documented well enough for non-engineers is the pull-up resistors.  They are pretty important for I2C devices and results can be weird.  What needs to happen is to have BOTH the 5V and pull-up lines to the Vin pin on the demo board.  I used a breadboard for now, although I have a different Bus Pirate cable on the way to make this a little easier.

In both the cases in this post, the CLK pin on the Bus Pirate gets connected to the SCL pin on the demo board and the MOSI pin on the Bus Pirate gets connected to the SDA pin on the demo board.


Both of the EEPROMs are interfaced the same way.

Search for the EEPROM Addresses:

Screenshot 2014-03-14 23.44.59

(1) is the address search address

Screenshot 2014-03-14 23.47.21

[0xa0 0 3 2 1] - 0xa0 is the address to write to, 0 is the location in that address (the top), and 3, 2, and 1 are the values being written.

Screenshot 2014-03-14 23.47.51

[0xa0 0][0xa1 r:3] - 0xa0 is the address, 0 is the location in the address.  0xa1 is the read command, and r:3 indicates to read three bits.

Screenshot 2014-03-14 23.49.39

[0xa0 0xfa][0xa1 r:6] - this is to read a MAC address from the chip.  Unfortunately, I can only seem to get all F's from these chips... I'm not sure if I'm doing something incorrect or if the chip's spec has changed since the instructions on Dangerous Prototypes were written.

As a final test, I cut the power to the board (w) and turned it back on (W) and read the chip to see if the values were still there.  They were.

Screenshot 2014-03-14 23.50.51

TC74 Temperature Sensor

The TC74 Temperature Sensor is an interesting device to use.

Screenshot 2014-03-15 00.06.18

(1) - standard address search macro

Screenshot 2014-03-15 00.07.33

[0x9a 1] - 0x9a is the address, 1 is a value to write.  We don't really care what it writes, we just need to do this to read the chip.

Screenshot 2014-03-15 00.09.30

[0x9a 0][0x9b r] = 0x9a is the write address, 0 is a partial command to select the temperature register, and 0x9b r reads the register.

The value returned is 0x16, which is 22°C, or 71.6°F. week - more I2C goodness!


Category: Equipment

About the Author

Andrew is the owner of this blog and enjoys computer programming, building things, and photography. He's a pretty busy guy, which explains why updates to this blog are so infrequent.

Comments are closed.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

%d bloggers like this:

This is the new server