The PIC16F877 has an onboard I2C hardware module that can be used to communicate and control I2C devices such as the 24LC64 EEPROM. In this tutorial, two 24LC64 EEPROMS share the I2C bus as slaves and the PIC16F877 controls the bus as the master. The PIC copies the information in source EEPROM [1010000] to the destination EEPROM [1010001] in 32 byte pages for optimal efficiency.
| Filename | Version | Description |
| tut19.pjt | 1.0 | MPLAB Project |
| tut19.asm | 1.0 | PIC16F877 Assembler code |
| copyFrom.csv | 1.0 | 24LC64 EEPROM Image in Comma Seperated Variable Format |
| copyTo.csv | 1.0 | 24LC64 EEPROM Image in Comma Seperated Variable Format |
| tut19.hex | 1.0 | Precompiled HEX |
| tut19.lst | 1.0 | Precompiled LST |
| tut19.vbb | 1.0 | Virtual Breadboard simulation |
Open tut19.vbb and press RUN.
|
|
TRISB/PORTB |
|
|
TRISC/PORTC |
|
|
TRISD/PORTD |
|
|
I2C MasterMode |
Components Used
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|