Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Adding EEPROM to PIC16F877

Not open for further replies.


Junior Member level 3
Dec 16, 2002
Reaction score
Trophy points
Activity points
pic16f877 external rom

hi all
I want to add external memory to PIC16F877.I have got to know that i can do using I2C EEPROM . Can ne1 tell me the details like

1. How much external memory can a PIC16F877 support?
2. How do i attach the memory?
3. Is there any other way to slove "NOT ENOUGH RAM" Problem?

Ne help will be highly appreciated.


pic16f877 #device *=16

I don't know PIC controllers, but I2C EEPROMS are generally used for data storage. Because they have serial interface (connected to hardware or software i2c port in the controller), you don't have to connect i2c chips in normal adress space.

adding external eeprom to pic16f877

1. If your "memory" mean RAM then I think that 16f877 doen't support external ram or rom,AFAIK.

2. If you just want extra data storage then you can connect up to 8 i2c EEPROMS to the i2c port.

3. The only way I can think of is to optimize your code. If you're using C compiler then you might have to play around with how you used variable. Also try to turn on optimize option. If you don't need to use a lot of memory all at once then you might be able to swap it to internal/external EEPROM.

If you REALLY need extra ram and cost doesn't matter then I'd suggest you to look at 18F series. 18F458 come with 768bytes ram and doesn't cost much more than 16F877 here. From data sheet, it's almost pin to pin compatible with 16f877. However you will need new tools to work with it.

reading external eeprom using pic16f877a

You need to set the 16bit pointers:

#device PIC16F877 *=16

If you already did you can add I2C ram (is faster than EEROM) but is more work to acces in your program.

i2c eeprom write in pic16f877a

Hi Drshoe,

What compiler support it? Does it work with Hi-Tec C? I never know about that trick before. Thank you for your tips.

connect eeprom to pic16f877

you can also write and read internal flash program memory
during program execution. f877 has 8Kx14bit flash memory.
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to