Found problem with a connection to the 24LC256 chip.
Apperently, the connection to the SCL (clock) line was not making contact to Pin 6 of the chips. After getting the connection to then, the circuit worked flawlessly.
Originally my story was that I used to use the PIC16F628A internal EEPROM memory, but when a new chip was inserted (programmed ), the count was lost.
So finally I relized that external Ram was the key.
Hooking up the 24LC256 in a SOIC package, I used the wrong connection (unused wire) to put pull-up on clock signal. After connecting the proper line to the chips, the circuit worked.
Here is a complete program and schematic for 24LC256:
See Attachments
Thank You
Bookmarks