And because you can have more than 100 I2C devices on the same bus, you could theoretically control upto 1500 digital input/output devices.. if you could afford that many...There's also one pin with PWM functionality, and this description by no means covers all of it's functions, so check it out.

http://www.byvac.co.uk/bv/bv4206.htm

Also as mentioned in a previous post, you can get small boards from the same place that control LCD modules through I2C.http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1220386069

After some troubleshooting, I've found that the manual and the website present all the default ID codes as 8-bit, and they say you can only use even numbers... In Arduino the addressing is using the 7 main bits, essentially doing the same thing but when addressing them you have to shift the addresses left one bit when using them in 8-bit format.In the manual it says the default address is 0x42, which is actually 0x21 in the 7-bit mode that "Wire.h" uses.

I'm posting the code I use to talk to the BV4206, as I think it might be useful for other newbies like myself, as it took me a few hours to figure this lot out from scratch.This code basically just changes the default address and flashes the d0 pin on the chip (not on the Arduino).

It is because the least significant bit of the byte sent defines if it is read or write access. Every other system I have used uses that whole byte as an address with even addresses for read and odd for write access. On this system there are septate calls for read and write and so the address you have to supply, as stated, is shifted one place to the right.

It's OK when you know but this is a case of this implementation being different to every other one I have seen. Mind you I haven't seen them all.

The docs of the pcf8574 and pcf8574a datasheets show the 7 bits and R/!W. It made enough sense I could figure out how to get the test circuit working okay. I'd seen the Wire docs previously so maybe it didn't confuse me as much as I thought it would.

These devices have four address bits that are hardwired and unchangeable, three address bits that you jumper to three pins, and then the R/!W bit.

What did throw me though, I thought I ordered pcf8574 and got pcf8574a. The only difference between these are the constant value of the four hardwired address bits. And the silkscreening on some packages is very very dim, so I didn't see the problem when I made a test circuit. I had to write a loop to try all addresses...

I'm posting the code I use to talk to the BV4206, as I think it might be useful for other newbies like myself, as it took me a few hours to figure this lot out from scratch.This code basically just changes the default address and flashes the d0 pin on the chip (not on the Arduino).

I bought two of the LCD-controllers, which I believe is the same chip as yours. However, all attempts to communicate with the controller fails. The chip works, as the LCD is displaying the controller's welcome message.

What happens is that Wire.begin(), Wire.beginTransmission(0x21) and the subsequent Wire.send()-calls seems to be successfull, but the closing Wire.endTransmission() never returns. Nothing happens on the LCD either.

I've wired the controller's SDA (pin 13) to analog 4, and SCK (pin 11) to analog 5, using a 5k6 pull-up resistor on each line. How did you wire your chip?

Try running a loop to talk to all 127 possible addresses, maybe it'll respond to an address you think it isn't programmed to.

The problem is that Wire.endTransmission() never returns, so I can't use a loop. I need to reset after each call. I'm not sure if this is because I'm trying to access a non-existing device (using wrong address), or if there's some other reason.

What happens is that Wire.begin(), Wire.beginTransmission(0x21) and the subsequent Wire.send()-calls seems to be successfull, but the closing Wire.endTransmission() never returns. Nothing happens on the LCD either.

Replacing the controller with another one did the trick. So now I have a 20x4 i2c LCD-display for $6 I also have a few 40x2 displays I will try later.