Searching \ for '[PIC][EE]: Unstable circuit' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: '[EE]: Unstable circuit'.

Exact match. Not showing close matches.
PICList Thread
'[PIC][EE]: Unstable circuit'
2002\08\05@185234 by Fredrik Axtelius

picon face
Hi!!

I have a PIC16F877 circuit and im having big problems to get it stable.

Problem:
It will only run for a short time and only if im touching GND with one hand.
When I touch GND with one hand all I have to do is wave the other hand a few inces from the circuit to get it to reset, now if I keep that hand really still I can watch it run for like 5-10 secs before it lock ups (not resets).

Hardware:
All I have is a 4Mhz 16f877, osc caps are 27p
One LED on RC4 with a resistor to GND.
Max232 with all the caps on RC6 and 7. The other end of the max232 is connected to my com1.
A reset button with a 10k pullup resistor.
All my cables are short and nicely layedout and my powersupply delivers a stable +5v.

What I have tried so far:
I have tried to put +5 on either and both of the VDD pins, same thing with the VSS.
I have put caps between none, either or both of the VSS/VDD pins.
I disconnected the Max232 on rc6 and rc7, still the same problem.
I tried a 16f874 at both 20 and 4Mhz, same thing.

Help me!
/Fredrik

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\05@200250 by Tony Nixon

flavicon
picon face
Fredrik Axtelius wrote:
>
> Hi!!
>
> I have a PIC16F877 circuit and im having big problems to get it stable.

Try setting all unused IO pins as outputs.

--
Best regards

Tony

mICros
http://www.bubblesoftonline.com
spam_OUTsalesTakeThisOuTspambubblesoftonline.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\06@024905 by Fredrik Axtelius

picon face
I start my code with this (got it of the net somewhere).

       movlw b'00000000'       ; all port pins = 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 = 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 = digital
       movwf ADCON1

       bcf STATUS,RP0  ; back to RAM page 0

/Fredrik

{Original Message removed}

2002\08\06@040207 by Mike Pink

flavicon
face
You don't mention -mclr

Pull it up to Vdd with a 4k7 resistor

Mike



----- Original Message -----
From: "Fredrik Axtelius" <.....fredrik.axteliusKILLspamspam@spam@TELIA.COM>
To: <PICLISTspamKILLspamMITVMA.MIT.EDU>
Sent: Monday, August 05, 2002 11:59 PM
Subject: [PIC][EE]: Unstable circuit


> Hi!!
>
> I have a PIC16F877 circuit and im having big problems to get it stable.
>
> Problem:
> It will only run for a short time and only if im touching GND with one
hand.
> When I touch GND with one hand all I have to do is wave the other hand a
few inces from the circuit to get it to reset, now if I keep that hand
really still I can watch it run for like 5-10 secs before it lock ups (not
resets).
>
> Hardware:
> All I have is a 4Mhz 16f877, osc caps are 27p
> One LED on RC4 with a resistor to GND.
> Max232 with all the caps on RC6 and 7. The other end of the max232 is
connected to my com1.
> A reset button with a 10k pullup resistor.
> All my cables are short and nicely layedout and my powersupply delivers a
stable +5v.
>
> What I have tried so far:
> I have tried to put +5 on either and both of the VDD pins, same thing with
the VSS.
{Quote hidden}

--
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


2002\08\06@105328 by Derek Cowburn

flavicon
face
> > I have tried to put +5 on either and both of the VDD pins,
> same thing with
> the VSS.

+5 to both Vdd.  Vss to Ground (not +5).  Typo?

I had a similar problem and it was the /MCLR was not pulled high like Mike
indicates below.  Same "touch it and it resets" effect.

-Derek


> {Original Message removed}

2002\08\06@153025 by Fredrik Axtelius

picon face
Yes, of course it's a typo :)
I have both Vdd to +5 and both Vss to GND.
/MCLR is pulled up with a 10k resistor (also tried 1k).

Still having exactly the same problems.

Any more ideas?

/frax

----- Original Message ----- From: "Derek Cowburn" <.....derekKILLspamspam.....COWBURN.US>
To: <EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU>
Sent: Tuesday, August 06, 2002 4:53 PM
Subject: Re: [PIC][EE]: Unstable circuit


{Quote hidden}

> > {Original Message removed}

2002\08\06@155911 by denis

flavicon
face
HI,

ADD 0.1uF on MCRL and GND (Recommend By Microchip),  and 0.1uF on Each VCC
Pin.

5
/
\    10K
/
\
----------MCRL
|
|
--
--    0.1uF
|
|
GND



Denis


----- Original Message -----
From: "Fredrik Axtelius" <fredrik.axteliusspamspam_OUTTELIA.COM>
To: <@spam@PICLISTKILLspamspamMITVMA.MIT.EDU>
Sent: Tuesday, August 06, 2002 3:35 PM
Subject: Re: [PIC][EE]: Unstable circuit


Yes, of course it's a typo :)
I have both Vdd to +5 and both Vss to GND.
/MCLR is pulled up with a 10k resistor (also tried 1k).

Still having exactly the same problems.

Any more ideas?

/frax

----- Original Message -----
From: "Derek Cowburn" <KILLspamderekKILLspamspamCOWBURN.US>
To: <RemoveMEPICLISTTakeThisOuTspamMITVMA.MIT.EDU>
Sent: Tuesday, August 06, 2002 4:53 PM
Subject: Re: [PIC][EE]: Unstable circuit


{Quote hidden}

> > {Original Message removed}

2002\08\06@170827 by Fredrik Axtelius

picon face
Tried that, still having the same problems...

/frax

----- Original Message ----- From: "Denis Seguin" <spamBeGonedenisspamBeGonespamcitenet.net>
To: <TakeThisOuTPICLISTEraseMEspamspam_OUTMITVMA.MIT.EDU>
Sent: Tuesday, August 06, 2002 9:55 PM
Subject: Re: [PIC][EE]: Unstable circuit


{Quote hidden}

> > > {Original Message removed}

2002\08\06@185145 by Tony Nixon

flavicon
picon face
Fredrik Axtelius wrote:
>
> Hi!!
>
> I have a PIC16F877 circuit and im having big problems to get it stable.

Disable WDT
Disable LVP
Check crystal circuit, Vss connection to it, keep it compact and near
the chip
Wrong OSC fuse setting, try HS mode
Floating inputs
Disconnect PC from circuit
Tie MCLR hard to 5V
Verify software
Delete all software except for "flashy LED"
Check ground rails in circuit
Connect BOTH Vdd and Vss to power supply
Use another 877 chip
Verify programming
Change power supplies
Check circuit for dry joints & shorted IO pins
Try LED on another IO pin
Check for BSF instructions on PORTS
Give me $10, that helps


Try this, it works..


       list p=16f877   ; processor type

       #include "p16f877.inc"
;
; ------------------
; CONFIGURATION FUSE
; ------------------
;
       __CONFIG _CP_OFF & _WRT_ENABLE_OFF & _HS_OSC & _WDT_OFF & _PWRTE_OFF &
_BODEN_OFF & _LVP_OFF & _CPD_OFF & _DEBUG_OFF
;
; The purpose of this program is to make a LED turn on and off
; The LED is connected to PortB any pin
; The flash rate is 500mS @ 4MHz
;

       CBLOCK 0x20
DelayL          ; delay register LOW byte
DelayM          ; delay register MID byte
DelayH          ; delay register HIGH byte
       ENDC

;
; -------------
; PROGRAM START
; -------------
;
       org 0h                  ; startup address = 0000


       clrf PORTA
       clrf PORTB
       clrf PORTC
       clrf PORTD
       clrf PORTE
       bsf Status,RP0          ; set RP0 for RAM page 1
       clrf TrisA              ; all PortA = outputs
       clrf TrisB              ; all PortB = outputs
       clrf TrisC              ; all PortC = outputs
       clrf TrisD              ; all PortD = outputs
       clrf TrisE              ; all PortE = outputs
;
; -------------------------
; SET ANALOG/DIGITAL INPUTS
; -------------------------
;
       movlw b'00000110'       ; all digital
       movwf ADCON1
       bcf Status,RP0          ; set RP0 for RAM page 0


start   clrf PORTB
       call Delay500           ; execute a 500mS delay

       movlw 0xFF
       movwf PORTB
       call Delay500           ; execute a 500mS delay
       goto start              ; do this loop forever
;
; ---------------------------------------
; SUBROUTINE: waste time for 500mS @ 4MHz
; ---------------------------------------
;

Delay500 clrf DelayL            ; clear DelayL to 0
       clrf DelayM             ; clear DelayM to 0
       movlw 3h                ; set DelayH to 3
       movwf DelayH
Wait1   decfsz DelayL           ; subtract 1 from DelayL
       goto Wait1              ; if not 0, goto Wait1
       decfsz DelayM           ; subtract 1 from DelayM
       goto Wait1              ; if not 0, goto Wait1
       decfsz DelayH           ; subtract 1 from DelayH
       goto Wait1              ; if not 0, goto Wait1
       return                  ; finished the delay

               end


--
Best regards

Tony

mICros
http://www.bubblesoftonline.com
RemoveMEsalesspam_OUTspamKILLspambubblesoftonline.com

--
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


2002\08\07@032334 by Michael Rigby-Jones

flavicon
face
{Quote hidden}

You need to make sure that MCLR is tied to Vdd with a (e.g. 10k) resistor,
and also make sure that RB3 (PGM) is pulled low via another resistor if you
have low voltage programming enabled.

Regards

Mike

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\08\07@121907 by Fredrik Axtelius

picon face
We have a winner!!
Thanks alot, RB3->GND solved everything, it now runs just great!!
Can someone explain why?

To Tony Nixon: I tried all the thing you suggested and was just about to send you the $10. Now that Michaels tip worked do I still need to send you the money, if yes then I need your address :)

/frax

{Original Message removed}

2002\08\07@184727 by Tony Nixon

flavicon
picon face
Fredrik Axtelius wrote:
>
> We have a winner!!
> Thanks alot, RB3->GND solved everything, it now runs just great!!
> Can someone explain why?
>
> To Tony Nixon: I tried all the thing you suggested and was just about to send you the $10. Now that Michaels tip worked do I still need to send you the money, if yes then I need your address :)

One of the things I mentioned was to check that LVP was disabled. You
will also notice this in the __CONFIG directive in the code I posted.
Grounding the LVP input suggests that you left LVP = ON. When LVP mode
is active and LVP is high or floating, the chip tries to enter low
voltage programing mode.



See the link below for credit card transactions.

Just kidding :-)

Glad it's working

--
Best regards

Tony

mICros
http://www.bubblesoftonline.com
RemoveMEsalesKILLspamspambubblesoftonline.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...