Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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
 
pohtai2020 said:
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.

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.

New Articles From Microcontroller Tips

Back
Top