Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com 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.

High TECH C--16f628A--EEPROM usage in order to prevent data loss on power down

Status
Not open for further replies.

bayabi

Newbie level 6
Joined
Jan 28, 2011
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,392
Hi all I began programming in High TECH C recently. I made an easy code in order to test myself. E.g. my count increases with every passing 5 seconds. The code works well.
Now I want to use EEPROM to save the data in every 500 counts. Then even if there is an power down it will not lose all the data.

*What should I do in order to succeed this in High TECH C?
*I want to make EEPROM to overwrite the data on the previous data? E.g. when the value on EEPROM 5, it will erase it and write 6 on the next 500 counts. Can i do this?
*At last I am not very familiar with activating EEPROM and etc. on High TECH can u give me hints about registers?

Thank you for your care..
 

Hi,

First remember that any PIC can erase and write only 100000 times. Your 500 count happens at what time period is important. You can write the values in the eeprom by assigning the count to a variable. At the end of the 500th count invoke write eeprom. You can read by invoke read eeprom. You don't require special programming for this Hi-Tech has built function or you can also call assmebly code within your c code. Please refer to Micochip document on this.
Thanks

---------- Post added at 15:50 ---------- Previous post was at 15:47 ----------

sorry for that type error it is 1000000 and not 100000.
Thanks
 
  • Like
Reactions: bayabi

    bayabi

    Points: 2
    Helpful Answer Positive Rating
Thank you ver much it was easier than i thought
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top