Electronics > Beginners
Wall touch light switch, EEPROM, I2C
Manx:
I'm trying to adjust sensitivity of my friend's wall touch light switch.
And I'm dumbfounded.
There is HD6001 touch IC http://www.hab.com.tw/upload/2013879261133084.pdf.
There is our usual Atmel EEPROM. http://ww1.microchip.com/downloads/en/devicedoc/doc0180.pdf.
Also, there is something which has to be a RF receiver, which doesn't interest me.
I thought the EEPROM would keep settings for the device. I dumped it's content (whatever is the meaning of it).
--- Code: ---FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF 00 FF FF FF
22 0D F9 93 FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF 40 FF FF FF
14 FC A9 E2 14 AF 43 90 FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF 84 FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
--- End code ---
But when I read the touch IC datasheet (a Chinese flavor of a datasheet style, but not too bad), it seems that it can communicate over I2C only as a slave. And there is the eeprom. So we have two gearboxes and no engine. And indeed, there is no communication over I2C bus when the switch is powered up or buttons are pressed (I don't have a compatible remote to check if anything changes when I'd program one).
The touch IC supposedly has some registers to control its settings, but I cannot find the IC on the I2C bus to communicate with it. It doesn't help that the I2C address is kept in one of the registers. But anyway, a scanner doesn't find it.
Could anyone help me make heads or tails of it? Why the eeprom? How to talk to the touch IC?
Kjelt:
Check the RF board if there is some processor on it ?
I have seen BT remote switches where the BT transceiver micro is the only micro on the board, but if you do not see any I2C communication at startup or use it is a puzzle.
EDIT: the HD6001 is a microcontroller, check if the SDA and SCL lines are connected to the eprom, probably not.
As you said those are for remote host control. So the programmer can use any of the I/O ports to bitbang I2C to the eprom ?
Just see what the SDA and SCL of the eprom are connected to what pins on the micro.
Manx:
RF board has some tiny 6 lead IC marked H01 (followed by 6 lying on its back). I couldn't find anywhere any corresponding IC which would make sense. Remote control is supposed to be over 433.92 MHz. I don't know how smart these are. Anyways, the I2C lines don't go to the RF board.
But the I2C lines ARE properly connected between eeprom and HD6001. This was the first thing I checked and so I expected the touch IC to talk to the eeprom, before I read the rest of the datasheet.
EDIT: Also, I2C doesn't seem to go anywhere outside the board. Neither to the HV board connector nor to the unpopulated group of pads I used for connecting power. So it's not like it's supposed to be used by an external programmer or some missing additional chip.
I have no idea what this is about.
EDIT:
Ok, so I was right suspecting the eeprom may have something to do with remote control. It turns out the switch works with my remote. And when I press a button on the remote, whether one paired with the switch or not, raw data goes from the receiver to pin 9 of the touch IC, and some chat ensues over I2C.
So this would mean that: (1) it's not true that HD6001 cannot work as I2C master, (2) the eeprom is used for remote control and (3) I still have no idea how to communicate with HD6001 and modify its registers.
Kjelt:
Did you read my Edit ?
Probably the microcontroller uses two different GIOports to bitbang I2C with the eprom.
You can program the microcontroller through the original I2C pins as per datasheet specified, they are also probably connected to that header or some other pads where the micro is programmed.
Manx:
Ah, ok, bitbang. I'm starting to get what you mean. But anyways, these are the same I2C pins. Eeprom connects to pins 5 and 4 (marked SDA and SCL) of the touch IC. This was elegant on the part of the designer, but this is what confused me. Sice, I guess, it turns out the pins are used as normal GPIOs and their I2C functionality is bit banged.
In such case there would be no (apparent) way to modify touch IC parameters, like sensitivity, which doesn't make me happy :/ I played with programming more buttons, and the eeprom stores only a list of remote keys assigned to each switch button (plus address of last item on the list for each button). So no calibration data in the eeprom :/
Navigation
[0] Message Index
[#] Next page
Go to full version