??? 10/02/08 17:05 Read: times |
#158771 - 29F0x0 flashing problem |
Hello all, I made my own SBC to learn 8052, now trying to use an AMD 29F040-70 flash.
I wrote simple code that fails to write or erase: the data polling loop is endless. Reading from it is OK (previously written with an universal programmer). I checked the WE signal, writing to XRAM is OK. I am using a 80C31 (MHS) @ 11.0592 MHz and GAL20V8B address decoder. Did I miss something in the 29F datasheet ? Has anyone working code for 29Fxxx to share ? Thanks for any help. WriteFlash: PUSH DPH PUSH DPL PUSH ACC MOV P1,#0 ;high address bits 16-23 wired on P1 CALL FlashUnlock MOV DPTR,#0555h MOV A,#0A0h MOVX @DPTR,A POP ACC POP DPL POP DPH MOV A,MyDPH2 MOV P1,A ;set high address bits MOVX @DPTR,A MOV Scratch,A WFPoll: MOVX A,@DPTR CJNE A,Scratch,WFPoll RET EraseFlash: CALL FlashUnlock MOV P1,#0 ;reset high address bits MOV DPTR,#0555h MOV A,#080h MOVX @DPTR,A CALL FlashUnlock MOV DPTR,#0555h MOV A,#010h MOVX @DPTR,A EFPoll: MOVX A,@DPTR CJNE A,#0FFh,EFPoll RET FlashUnlock: MOV A,#0AAh MOV DPTR,#0555h MOVX @DPTR,A MOV A,#055h MOV DPTR,#02AAh MOVX @DPTR,A RET |
Topic | Author | Date |
29F0x0 flashing problem | 01/01/70 00:00 | |
Is it a new or used Am29F040? | 01/01/70 00:00 | |
Used Am29F040 | 01/01/70 00:00 | |
doesn't the programmer you use... | 01/01/70 00:00 | |
problems gone | 01/01/70 00:00 | |
good news - good job! :-)![]() | 01/01/70 00:00 |