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.

Writing to EEPROM

Status
Not open for further replies.

Suraj143

Active Member
In my number display project i'm entering numbers one by one from a keypad.after entering each number i save that number in GP registers.finally when i press "save & exit" key the whole numbers which is in GP registers are writing to EEPROM.

Do i need to store them in GP registers?why cant i directly write to EEPROM without saving them in GP registers?
 
You've got to save them somewhere - where else would you suggest?.

You 'could' write them individually to EEPROM immediately after each number has been entered, but what advantage would that give you?.

Assuming you want a 'save and exit' routine, why do you have a problem with using GPR's - thta's what they are there for, it's RAM.
 
You 'could' write them individually to EEPROM immediately after each number has been entered, but what advantage would that give you?.

Because I ran out of GP registers.That's why I planned to write to EEPROM directly.If the user is entering 100 numbers then you need to find 100 GP registers.if it is 50 numbers then you need 50 GP's

Is it ok directly writing to EEPROM?
 
Use a more capable PIC with more GP registers.

OK, you could save each number one by one, but if the operator gives up part way though, then the EEPROM will contain some old and some new numbers.

What are these numbers? If they are single digits each in the 0 - 9 range, you can store 2 in each EEPROM location.
 
Because I ran out of GP registers.That's why I planned to write to EEPROM directly.If the user is entering 100 numbers then you need to find 100 GP registers.if it is 50 numbers then you need 50 GP's

Is it ok directly writing to EEPROM?

hi,
You can write directly to EEPROM if required, which PIC type are you using .?
 
Hi Eric I use PIC16F88.I left only bank 2 & 3.I have 192 free GP registers.But I like to give a round figure like 200 or 250.

Earlier I did saving the input numbers in these 192 RAM registers by messing up IRP bits & bank bits.But 192 its an odd value for me.

That's why I like to write to write to EEPROM so you can say to the user the maximum numbers you can enter is 250.
 
OK, you could save each number one by one, but if the operator gives up part way though, then the EEPROM will contain some old and some new numbers.

A good point, I have a byte called "string length" byte that I'll write to the 00h location in the EEPROM.This byte will stop reading the locations with old data :)
 
Hi Eric I use PIC16F88.I left only bank 2 & 3.I have 192 free GP registers.But I like to give a round figure like 200 or 250.

Earlier I did saving the input numbers in these 192 RAM registers by messing up IRP bits & bank bits.But 192 its an odd value for me.

That's why I like to write to write to EEPROM so you can say to the user the maximum numbers you can enter is 250.

hi,
Are you using assembler.? if yes then post your full program and we can add an EEP write/read option.
 
Hi Eric I don't have a code problem I can write the code.

With PIC16F88 its very hard to store data in GP RAM because they are split in all 4 banks.When you are going to save it gets hell of a mess to do in the code even with indirect addressing.

That's why I planned to write to EEPROM directly & call them directly from EEPROM.When the PIC is runing the normal code it always reading EEPROM data & showing the Numbers.

Is this ok?
 
Hi Eric I don't have a code problem I can write the code.

With PIC16F88 its very hard to store data in GP RAM because they are split in all 4 banks.When you are going to save it gets hell of a mess to do in the code even with indirect addressing.

That's why I planned to write to EEPROM directly & call them directly from EEPROM.When the PIC is runing the normal code it always reading EEPROM data & showing the Numbers.

Is this ok?

hi,
I dont see any problem with writing directly to EEP especially when when you are entering the numbers manually, which is slow anyway.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top