PDA

View Full Version : I2C on two different channels



garret
- 10th June 2004, 18:57
hi all. I am using some max6956 chips with a 16f877a. There is a limit of 16 addresses with the 6956. I need to run towards 18 or so.
The question is....can I use two I2C channels with PBP and use 4 pins.
Once having declared I2C on two pins, does that exclude new I2C statements that will be put out on another two pins.
I hope I have explained well enough. Any and all help is entirely welcome...Garret

atomski
- 11th June 2004, 07:29
Originally posted by garret
hi all. I am using some max6956 chips with a 16f877a. There is a limit of 16 addresses with the 6956. I need to run towards 18 or so.
The question is....can I use two I2C channels with PBP and use 4 pins.
Once having declared I2C on two pins, does that exclude new I2C statements that will be put out on another two pins.
I hope I have explained well enough. Any and all help is entirely welcome...Garret
Absolutelly,

Just add two more variables e.g.

SDA1 VAR Portx.x
SCL1 VAR Portx.y

SDA2 VAR Porty.x
SCL2 VAR Porty.y

... and call them with your I2CREAD/I2CWRITE statements.

--
Sincerest regards,

YZ7REA Vladimir M Skrbic
4N7ATV Repeater Administrator
YU7GHZ Radio Club President

garret
- 11th June 2004, 17:00
thanks for the good news. I was hoping that this was the case. If not i would have had a real difficulty.
I have two 16x16 led arrays and i want to drive each led with direct address control. I have tried mulitplexing the arrays, but the cpu time gets in the way of clean viewing. The Max chips give me an address for each led and one large I2C write refreshes the entire screen. The only problem is 30 addressable leds per chip. Thats alot of chips. The two I2C lines are necessary. Thanx for the good news. I shall be trying it soon. Anyone with ideas on how to drive led arrays very cleanly without scans or multiplexing etc...please feel free to join in. It is amazing that there are so few solutions out there for led arrays.....Garret