I start my code with this (got it of the net somewhere). movlw b'00000000' ; all port pins =3D low movwf PORTA movlw b'00000000' movwf PORTB movlw b'00000000' movwf PORTC movlw b'00000000' movwf PORTD movlw b'00000000' movwf PORTE bsf STATUS,RP0 ; set RAM Page 1 for TRIS registers movlw b'00000000' ; all IO pins =3D outputs movwf TRISA movlw b'00000000' movwf TRISB movlw b'00000000' movwf TRISC movlw b'00000000' movwf TRISD movlw b'00000000' movwf TRISE movlw b'00000110' ; all analog pins =3D digital movwf ADCON1 bcf STATUS,RP0 ; back to RAM page 0 /Fredrik ----- Original Message -----=20 From: "Tony Nixon" To: Sent: Tuesday, August 06, 2002 1:58 AM Subject: Re: [PIC][EE]: Unstable circuit > Fredrik Axtelius wrote: > > > > Hi!! > > > > I have a PIC16F877 circuit and im having big problems to get it = stable. >=20 > Try setting all unused IO pins as outputs. >=20 > -- > Best regards >=20 > Tony >=20 > mICros > http://www.bubblesoftonline.com > mailto:sales@bubblesoftonline.com >=20 > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads >=20 >=20 > -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics