Home » Computers, Python » pcDuino – I2C Test
Mar
09

Today I connected up a my prototype board for an I2C experiment with the pcDuino. Blinky Lights!

YouTube video of simple I2C parallel port test using Python.

Using I2C

If you want to try interfacing with the pcDuino I2C yourself, you will need to install the software for using the I2C bus:

i2c-tools provides command line applications for checking and accessing i2c bus devices.

i2cdetect – scans an I2C bus for devices
i2cget – reads registers visible through the I2C bus
i2cset – writes registers visible through the I2C bus

python-smbus provides Python access to I2C (SMBus) devices.

Connecting PCF8574

Connect a PCF8574 I2C parallel port chip to the pcDuino I2C bus. For feedback, connect each of the outputs through resistors to LEDs. Be sure to connect power to 3.3 Vdc and GND. I connected the address select pins to ground (address 0x20). I can post a detailed wiring diagram if anyone is interested.

To verify your connections, use i2cdetect from the command line. It should show a single device at address 0x20 on bus 2 (the I2C bus available on the GPIO connectors).

Python

Python source code for testing the I2C bus will cycle the LEDs as shown in the video.

, ,

5 Responses to “pcDuino – I2C Test”

  1. dariush
    April 24th, 2013 at 04:40 | #1

    Hi,
    Thanks a lot for your excellent test.
    I’m really interested in the detailed wiring diagram if possible.

  2. April 24th, 2013 at 07:41 | #2

    @dariush I will add a simple schematic and wiring diagram this evening as a reference.

    Enjoy!
    Bill

  3. dariush
    May 12th, 2013 at 15:30 | #3

    @Bill
    Thanks a lot.
    I’m really grateful.

  4. dariush
    May 12th, 2013 at 15:38 | #4

    Did you add the schematic?

  5. Jovanov
    November 27th, 2014 at 00:19 | #5

    Hello Bill

    Great Job. Did you moved the schematic of the circuit? Or how can I get that? Can you please kindly share again?

    Jovanov

Add reply