Jump to content
Sign in to follow this  
Yuanming

C programming with C2C-plus compiler

Recommended Posts

Hi, all:

I am trying to use C language to write and read internal EEPROM on 16f877 to store some information, but it can not working. I have did it for a whole week,But both read and write is not working, I open EEPROM Windows in MPLAB, each byte is 0xff.

I use C2C-plus IDE, MPASM and MPLAB IDE. I think program maybe no problem,( I  use the sample in http://www.picant.com/c2c/examples/eeprom.html ) ,

is it necessary to set CONFIG register ( address: 0x2007) CPD ( Data EE memory code protection bit), and I don't know how to set it as 1.

 

Thanks in advance for your time.

 

Yuanming Lu

Share this post


Link to post
Share on other sites
Guest [M.o.U.]

actually your programming system, the software with which you programm the hex-file onto your PIC must be able to set this bits. the user can't access this address in mplab etc..

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...