Address bus IIC I2C.

MLPINTO

New Member
I recently purchased a IIC I2C adapter for LCD, through ebay.
The direction indicating (the interface has PCF8574A) is the 0x20, though
can be changed to 0x27.
But to control it with the 20X2 chip, through bus I have to do
necessarily by $ 4E.
Someone could give me the explanation?.
 

hippy

Ex-Staff (retired)
I2C device addresses can be specified as either 7-bit or 8-bit. The PICAXE uses 8-bit device addresses. An 8-bit address is the 7-bit address with a 0 bit concatenated to its right.

So, in binary, assuming the I2C address you have been given is 7-bit, which it seems to be ...

0x20 = 0100000
0x27 = 0100111

Append a 0 to the right ...

01000000 = $40
01001110 = $4E

"0x" and "$" are both prefixes which indicate a hexadecimal number.
 
Top