|
|
View previous topic :: View next topic |
Author |
Message |
Doglao Guest
|
write_program_eeprom() problems |
Posted: Mon Mar 26, 2007 6:49 pm |
|
|
Hi I'm Douglas I try to write in the program memory using write_program_eeprom(1860, 0x1010) function but the line that is the first parameter was not the value line changed that appear in the program memory, the affected line is 1861 and follow write three address more in secuential like this:
line 1860 was not written,
line 1861 wrote with 0x1010 ,
line 1862 wrote with 0x1010,
line 1863 wrote with 0x1010,
line 1864 wrote with 0x1010
and this is not ended, when I try to read this lines I can't read anything as you can note in this line read_program_eeprom(1860) is natural that line don't read the correct value because the write_program_function don't write in this address. Then, when I change the address in function myVariable=read_program_eeprom(1861) nothing is read and the variable have the same value before this reading attempt.
what is a problem in this case? thanks for any help!
Douglas |
|
|
KaraMuraT
Joined: 16 May 2006 Posts: 65 Location: Ankara/Turkey
|
|
Posted: Thu Mar 29, 2007 12:30 am |
|
|
As always asked: What is the concerning PIC and CCS version?
You should pay attention to Erase/write cycle... You "can't" write any value before erasing. And remember, you can not erase one byte of program eeprom (aka flash). The erase command will erase a block. And the block size depends on the PIC type you use... _________________ /// KMT
/// www.muratursavas.com |
|
|
Doglito Guest
|
write_program_eeprom() problems |
Posted: Thu Mar 29, 2007 3:57 pm |
|
|
Thanks for reply! the pic tha I use is 16f877A and the ccs version is 4.030 . but this task seem so easy to implement, I can't write correctly in memory program and read to. in the ccs c reference manual on the page 256 has a example that how to use this function, and don't have no suggestion of requirements to write beyond write_program_eeprom(adress, value);
and the same is to read_program_memory() ;
what I need in addtional to fix this? thanks
Douglas |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|