Greetings All, I have tried to implement EEPROM writes on 16F84 at 3.2768 Mhz using = Charles Manning's Assembler, KIT 81 and PICALL. WDT disabled, Power up = timer enabled. GIE and TMR0 enabled at initialization Once the subroutine below has been called all subsequent reads to any = EEPROM location returns the '9' (used as the write test data). However, = if it is put thru a power down/up cycle then subsequent reads return = values as expected. ie the '9' is in the right place and everything else = as it should be. If I rem out the 6 lines as shown '*', all subsequent reads are normal. Anyone any idea where I am going wrong. Justin RamToEeprom ;************************************************* movlw EEFaceTens ;Address where data = written movwf EEADR,f ;move it to the = address reg movlw 9 ;just some test = data movwf EEData,f ;move it the Data = reg=20 ShiftNextRamByte ;Sub will later move 5 = bytes bcf GIE ;Disable all = interrupts btfsc GIE ;was it = successful goto ShiftNextRamByte ;no, try and set it = again bsf RP0 ;switch to bank = 1 bsf WREN ;Enable EEprom = writes bcf EEIF ;clear the write = success flag=20 * movlw 55h,w ;55 cause manual = says so * movwf EECON2,f ;write it to the = control reg * movlw 0AAh,w ;AA cause manual says = so * movwf EECON2,f ;write it to the = control reg bsf WR ;this initiates = the write bsf GIE ;re-enable = interrupts nop ;just in case = it needs some time *WaitForWrite btfsc EEIF ;has the write finished * goto WaitForWrite ;no, then wait some = more bcf EEIF ;clear the flag=20 bcf WREN ;clear WREN when not = writing bcf RP0 ;switch back to = bank 0 =20 return ;RamToEeprom End Sub -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu