benny226518
New Member
Good Evening All,
I'm trying to use the XL24C16 16,384 bit (2048 x 8) EEPROM with a 28X2. This device ignores the address pins (must be tied low regardless) so it is the only one on the board. According to the data sheet, the first four bits of the address must be %1010, the next three determine the "page" to be selected (the addressing is such that the IC is accessed as 8 x 256 byte chunks), with the last determining whether we write to (0) or read from (1).
So, to write to the device, I'm using the following:
hi2csetup i2cmaster, %10100000, i2cfast_4, i2cbyte
This addresses the IC's lower 256 byte chunk in write mode. No problem so far.
When I'm setting up to read from the device, the last bit must be 1, so:
hi2csetup i2cmaster, %10100001, i2cfast_4, i2cbyte
Now the compiler complains "Syntax check for PICAXE 28X2 / 40X2 failed. Error: Please use the full 8 bit slave address address (with bit 0 clear).
Can someone explain why the compiler won't let me set the device into read mode??
Benny
I'm trying to use the XL24C16 16,384 bit (2048 x 8) EEPROM with a 28X2. This device ignores the address pins (must be tied low regardless) so it is the only one on the board. According to the data sheet, the first four bits of the address must be %1010, the next three determine the "page" to be selected (the addressing is such that the IC is accessed as 8 x 256 byte chunks), with the last determining whether we write to (0) or read from (1).
So, to write to the device, I'm using the following:
hi2csetup i2cmaster, %10100000, i2cfast_4, i2cbyte
This addresses the IC's lower 256 byte chunk in write mode. No problem so far.
When I'm setting up to read from the device, the last bit must be 1, so:
hi2csetup i2cmaster, %10100001, i2cfast_4, i2cbyte
Now the compiler complains "Syntax check for PICAXE 28X2 / 40X2 failed. Error: Please use the full 8 bit slave address address (with bit 0 clear).
Can someone explain why the compiler won't let me set the device into read mode??
Benny