PCF8574 I2C-Testboard (TWI-Testboard)

2016-01-28 12:08  
Declaration:We aim to transmit more information by carrying articles . We will delete it soon, if we are involved in the problems of article content ,copyright or other problems.



Getting to know a BUS is quite crucial nowadays, specially if run out of pins and have plenty of devices you want to operate.
Surely one could go with multiplexers or shift-registers, but a BUS is the most versatile...

I came into contact with a BUS the first time I really needed it, which was when I was on my thesis.
There were plenty of relays that had to be switched on different boards that were connected over a backplane. Furthermore there were different voltages that had to be observed.
And that's the point where a BUS comes in handy.

And so I developed a I²C-Testboard, which actually could simulate the switching of relays.

Click the picture for a large view

The I²C-IC on the board is the portexpander PCF8574 which is capable of serving as an input or output to the I²C-BUS.
Unfortunately the outputs are high-level when not initialized. That where the inverter IC
74HC(T)04 comes in.
I prefer to drive loads low-side and that is why the ULN2003 (a 7x low-side driver) is fixed to the LED-block.
The LEDs 0 to 5 (1 to 6 on the ULN2003) simulate a bunch of relays and the LEDs 6 and 7 (on the outputs of the PCF8574) are more or less just for fun.

Since the digital part of my thesis is designed around an AVR-ATMega16 Microcontroller my Kanda STK200 Starter-Kit came in handy.
I could simply connect my Kanda-board with the I²C Testboard which would power it up and route the portpins from the starterkit to the I²C-board.
There I could chose by two wires (three if an I²C interrupt is required) which portpin should be used as the I²C BUS.
The three jumpers on SV4 determin the address of the PCF8574.

The BUS is only the red and the blue wire.
The black one is not used.

You can download a zipped .HEX file here that operates the I²C BUS software-based on PORTD.2 (SCL) and PORTD.3 (SDA) on an AVR-ATTiny2313 with 4 MHz.
Additionally a LED flashes on PORTB.7 every time a I²C message is sent.
The Board ist actually a ectched single-sided one, but I ran out on single-sided ones, so I had to improvise a little.

Project tools:

·    KANDA AVR Starter-Kit


·    ATMEL AVR-Studio4 or BASCOM-AVR

·    ATTiny2313 Microcontroller

·    Eagle-Layout Editor

·    ICs: PCF8574A, ULN2003, 47HC(T)04

·    Components