Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Use of eeprom

Status
Not open for further replies.

Mosaic

Well-Known Member
Can anyone give examples of the uses of EEprom in a PIC MCU? Is it a matter of being able to change data without tampering with the code?

Or if the MCU is a one off type, it is used to update lookup tables etc?

Any tutorial links on how to access and use the eEprom data?
 
Last edited:
You can use it for any non-volitile storage you wish - simple examples would be storing a password or entry code, remembering the output voltage in a power supply - or in the case of one of my tutorials which uses it, which output pins are set high or low in a multichannel remote control system.
 
Hi Mosaic,

As one example, I use sixteen EEPROM frequency-to-band data "memories" in my PIC based Amateur radio Antenna Selector. The Antenna Selector monitors a 1-wire Icom CI-V serial buss looking for "frequency change" broadcasts from my Icom transceiver (which occur when you move the tuning dial or change bands, etc.).

The Antenna Selector compares the frequency in its frequency-to-band data "memories" to the frequency contained in the "frequency change" broadcasts and will energize the correct antenna change-over relay to match the band. Basically, when I switch from the 40 meter band to the 20 meter band on my radio, my Antenna Selector automatically changes over from my 40-meter rotatable dipole to my 20/17/15/12/10 meter Quad by energizing the correct change-over relay.

The Antenna Selector frequency-to-band data "memories" are contained in EEPROM so that they can be changed easily if you change antenna configurations.

Regards, Mike
 
Last edited:
Can I write to 16f886 EEProm directly with a pickit2? I'd like to put in a big chunk of data so the code can read from it and update it as necessary for the next use.
 
Can I write to 16f886 EEProm directly with a pickit2? I'd like to put in a big chunk of data so the code can read from it and update it as necessary for the next use.

Yes, just locate it at location 0x2100.

Mike.
 
I think you're mixing up EEPROM and program space.
EEPROM is a relatively small number of bytes which can be read and written through special routines. They are designed for large numbers of rewrites. They cannot be read like constant data in program space and do not have addresses mapped as part of prog space. Programmers can also put constants into EEPROM space for you, or leave it alone.

Program space can also be rewritten by any device capable of self-programming, provided security features do not prevent it. This is risky, however, if there's a glitch the program itself could be damaged which "bricks" the device. Program space can only be written in whole blocks, unlike EEPROM which can be written byte-by-byte.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top