I2C

Status
Not open for further replies.

pohtai2020

New Member
Hi,
I currently doing my final semester project with PIC16F877. I have problem with the 24C16. What should I change, if I am using your Tutorial 6.1 for my 24C16 chip. I try to change the line xorlw d'64' to xorlw d'512' but when I compile a warning stated that the argument is out of range and least significant bits is used.
 
Get the data sheets for both.
Compare the two, see what is different, and make the correct changes to the program.


Kent
 

The error is because you are trying to use a ten bit value (512) in an 8 bit register.

You need to read the datasheet for the EEPROM to see how you address more than 256 bytes.
 
For I2C device with small memory, it uses only 1 byte of address
For large memory, each address location consist of 2 bytes
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…