Eeprom 9s12dp256
This presentation is the property of its rightful owner.
Sponsored Links
1 / 19

EEPROM -- 9S12DP256 PowerPoint PPT Presentation


  • 112 Views
  • Uploaded on
  • Presentation posted in: General

EEPROM -- 9S12DP256. EETS4K Block Guide. EEPROM. MC12S-DP256 4 Kbytes of EEPROM $0400 - $0FFF $FEC – FFF used for autostart in CML 12S-DP256. ; STORE WORD D AT ADDRESS Y AND Y+1 EESTD TST ESTAT BPL EED3 STD 0,Y LDAA #$20 ;program word STAA ECMD

Download Presentation

EEPROM -- 9S12DP256

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Eeprom 9s12dp256

EEPROM-- 9S12DP256

EETS4K

Block Guide


Eeprom

EEPROM

  • MC12S-DP256

    • 4 Kbytes of EEPROM

    • $0400 - $0FFF

    • $FEC – FFF used for autostart in CML 12S-DP256


Eeprom 9s12dp256

; STORE WORD D AT ADDRESS Y AND Y+1

EESTD

TSTESTAT

BPLEED3

STD0,Y

LDAA#$20;program word

STAAECMD

LDAA#$80

STAAESTAT;launch the command

LDAAESTAT

BITA#$20;test PVIOL

BNEEED1

LDAA#$20

STAAESTAT;clear PVIOL

BRAEED3

EED1BITA#$10;test ACCERR

BNEEED2

LDAA#$10

STAAESTAT;clear ACCERR

BRAEED3

EED2LDAAESTAT;wait for command to finish

BPLEED2

EED3RTS


Eeprom 9s12dp256

; ERASE 2 WORDS AT ADDRESS Y to Y+3

ERASE

TSTESTAT

BPLERS3

LDD#0

STD0,Y;address in sector

LDAA#$40;erase sector

STAAECMD

LDAA#$80

STAAESTAT;launch the command

LDAAESTAT

BITA#$20;test PVIOL

BNEERS1

LDAA#$20

STAAESTAT;clear PVIOL

BRAERS3

ERS1BITA#$10;test ACCERR

BNEERS2

LDAA#$10

STAAESTAT;clear ACCERR

BRAERS3

ERS2LDAAESTAT;wait for command to finish

BPLERS2

ERS3RTS


Eeprom 9s12dp256

; EE! ( n addr -- )

EEST

LDY 2,X+

LDD0,Y

CPD#$FFFF;if not FFFF

BEQEES1

JSRERASE;erase sector

EES1LDD 2,X+

JSR EESTD;program D

RTS


Eeprom 9s12dp256

; ERASE.BULK ( -- )

BULKE

TSTESTAT

BPLERB3

LDD#0

STDEESTART;write anything to EEPROM

LDAA#$41;erase bulk

STAAECMD

LDAA#$80

STAAESTAT;launch the command

LDAAESTAT

BITA#$20;test PVIOL

BNEERB1

LDAA#$20

STAAESTAT;clear PVIOL

BRAERB3

ERB1BITA#$10;test ACCERR

BNEERB2

LDAA#$10

STAAESTAT;clear ACCERR

BRAERB3

ERB2LDAAESTAT;wait for command to finish

BPLERB2

ERB3RTS


  • Login