Same as the write, you do a read
for a= 0 to 13
read EE_Ph1+a, Ph1[a]
next
will read from The EEPROM to RAM
Same as the write, you do a read
for a= 0 to 13
read EE_Ph1+a, Ph1[a]
next
will read from The EEPROM to RAM
I did as advised, I also changed the code to send me a text back with the what is stored in it after I send 3 text with 3 numbers at 3 locations.
The problem is with the first location only - the number stored at location one is "00078xxxxxxxx".
Its only the first 3 digits getting stored as "000" instead of "+44"
Thanks
P.s- My PIC is reseting itself automatically, I have an 2.2K between Vdd and MCLR.
Last edited by financecatalyst; - 19th October 2009 at 22:17.
___________________
WHY things get boring when they work just fine?
I did the same process again with my original ph1 var byte[]13 only, results are the same. Also when I send another messege the previous number should be replaced at the location specified (Yes, it does enters to write the new number as led does toggles) , BUT its not happening as well. I also tried the following approach where I replaced all locations with "0" before writing the number :
for a=0 to 12
write a,"0" : pause 40
write a,num[a] : toggle red : pause 700
read a,ph1[a] : pause 40
next a
Still no luck.
Last edited by financecatalyst; - 19th October 2009 at 23:49.
___________________
WHY things get boring when they work just fine?
Looks like you're overstepping your variables boundary. Do a check on the array indices for each array variable that you write. Maybe you're writing more than it can hold and it overwrites the following variable. Variable in point is Num[13] in this case.
What I mean is you should check that if your variable is an array of 12 bytes, you should not be writing more than 12 bytes to it. If you do, you are overwriting another variable in memory which follows the one you are writing to.
Ok, I think I have got your point. I read somewhere that it is advisable to write "0" to all EEprom locations before attempting any write statement. Is it true?
I will otherwise remove statements writing "0" to locations before an sms is received and after and sms is processed and system is ready to receive the new one.
Also I wonder why ph1 locations 0 to 12 gets first 3 digits as 0. As far as overwriting is concerned there are no locations -3,-2,-1 for me to make a mistake and shift 3 places forward?
___________________
WHY things get boring when they work just fine?
Bookmarks