You need to log in to create posts and topics.

EEPROM in pic16f876 no write/read

I want to write a float system for watering a greenhouse.

But I encountered a problem.

EEPROM is neither read nor written.

Trusted on different versions and OS (win 11 and linux)
-) simulide1(1.1.0)
-) simulide1(2.0.0)

I use SDCC as the compiler.

In another similar program, everything works.

 

Uploaded files:

Hi. Thanks for reporting.

With all the files you provided I could find the problem very easy.
And the good news is that you can fix it yourself while files are updated.

In SimulIDE open file explorer tab.
Click on "Settings" bookmark.
Navigate to components/PIC/PIC/p16F87x
Double-click on p16F87x_perif.xml

The file will open in the Editor.
Then add this at line 71 and save:

  <rom name="ROM" configregsA="EECON1" configregsB="EECON2"
                  dataregs="EEDATA" 
                  addressreg="EEADR"
                  interrupt="EEPR"/>

Now open your circuit and test.

isLex has reacted to this post.
isLex