??? 05/31/08 07:41 Read: times |
#155315 - take a note of Responding to: ???'s previous message |
Dear Gary,
Though exact method differs from part to part There are few necessary initialisations needed in almost all parts. 1. Disable Interrupts (clr EA : this line is missing in above code posted by you) 2. Initialise A, R1 & a pointer registor(DPTR in above case & EPTR for my part i.e. P89C669) 3. Call to the API entery point (lcall 0xfffo). 4. Also it is good practise to check value of A to check success. These are few points for almost all parts supporting IAP. Some parts may need additional initialisation. Also note that before writing to Flash, you need to ERASE it (for page length refer datasheet) (if you dont do this, you may read wrong value) If I donot erase page & program a byte, then in case of my part it ANDS NEW VALUE WITH PREVIOUS e.g. if previous value is 0xE4 & I try to write 0x07 then on reading I find it 0x04 (0xE4 & 0x07) This is the effect of not erasing in case with my part P89C669, read datasheet for your part. |
Topic | Author | Date |
Atmel 89C51RC2-UM and IAP | 01/01/70 00:00 | |
Check the datasheet of 89c51rc2-um | 01/01/70 00:00 | |
Erase the FLASH First? | 01/01/70 00:00 | |
take a note of | 01/01/70 00:00 | |
there's a difference between Atmel and Philips... | 01/01/70 00:00 | |
add that one to webster :) | 01/01/70 00:00 | |
looks good | 01/01/70 00:00 | |
Duh! I confused RAM and XRAM! | 01/01/70 00:00 | |
Now I can't get Erase Block working![]() | 01/01/70 00:00 |