byte hibyte = (addr >> 8) & 0xFF ; byte lobyte = addr & 0xFF ;
@ MarkSo, in other words, if I want to point to a certain address in decimal fromarduino IDE, I can do it, providing is a multiple of 16? In fact, I had to split it in two (high -low). However, when I bitwise (as in your exemple) the address shall be converted from decimal to binary before splitting?
No. You are confusing external and internal representations of the address. In the Arduino's variable itsrepresented in binary, it has to be, that's all the hardware can do.Anything decimal or hexadecimal is a printed representation for human use, not relevant to drivingan EEPROM via I2C.
The 2 Bytes that specifies the address may not suffice for all potential addresses in the 256 kB chip?
@ MarkI got that - internal is binary.The point is the variable to store the binary address in my code, in IDE - could that be decimal?