AN1241 Motorola Semiconductor Products, AN1241 Datasheet - Page 14

no-image

AN1241

Manufacturer Part Number
AN1241
Description
Interfacing the Mc68hc705j1a to 9356/9366 Eeproms
Manufacturer
Motorola Semiconductor Products
Datasheet
*****************************************************************************
*
*
*
* These 7 subroutines execute each of the 7 commands
* that the EEPROM will respond to
*
*****************************************************************************
***
J9356_EWEN
***
J9356_EWDS
***
J9356_WRITE
14
EEPROM Command SubRoutines
EWEN - subroutine to enable write/erase ******************************
EWDS - subroutine to disable write/erase *****************************
WRITE - subroutine to write EEPROM ***********************************
lda
sta
lda
sta
bset
jsr
jsr
bclr
rts
lda
sta
clr
bset
jsr
jsr
bclr
rts
lda
sta
bset
jsr
jsr
jsr
bclr
bclr
jsr
rts
Freescale Semiconductor, Inc.
For More Information On This Product,
#$80
OPCODE
#$C0
ADDR
CS,PORTA
J9356_WR_OP
J9356_WR_ADDR
CS,PORTA
#$80
OPCODE
ADDR
CS,PORTA
J9356_WR_OP
J9356_WR_ADDR
CS,PORTA
#$A0
OPCODE
CS,PORTA
J9356_WR_OP
J9356_WR_ADDR
J9356_WR_DATA
SER_OUT,PORTA
CS,PORTA
J9356_WAIT
Go to: www.freescale.com
;load opcode
;load address
;CS line is high
;write opcode
;write address
;CS line is low
;return
;load opcode
;load addr
;CS line is high
;write opcode
;write address
;CS line is low
;return
;load opcode
;CS line is high
;write opcode
;write address
;write data
;CS line is low
;wait until EEPROM is ready
;return
AN1241/D
*
*
*
*
*
*

Related parts for AN1241