Searching \ for ' [PIC] Ghost in my PIC' 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: 'Ghost in my PIC'.

No exact or substring matches. trying for part
PICList Thread
'[PICLIST] [PIC] Ghost in my PIC'
2001\12\17@195502 by Augusto de Conto

flavicon
face
Hello All

I have a very strange thing happending with my PIC.
I mounted it in a proto-board and recorded a simple programa.
At first it doesn't work.
Waiting aprox. 1 minute, it beguins to work (sometimes).
Sometimes, when I touch GND, it works again. Sometimes, not.
It works when it wants...
(I'm using a PIC 16F876-04 with a 4MHz XTAL and two 15pF capacitor)
What can it be? How do I fix it? HELP!

Thank

Augusto de Conto
spam_OUTaugustoTakeThisOuTspamautomacao.eng.br

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu


2001\12\17@201642 by David Venz

flavicon
face
Have you tried something like a 10k resistor between /MCLR and VCC?  If
your value for this resistor (and I think you're supposed to have one
rather than tying it directly to VCC) is too high, this effect sometimes
appears.  Also, check you have tied unused inputs to GND or VCC via similar
value resistors - don't leave them floating, as per the "gotchas" page on
piclist.com.  (#9 on http://piclist.com/techref/piclist/begin.htm).

Cheers,
-Dave.




                   Augusto de Conto
                   <augusto@AUTOMAC       To:     PICLISTspamKILLspamMITVMA.MIT.EDU
                   AO.ENG.BR>             cc:
                   Sent by: pic           Subject:     [PIC] Ghost in my PIC
                   microcontroller
                   discussion list
                   <PICLIST@MITVMA.
                   MIT.EDU>


                   12/18/01 12:24
                   PM
                   Please respond
                   to pic
                   microcontroller
                   discussion list






Hello All

I have a very strange thing happending with my PIC.
I mounted it in a proto-board and recorded a simple programa.
At first it doesn't work.
Waiting aprox. 1 minute, it beguins to work (sometimes).
Sometimes, when I touch GND, it works again. Sometimes, not.
It works when it wants...
(I'm using a PIC 16F876-04 with a 4MHz XTAL and two 15pF
capacitor)
What can it be? How do I fix it? HELP!

Thank

Augusto de Conto
.....augustoKILLspamspam.....automacao.eng.br

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspam_OUTmitvma.mit.edu


2001\12\17@202226 by 859-1?Q?Alexandre_Guimar=E3es?=

flavicon
face
Hi,

>(I'm using a PIC 16F876-04 with a 4MHz XTAL and two 15pF
>capacitor)
>What can it be? How do I fix it? HELP!

   It seems like the oscilattor is taking an eternity to start up. Check
the caps and connections and try bigger capacitors, like 33 pf. If you have
a scope check it, it will probably start when you touch the probe on the
oscilattor pins :-)

best regards,
Alexandre Guimaraes

--
http://www.piclist.com hint: To leave the PICList
@spam@piclist-unsubscribe-requestKILLspamspammitvma.mit.edu


2001\12\17@214852 by Barry Gershenfeld

picon face
If you use the MPLAB-ICD, make sure you remove the debugging
monitor (uncheck the box) when you run the board by itself.

Barry

>I have a very strange thing happending with my PIC.
>I mounted it in a proto-board and recorded a simple programa.
>At first it doesn't work.
>Waiting aprox. 1 minute, it beguins to work (sometimes).
>Sometimes, when I touch GND, it works again. Sometimes, not.
>It works when it wants...
>Augusto de Conto

--
http://www.piclist.com hint: To leave the PICList
KILLspampiclist-unsubscribe-requestKILLspamspammitvma.mit.edu


2001\12\17@224909 by Tony Nixon

flavicon
picon face
Augusto de Conto wrote:
>
> Hello All
>
> I have a very strange thing happending with my PIC.
> I mounted it in a proto-board and recorded a simple programa.
> At first it doesn't work.
> Waiting aprox. 1 minute, it beguins to work (sometimes).
> Sometimes, when I touch GND, it works again. Sometimes, not.
> It works when it wants...
> (I'm using a PIC 16F876-04 with a 4MHz XTAL and two 15pF
> capacitor)
> What can it be? How do I fix it? HELP!


If you are sure your code is ok, and the chip is connected to power, OSC
is working, MCLR is tied to VCC, then it's most likely floating inputs.

Tie unused pins to VCC or GND or set them as outputs.

Check that LVP fuse is disabled, unless you have RB3 tied low.
Check that DEBUG fuse is disabled.

--
Best regards

Tony

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

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-requestspamBeGonespammitvma.mit.edu


2001\12\18@044945 by Christian Dorner

flavicon
face
Hi!


> I have a very strange thing happending with my PIC.
> I mounted it in a proto-board and recorded a simple programa.
> At first it doesn't work.
> Waiting aprox. 1 minute, it beguins to work (sometimes).
> Sometimes, when I touch GND, it works again. Sometimes, not.
> It works when it wants...

I can remember at the beginning of my PIC expirience i had a similar
problem. In my case i could solve it with a better startup routine like
this:

org 0x0000

clrf PCLATH
clrf INTCON
clrf STATUS
goto start   ; Jump to Program entry point

It seems that the PIC sometimes starts up with unexepted values in some
registers. If your program don't use interrupts then add a RETFIE at offset
0x0004 to let the program countinue even when a unexepted interrupt occures.

Christian

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


2001\12\18@061310 by Friedel Bruening

flavicon
face
You might check if you have the oscillator bits configured correctly
4.000000 Hz, HS, etc,

Friedel

At 10:54 p.m. 17/12/01 -0300, you wrote:
{Quote hidden}

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


2001\12\18@101950 by Bob Barr

flavicon
face
On Tue, 18 Dec 2001 09:48:49 +0100, Christian Dorner
<docEraseMEspam.....AUSTROSOL.COM> wrote:

>Hi!
>
>
>> I have a very strange thing happending with my PIC.
>> I mounted it in a proto-board and recorded a simple programa.
>> At first it doesn't work.
>> Waiting aprox. 1 minute, it beguins to work (sometimes).
>> Sometimes, when I touch GND, it works again. Sometimes, not.
>> It works when it wants...

This sounds suspiciously like an oscillator start-up problem. You may
want to try temporarily switching to an RC clock setup. [Don't forget
to change the CONFIG seting in your code :=) ]
If your circuit works reliably with the RC clock, you may want to try
a different crystal or larger caps. (IIRC you are using 15pF caps.) I
think 20-30pF are more commonly used with 4 MHz crystals. 15pF may be
a little too low a value.

{Quote hidden}

If this is happening, the PIC is not getting reset properly. I'd
suggest very carefully checking power and ground, the oscillator, and
the MCLR pin.


>If your program don't use interrupts then add a RETFIE at offset
>0x0004 to let the program countinue even when a unexepted interrupt occures.

If you're not using interrupts, an 'unexpected' interrupt can only
occur if something has inadvertently set the GIE bit. I'd suggest
finding out how this is happening. Some code, somewhere, under some
condition is setting the GIE bit.

BTW, even though this should never be necessary, a RETURN would be
preferable to RETFIE since it would both ignore the interrupt and
leave the GIE bit off.


(Just my $.02, folks, if I'm talkin' through my hat here, flame away.)

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


2001\12\18@173359 by Fabio Pereira

flavicon
face
> It seems that the PIC sometimes starts up with unexepted values in some
> registers. If your program don't use interrupts then add a RETFIE at
offset
> 0x0004 to let the program countinue even when a unexepted interrupt
occures.
>
> Christian


That's OK, but remember: the RETFIE itself is not a good interrupt handler:
you must clear the interrupt flag too, or the CPU will start an endless
loop.
Best way is something like that:
ORG 0x0004
   CLRF    INTCON  ; now you know that all flags and interrupt enable bits
are clear
   RETFIE

Than I think it will work ....

ps.: I don't think there's something wrong with the POR microcode of PIC's
... But everything is possible. ;-)

Fabio Pereira

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


2001\12\18@194721 by Sebastian Garcia

flavicon
face
Hi,

----- Original Message -----
From: Christian Dorner <EraseMEdocspamAUSTROSOL.COM>
To: <RemoveMEPICLISTEraseMEspamEraseMEMITVMA.MIT.EDU>
Sent: Tuesday, December 18, 2001 5:48 AM
Subject: Re: [PIC] Ghost in my PIC


| Hi!
|
|
| > I have a very strange thing happending with my PIC.
| > I mounted it in a proto-board and recorded a simple programa.
| > At first it doesn't work.
| > Waiting aprox. 1 minute, it beguins to work (sometimes).
| > Sometimes, when I touch GND, it works again. Sometimes, not.
| > It works when it wants...
|
| I can remember at the beginning of my PIC expirience i had a similar
| problem. In my case i could solve it with a better startup routine like
| this:
|
|  org 0x0000
|
|  clrf PCLATH
|  clrf INTCON
|  clrf STATUS
|  goto start   ; Jump to Program entry point
|
| It seems that the PIC sometimes starts up with unexepted values in some
| registers. If your program don't use interrupts then add a RETFIE at
offset
| 0x0004 to let the program countinue even when a unexepted interrupt
occures.
|
| Christian


This is nosense. The SFR's are initialized to their default values on reset.


Best Regards,

S.-

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


2001\12\18@213242 by Andrew Warren

flavicon
face
Fabio Pereira <RemoveMEPICLISTspam_OUTspamKILLspammitvma.mit.edu> wrote:

> > If your program don't use interrupts then add a RETFIE at offset
> > 0x0004 to let the program countinue even when a unexepted
> > interrupt occures.
>
> That's OK, but remember: the RETFIE itself is not a good interrupt
> handler: you must clear the interrupt flag too, or the CPU will start
> an endless loop. Best way is something like that:
>
>     ORG 0x0004
>     CLRF    INTCON  ; now you know that all flags and interrupt enable
>                     ;bits are clear
>     RETFIE

A better way is:

   ORG 0x0004
   RETURN

-Andrew

=== Andrew Warren -- RemoveMEaiwTakeThisOuTspamspamcypress.com
=== Principal Design Engineer
=== Cypress Semiconductor Corporation
===
=== Opinions expressed above do not
=== necessarily represent those of
=== Cypress Semiconductor Corporation

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


2001\12\19@072719 by Christian Dorner

flavicon
face
Hi!


> This is nosense. The SFR's are initialized to their default values on
reset.

You call it "nonsense" i would say "expecpt the unexpected".

Yes, you're right, the datasheet tell us the default values on reset. But
when you see a pic jumping into the interrupt routine befor the init-code
sets the GIE then something must be wrong.

Bob Barr wrote this (unexpected values in the FSR's) could caused by an
unproper reset.  I agree with him, because in my case it was a really "quick
and dirty" design on a protoboard. (no cap's on the power lines, cheapish
switch to power on/off the board, and so on =:-)

After i inserted the CLRF INTCON to the ofs 0x00 the problem was gone.

This impure board with the "work around" in the start up routine lifes now
for several years in my eprom-uv-eraser and do a good job. (it's now a
eprom-eraser which will beep after erase time and a serial connection to
reprogram the time, status and send's a message to the pc when the
erase-time is up ;-)

This is just one expirience with PIC's doing things you've not programmed.

Christian

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


'[PICLIST] [PIC] Ghost in my PIC - VIRUS?'
2001\12\19@110754 by Bob Barr

flavicon
face
Jan,

You just sent a .pif file as an attachment to a piclist posting. It is
disguised as a .mp3 file but is in fact an executable. This is a
common mechanism for spreading viruses.

Regards, Bob


On Wed, 19 Dec 2001 07:13:17 -0800, "Jan Didden" wrote:

>
><HTML><HEAD></HEAD><BODY bgColor=#ffffff>
><iframe src=cid:EA4DMGBP9p height=0 width=0>
></iframe></BODY></HTML>

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


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