design of embedded systems using 68hc12(11) microcontrollers - r. e. haskell eeprom -- 9s12dp256...
Post on 20-Dec-2015
228 views
TRANSCRIPT
![Page 1: Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide](https://reader035.vdocuments.us/reader035/viewer/2022062308/56649d4b5503460f94a28c6c/html5/thumbnails/1.jpg)
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell
EEPROM-- 9S12DP256
EETS4K
Block Guide
![Page 2: Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide](https://reader035.vdocuments.us/reader035/viewer/2022062308/56649d4b5503460f94a28c6c/html5/thumbnails/2.jpg)
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell
EEPROM
• MC12S-DP256– 4 Kbytes of EEPROM– $0400 - $0FFF– $FEC – FFF used for autostart in
CML 12S-DP256
![Page 3: Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide](https://reader035.vdocuments.us/reader035/viewer/2022062308/56649d4b5503460f94a28c6c/html5/thumbnails/3.jpg)
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell
![Page 4: Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide](https://reader035.vdocuments.us/reader035/viewer/2022062308/56649d4b5503460f94a28c6c/html5/thumbnails/4.jpg)
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell
![Page 5: Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide](https://reader035.vdocuments.us/reader035/viewer/2022062308/56649d4b5503460f94a28c6c/html5/thumbnails/5.jpg)
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell
![Page 6: Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide](https://reader035.vdocuments.us/reader035/viewer/2022062308/56649d4b5503460f94a28c6c/html5/thumbnails/6.jpg)
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell
![Page 7: Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide](https://reader035.vdocuments.us/reader035/viewer/2022062308/56649d4b5503460f94a28c6c/html5/thumbnails/7.jpg)
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell
![Page 8: Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide](https://reader035.vdocuments.us/reader035/viewer/2022062308/56649d4b5503460f94a28c6c/html5/thumbnails/8.jpg)
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell
![Page 9: Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide](https://reader035.vdocuments.us/reader035/viewer/2022062308/56649d4b5503460f94a28c6c/html5/thumbnails/9.jpg)
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell
![Page 10: Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide](https://reader035.vdocuments.us/reader035/viewer/2022062308/56649d4b5503460f94a28c6c/html5/thumbnails/10.jpg)
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell
![Page 11: Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide](https://reader035.vdocuments.us/reader035/viewer/2022062308/56649d4b5503460f94a28c6c/html5/thumbnails/11.jpg)
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell
![Page 12: Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide](https://reader035.vdocuments.us/reader035/viewer/2022062308/56649d4b5503460f94a28c6c/html5/thumbnails/12.jpg)
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell
![Page 13: Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide](https://reader035.vdocuments.us/reader035/viewer/2022062308/56649d4b5503460f94a28c6c/html5/thumbnails/13.jpg)
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell
![Page 14: Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide](https://reader035.vdocuments.us/reader035/viewer/2022062308/56649d4b5503460f94a28c6c/html5/thumbnails/14.jpg)
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell
![Page 15: Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide](https://reader035.vdocuments.us/reader035/viewer/2022062308/56649d4b5503460f94a28c6c/html5/thumbnails/15.jpg)
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell
![Page 16: Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide](https://reader035.vdocuments.us/reader035/viewer/2022062308/56649d4b5503460f94a28c6c/html5/thumbnails/16.jpg)
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell
; STORE WORD D AT ADDRESS Y AND Y+1EESTD
TST ESTATBPL EED3STD 0,YLDAA #$20 ;program wordSTAA ECMDLDAA #$80STAA ESTAT ;launch the commandLDAA ESTATBITA #$20 ;test PVIOLBNE EED1LDAA #$20STAA ESTAT ;clear PVIOLBRA EED3
EED1 BITA #$10 ;test ACCERRBNE EED2LDAA #$10STAA ESTAT ;clear ACCERRBRA EED3
EED2 LDAA ESTAT ;wait for command to finishBPL EED2
EED3 RTS
![Page 17: Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide](https://reader035.vdocuments.us/reader035/viewer/2022062308/56649d4b5503460f94a28c6c/html5/thumbnails/17.jpg)
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell
; ERASE 2 WORDS AT ADDRESS Y to Y+3ERASE
TST ESTATBPL ERS3LDD #0STD 0,Y ;address in sectorLDAA #$40 ;erase sectorSTAA ECMDLDAA #$80STAA ESTAT ;launch the commandLDAA ESTATBITA #$20 ;test PVIOLBNE ERS1LDAA #$20STAA ESTAT ;clear PVIOLBRA ERS3
ERS1 BITA #$10 ;test ACCERRBNE ERS2LDAA #$10STAA ESTAT ;clear ACCERRBRA ERS3
ERS2 LDAA ESTAT ;wait for command to finishBPL ERS2
ERS3 RTS
![Page 18: Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide](https://reader035.vdocuments.us/reader035/viewer/2022062308/56649d4b5503460f94a28c6c/html5/thumbnails/18.jpg)
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell
; EE! ( n addr -- )EEST
LDY 2,X+LDD 0,YCPD #$FFFF ;if not FFFFBEQ EES1JSR ERASE ;erase sector
EES1 LDD 2,X+JSR EESTD ;program DRTS
![Page 19: Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell EEPROM -- 9S12DP256 EETS4K Block Guide](https://reader035.vdocuments.us/reader035/viewer/2022062308/56649d4b5503460f94a28c6c/html5/thumbnails/19.jpg)
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell
; ERASE.BULK ( -- )BULKE
TST ESTATBPL ERB3LDD #0STD EESTART ;write anything to EEPROMLDAA #$41 ;erase bulkSTAA ECMDLDAA #$80STAA ESTAT ;launch the commandLDAA ESTATBITA #$20 ;test PVIOLBNE ERB1LDAA #$20STAA ESTAT ;clear PVIOLBRA ERB3
ERB1 BITA #$10 ;test ACCERRBNE ERB2LDAA #$10STAA ESTAT ;clear ACCERRBRA ERB3
ERB2 LDAA ESTAT ;wait for command to finishBPL ERB2
ERB3 RTS