Ed Taylor

programming the xdp512 eeprom not working

Discussion created by Ed Taylor on Dec 29, 2008
Latest reply on Dec 31, 2008 by Ed Taylor
hello again:
i'm having a mental block on something that should be quite straight forward. following the flow chart of the S12XEETX4KV2 module i arrived at this code.
EPROT is set at the start  
movb #%11111000,EPROT
and the eeprom is erased by the start of code warrior.
when i call the routine it does not program the word as expected.
   ldx #DJoystick1XMax     ;start address of default data
  ldy #Joystick1XMax     ;start address of eeprom
    movb #%01001010,ECLKDIV
   ldd 2,x+
  std 2,y+
  movb #$20,ECMD     ;
  brclr ESTAT,#mESTAT_CCIF,*
any help is greatly appreciated!