Still had that window open, so I'll save you some typing... BTW, I generally use shadow registers as well -- this code was just a quick test. LIST P=16F872 INCLUDE "p16f872.inc" ERRORLEVEL -224 __CONFIG _PWRTE_ON & _LP_OSC & _WDT_OFF & _LVP_OFF cblock H'20' Delay1 Delay2 endc MAIN: ;----- Bank 1 ----- bcf STATUS,RP1 bsf STATUS,RP0 movlw B'00000110' movwf ADCON1 ; Port A all digital movlw b'00000000' movwf TRISA ;----- Bank 0 ----- bcf STATUS,RP0 loopage: bsf PORTA,2 bsf PORTA,3 bsf PORTA,4 bsf PORTA,5 movlw D'2' movwf Delay1 Loop1: decfsz Delay1,F goto Loop1 bcf PORTA,2 bcf PORTA,3 bcf PORTA,4 bcf PORTA,5 movlw D'2' movwf Delay2 Loop2: decfsz Delay2,F goto Loop2 goto loopage end -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Nick Veys Sent: Tuesday, June 25, 2002 12:25 AM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]: PORTA output troubles! Hmm, that's odd, but I'll remember that... I fixed it by the suggestions I got before w/the shadow register but I saved my previous code and will give that quick-fix a try. nick@veys.com | www.veys.com/nick >Nick, > >I just plugged this into the sim, and got the same >problem with only RA5 blinking. However, I added >these 2 code lines and it worked properly... > > movlw B'00000110' > movwf ADCON1 ; Port A all digital > >Cheers, >-Neil. > > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu