??? 10/27/10 16:49 Read: times |
#179371 - C or ASM? Responding to: ???'s previous message |
Hi J,
Here is some assembly code that will write to the 938 EEPROM: ;***************************************************************************** ; ; Write Internal P89LPC938 EEPROM byte ; Data byte in Acc. ; Start address bit 8 in r6, address bits 0-7 in r7 ; r6,r7 incremented by routine ; ; WriteIntEEPROM: push acc ;save data byte mov DEECON,r6 ;eeprom address (xxxxxxx8) mov DEEDAT,a mov DEEADR,r7 ;eeprom address (7:0) WMc: mov a,DEECON jnb acc.7,WMc ;poll for "EE write done" inc r7 mov a,r7 ;DEBUG next 3 statements NEEDED? jnz WMx mov r6,#1 WMx: pop acc ret ; ; ;**************************************************************************** ; Cheers, Bert |
Topic | Author | Date |
lpc900 eeprom external access | 01/01/70 00:00 | |
the only way is ... | 01/01/70 00:00 | |
Darn! | 01/01/70 00:00 | |
Any Takers? | 01/01/70 00:00 | |
C or ASM? | 01/01/70 00:00 | |
Nice! | 01/01/70 00:00 | |
Read internal EEPROM routine | 01/01/70 00:00 |