Searching \ for 'Intermittent PIC operation' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/devices.htm?key=pic
Search entire site for: 'Intermittent PIC operation'.

Truncated match.
PICList Thread
'Intermittent PIC operation'
1998\08\13@003707 by Rob Zitka

flavicon
face
Hi,

I am having a problem with a protoype build of a PIC circuit.  I have Port
B connected to 2 LED's (2 mA each), 3 relays (13 mA each) and 3 to an MAX
232 chip.  The chip is a 16C72, windowed.

I wrote a simple program in MicroEngineering Labs PIC Basic to see test the
operation of the PIC.  It goes as follows:

High 0
Pause 1000
Low 0
Pause 1000
High 1
Pause 1000
Low 1
Pause 1000

the rest goes on to do the same with the other lines conected to the relays.

RB0 and RB1 operate the status LED's.  I energize the circuit and the LED
connected to RB0 Blinks on one second then off.  Then the LED connected to
RB1 doesn't light.  Or sometimes the RB0 LED lights goes off then RB1
lights and goes off.  Most of the time though the RB1 LED never lights.

Why is the operation of this so intermittent?

I set Watchdog timer OFF during compilation.  The MCLR is connected to a
DS1233 like Myke Predko recommends.  The crystal is 4 MhZ, with 22pF loads.
The current draw on Port B is less than 50mA max.  The circuit is powered
through a 5V regulator with a 9V battery.  The relays have protection
diodes on the coils to prevent surge currents from damaging the PIC.  The
PIC has a bypass cap at the Vdd and Vss.

This has me stumped.

1998\08\13@005533 by tjaart

flavicon
face
Rob Zitka wrote:

{Quote hidden}

I wish everyone who asked a question stated the circumstances
as completely as this!

The only two things I can think of, are :
1) Check whether the trisb register is guaranteed for output
  before you write to it.
2) Check if one of the delay variables aren't uninitialised.
  Because you use a JW part, the ambient light may affect
  the startup conditions of your RAM.

I would also force the MCLR high during bug hunting.

--
Friendly Regards

Tjaart van der Walt
spam_OUTtjaartTakeThisOuTspamwasp.co.za

|--------------------------------------------------|
|                WASP International                |
|R&D Engineer : GSM peripheral services development|
|--------------------------------------------------|
|SMS .....tjaartKILLspamspam@spam@sms.wasp.co.za  (160 chars max)|
|     http://www.wasp.co.za/~tjaart/index.html     |
|Voice: +27-(0)11-622-8686  Fax: +27-(0)11-622-8973|
|          WGS-84 : 26¡10.52'S 28¡06.19'E          |
|--------------------------------------------------|

1998\08\13@030310 by Tony Nixon

flavicon
picon face
Rob Zitka wrote:
>
> Hi,
>
> I am having a problem with a protoype build of a PIC circuit.  I have Port

I'd disconnect everything except the LED's and just run the code that
blinks them. If this fails delete more code and test again. If you do
this until there is no more code left and it still doesn't run (sorry),
you may have connected something up wrong. Have you got floating inputs
on the unused pins? Can the battery supply enough current to run the
circuit AND relays. Are your pin IO directions set correctly? Did you
set the correct oscillator fuse? Does your code jump to a non existant
program address? The list can go on forever.

Try starting with smaller code fragments and circuit blocks, then build
it up in stages. It will be easier to fault find.

--
Best regards

Tony

Multimedia 16F84 Beginners PIC Tools.
**New PicNPrac**

http://www.picnpoke.com
Email picnpokespamKILLspamcdi.com.au

1998\08\13@092107 by John Haggins

picon face
As a beginner, it took me a while to figure out that all UNUSED i/o lines
MUST be tied to the power supply  (CMOS rule - all inputs must go
somewhere). For weeks I was getting intermittent results because I didn't
know this rule.

Sounds like this may be your problem. Incidently, I found the answer in the
book "Easy PIC'n" which gets my vote as best beginners book (and I've got
them all :) Amazingly, none of the books highlight these symptoms or give
any kind of bold text warning/tip - it must be a common cause of failure
for beginners.

John


At 12:26 AM 8/13/98 -0400, you wrote:
{Quote hidden}

1998\08\13@110900 by Rob

flavicon
face
On Thu, 13 Aug 1998, John Haggins wrote:

> As a beginner, it took me a while to figure out that all UNUSED i/o lines
> MUST be tied to the power supply  (CMOS rule - all inputs must go
> somewhere). For weeks I was getting intermittent results because I didn't
> know this rule.

All I cna say is that on PortB, where I am exercising the intermittinet
problem, all pins are connected to either LED's, relays or an RS232
transceiver chip.  Though, I take your point as being extremely valid,
since on another project had a similiar experience.

I'm still baffled.  I have been told to use a scope to check the lines and
I will install .1uF bypass caps instead of 1.0uF (the only ones I had
available at the time)

Rob

{Quote hidden}

1998\08\13@114331 by Ohtsji, Randie

flavicon
face
Hi Rob,

Do you have a pullup resistor on the MCLR pin?  Instead of driving the
relays directly from the PIC, how about using transistors.  Yes use .1uF
caps for every IC on your board as close as possible to the IC Vcc/Vdd pin.

Randie
.....randie.ohtsjiKILLspamspam.....glenayre.com


> {Original Message removed}

1998\08\13@123512 by Sean Breheny

face picon face
Hi All,

I just want to bring up one point: while it seems reasonable that all
CMOS inputs should be tied in a final design (to minimise power
consumption due to pins changing state), and that in some very sensitive
circuits, it might cause problems, but I have been an electronics hobbist
in earnest for about 6 years, have played with lots of chips from many
logic families, and I have never had any problem with a circuit that was
cured by tieing an unused input! Have I just had good luck? Or, is this
similar to other's experience as well?

Sean


On Thu, 13 Aug 1998, John Haggins wrote:

{Quote hidden}

1998\08\13@124128 by Harold Hallikainen

picon face
On Thu, 13 Aug 1998 09:18:47 -0400 John Haggins <EraseMEjawgspam_OUTspamTakeThisOuTEARTHLINK.NET>
writes:
>As a beginner, it took me a while to figure out that all UNUSED i/o
>lines
>MUST be tied to the power supply  (CMOS rule - all inputs must go
>somewhere). For weeks I was getting intermittent results because I
>didn't
>know this rule.
>

       An alternative is to leave these pins open and program them as
outputs.  This lets you change your mind later and use these pins without
having to remove wiring.


Harold




Harold Hallikainen
haroldspamspam_OUThallikainen.com
Hallikainen & Friends, Inc.
See the FCC Rules at http://hallikainen.com/FccRules and comments filed
in LPFM proceeding at http://hallikainen.com/lpfm

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\08\13@185210 by Tony Nixon

flavicon
picon face
John Haggins wrote:
> Amazingly, none of the books highlight these symptoms or give
> any kind of bold text warning/tip - it must be a common cause of failure
> for beginners.
>

Check out the web site below. There are lots of animated tutorials on
this type of problem and others.


--
Best regards

Tony

Multimedia 16F84 Beginners PIC Tools.
**New PicNPrac**

http://www.picnpoke.com
Email @spam@picnpokeKILLspamspamcdi.com.au

1998\08\14@022442 by Dr. Imre Bartfai

flavicon
face
Hi,

the original project was written in PicBasic. On the very beginning of the
program there should be written the appropriate OUTPUT statements, to
define the pins as output ones.

Imre

1998\08\14@111542 by Richard A. Smith

flavicon
face
>circuits, it might cause problems, but I have been an electronics hobbist
>in earnest for about 6 years, have played with lots of chips from many
>logic families, and I have never had any problem with a circuit that was
>cured by tieing an unused input! Have I just had good luck? Or, is this
>similar to other's experience as well?

I have had a 68HC11 that this was exactly the problem.  Pullups on the unused po
rts fixed it.

--
Richard A. Smith                         Bitworks, Inc.
KILLspamrsmithKILLspamspambitworks.com               501.521.3908
Sr. Design Engineer        http://www.bitworks.com

1998\08\14@115917 by John Sanderson

flavicon
face
Hello John & PIC.ers,

>From:    John Haggins <RemoveMEjawgTakeThisOuTspamEARTHLINK.NET>
>Subject: Re: Intermittent PIC operation

>As a beginner, it took me a while to figure out that all UNUSED i/o lines
>MUST be tied to the power supply  (CMOS rule - all inputs must go
>omewhere). For weeks I was getting intermittent results because I didn't
>now this rule.
..
Even easier.
tris the unused port pins to Output. This clamps 'em solid
..

Best regards,   John
..
..
email from John Sanderson at
JS Controls, PO Box 1887, Boksburg 1460, Rep. South Africa
Manufacturer & purveyor of laboratory force testing apparatus
and related products and services.
Tel/fax: Johannesburg 893 4154    Cellphone 082 453 4815

1998\08\14@120344 by Sean Breheny

face picon face
Hi Richard,


On Fri, 14 Aug 1998, Richard A. Smith wrote:

> >circuits, it might cause problems, but I have been an electronics hobbist
> >in earnest for about 6 years, have played with lots of chips from many
> >logic families, and I have never had any problem with a circuit that was
> >cured by tieing an unused input! Have I just had good luck? Or, is this
> >similar to other's experience as well?
>
> I have had a 68HC11 that this was exactly the problem.  Pullups on the unused
ports fixed it.

Was the CPU watching the state of these inputs in any way? Is it capable
of causing an interrupt depending on the state of these pins?  I could
see how a floating input could cause a metastable state, but if the rest
of the circuitry on the IC is not dependent on the state of the pin, I
don't see how it could cause major problems.

Sean


>
> --
> Richard A. Smith                         Bitworks, Inc.
> spamBeGonersmithspamBeGonespambitworks.com               501.521.3908
> Sr. Design Engineer        http://www.bitworks.com
>

1998\08\14@144653 by Richard A. Smith

flavicon
face
On Fri, 14 Aug 1998 12:01:45 -0400, Sean Breheny wrote:

>>
>> I have had a 68HC11 that this was exactly the problem.  Pullups on the unused
ports fixed it.
>
>Was the CPU watching the state of these inputs in any way? Is it capable
>of causing an interrupt depending on the state of these pins?  I could

It was a long time ago... I remember it was a unused port... Maybe porte the A/D
port I think... So it's possible a spurrious AD
interupt was causing it but we reviewed the code pretty tightly.

I remember spending a large ammount of time trying to find a wierd intermittant
problem.   It was a controller for a stepper
motor and I think it would glitch and screw up the sequence every now and then.
What I remember is that we did the pullups
as a last desperation attempt because we had tried every thing we could come up
with.  I think it mentions something about it
in the databook.  Added pullups, problem disappeard.

Since then I have just allways added pullups.


--
Richard A. Smith                         Bitworks, Inc.
TakeThisOuTrsmithEraseMEspamspam_OUTbitworks.com               501.521.3908
Sr. Design Engineer        http://www.bitworks.com

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