jani20
Joined: 14 Nov 2006 Posts: 14
|
Controlling MAX7311 I2C port extender |
Posted: Sun May 13, 2007 3:57 am |
|
|
I want to set MAX7311's 16pins to input, read the pins values to
port1, port2 byte variables, then set MAX7311's pins to output
and send out these 2 variable in reverse order: port2,port1.
I2C control must be software driven.
Slave device (MAX7311):
I2C address is: 0x40 (64 dec)
max 400kbit/s I2C
http://datasheets.maxim-ic.com/en/ds/MAX7311.pdf
The master device:
PIC16F690 @ 20Mhz
CLK:RB6, DATA:RB4 @ each pull-uped with 4k7 resistor
Plase help me to write the code, Im not an expert in I2C.
Thank you! |
|