On Sat, 9 Aug 2003 23:51:13 -0600, Steve wrote: >Hi Ken, > >W is used to pass data to LCD_Data. The interrupt service uses the following to >prevent it from currupting other operations. > > movwf w_int ;save w > movf STATUS,w ;save STATUS > movwf Stat_int > movf FSR,w ;save FSR > movwf FSR_int ><<< service here >>> > movf FSR_int,w > movwf FSR > movf Stat_int,w > movwf STATUS > movf w_int,w ;restore w > bcf STATUS,Z ;ensure that restoring w > btfsc Stat_int,Z ;does not change zero flag state > bsf STATUS,Z > I've lost track of which processor you're using but something doesn't look right with your restore. Microchip's example code uses SWAPF to save and restore the STATUS register. You may want to check the datasheet under Special Features section. Are all of your save and restore locations in the same bank? You may not be using the banks that you think you are. Any pending interrupt will occur as soon as you set GIE so you probably have a higher chance of taking an interrupt on your way to the LCD routine. Regards, Bob -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads