Hi! This routine works on PIC 16f877. Instead of BANKX macros you can use BANKSEL. BTW, are you sure that EEPROM writing part of your code is OK? Samo ;**************************************************** ;READ_EEPROM reads EEPROM location and returns the ;result in w. EEPROM address must be in w. ;**************************************************** READ_EEPROM BANK2 movwf EEADR BANK3 bcf EECON1, EEPGD ;point to data memory bsf EECON1, RD ;start read operation BANK2 movfw EEDATA BANK0 return ;****USEFULL MACROS BANK0 macro bcf STATUS, RP0 ;switch to bank0 bcf STATUS, RP1 endm BANK1 macro bsf STATUS, RP0 ;bank1 bcf STATUS, RP1 endm BANK2 macro bcf STATUS, RP0 ;bank2 bsf STATUS, RP1 endm BANK3 macro bsf STATUS, RP0 ;bank3 bsf STATUS, RP1 endm __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads