Searching \ for '16F84 PROBLEM' 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=16F
Search entire site for: '16F84 PROBLEM'.

Truncated match.
PICList Thread
'16F84 PROBLEM'
1999\05\01@123128 by Graham

flavicon
face
I'm working on a little PIC project and out of sheer desperation I am
appealing to you for help!

I've designed a very simple alarm system for my house using the
PIC16F84, that uses Change on Port B Interrupt to detect whether a door
or window has opened. It then actuates a relay for an alarm and flickers

an LED to indicate on a diagram where in the house it was.

Simple to design and program using MPLAB, but when I burn it in and test

it, I find that it is VERY erratic. For instance when I apply power
(5.05v through a regulator) some LEDs flash spontaneously that are NEVER

supposed to flash and it acts strange. Normally when I then
apply Master Reset it resets properly and works fine, but not always.
Sometimes when reset it acts the same as during a power up.
Even when I think it IS working fine it sometimes does strange things
inconsistently.

I've even simulated a Power-On reset and it starts up properly in MPLAB.

BTW I've combed through the source code and everything looks fine also
in simulation.

It would be really great if you could give me some tips please. I use
12.45v to program it (unregulated) and 5.05v (regulated) for Vdd. I use
a 4MHz crystal and power up timer on, watch dog off.

Could the PIC be damaged? Why is it erratic?

Thank you!
Graham.

1999\05\01@123956 by Bob Blick

face
flavicon
face
>it, I find that it is VERY erratic. For instance when I apply power
>(5.05v through a regulator) some LEDs flash spontaneously that are NEVER

Is power getting to some other pins before it gets to pin 14(VDD)? Or
perhaps power is not coming on quickly enough.

-Bob

1999\05\01@124831 by Jim Paul

picon face
Graham,

I would add a 10uF and a .1 uF cap between Vdd and Vss at the 'F84'.
Also,  I would enable the weak pullups on Port B as well.   That is unless
you already have done these things.   Also, make sure the watchdog timer
is not tripping you up.   I don't think the W/D timer is the problem from
what
you state is happening.  You may want to check the 5 volt regulator to make
sure it is functioning properly also.   What kind of oscillator are you
using?
Are you using a crystal or canned Osc?  Do you have the power up timer
and the Osc startup timer activated?   If not, the part may not be getting
a good clock signal before it starts running.   Just some things to check.
Hope this helps.   Also, I'd like to know what you did to fix it when you
get it
fixed.


Regards,


Jim

{Original Message removed}

1999\05\01@135941 by Zack Cilliers

flavicon
face
Also tie the mclr to + 5v supply through a resistor or directly, it does not
like
to be floating

Zack

E-Mail: spam_OUTspazzmanTakeThisOuTspaminame.com

One regrets more the things that you
did not do than the things you did do.


{Original Message removed}

1999\05\01@165015 by Reginald Neale

flavicon
face
 Graham asked:

>I'm working on a little PIC project and out of sheer desperation I am
>appealing to you for help!
>
>I've designed a very simple alarm system for my house using the
>PIC16F84, that uses Change on Port B Interrupt to detect whether a door
>or window has opened. It then actuates a relay for an alarm and flickers
>

 Graham:

 In addition to suggestions from Jim, Bob and Zack....

 Does the PIC drive any kind of load other than LEDs? If so, can you
 temporarily disconnect them to see if that has any effect?

 What about unused pins? Do you have any, how are they treated in
 software, and are they terminated?

 Reg Neale

1999\05\02@080245 by Graham

flavicon
face
Hi Jim,

I think I might have found a solution...

I have a 0.1uF decoupling capacitor and pull-ups on, with no WDT. The Power Up
Timer is active, and the Oscillator Timer is always on since I'm using a 4Mhz
Crystal (XT mode). The regulator seems fine at 5.05v.

I have found though that when I apply power while MCLR is low, wait a couple of
seconds, then let MCLR go high through a pull-up resistor, it works every time.
This could mean that the power line takes that long to stabilize, which is very
strange! I could work around this problem by actually attaching my ON/OFF
switch to MCLR instead of Vdd, and then the device would simply always be in
reset when 'off'. Do you think this is a good idea? It seems to solve the
problem.

Thanks for the ideas.
Graham

1999\05\02@111548 by Jim Paul

picon face
Graham,

I don't believe I've heard of this being done before, and I don't know
whether it
violates any engineering practices or PIC operating specs, but if it works,
I see
no reason why you shouldn't try it, unless one of the above conditions is
true.
You might want to try a cap to ground on the MCLR with a pullup from MCLR to
Vdd.
This will give you the 2 second wait until the power supply stabilizes.   Or
you could
rig up a one shot with a 2 second delay,.  This also would accomplish the
same result,
but would result in extra components, and complexity, as well as extra cost.
The only
other option you would have I guess is to change power suppiles, or at least
try to
speed up the stabilization of the one you have.  One of these method should
be a good
compromise for you between cost, complexity and effectiveness.   The final
decision
is up to you though.  Thanks for the feedback.   I appreciate it.   Sorry
the suggestions
I submitted to you didn't really help as you already had them implemented or
thought of.
Again I would appreciate it if you could let me know what you finally decide
once you get
the circuit fixed the way you want it.  This will not only help in my
projects in the future, but
also in other projects on this list.  You may want to look at the power
supply on a scope to
see just exactly how long it takes to stabilize.  This may help you in
deciding which one of
the above ideas best fits the situation.

Okay, I've taken up enough of your time with this long winded conversation.
I'll let you get
back to PIC'ing.


Later,


Regards,


Jim

{Original Message removed}

1999\05\02@123212 by Graham

flavicon
face
Hi Reg,

Reginald Neale wrote:

>   Does the PIC drive any kind of load other than LEDs? If so, can you
>   temporarily disconnect them to see if that has any effect?

No, only LEDs. I use 4 on Port B and 3 on Port A, maximum of 2 on at any
time. I've got a 0.1uF cap directly between Vdd and Vss.

>   What about unused pins? Do you have any, how are they treated in
>   software, and are they terminated?

No unused pins. Actually, I use the internal pull-up and change on pin int to
check when a switch opens on Portb 4-7. Maybe there is something strange with
the pullups drawing too much current?
Thanks!
Graham.

1999\05\02@201322 by Ron Dickinson

flavicon
picon face
>Reginald Neale wrote:
>
>>   Does the PIC drive any kind of load other than LEDs? If so, can you
>>   temporarily disconnect them to see if that has any effect?
>
Use the output to drive a transistor and much bigger loads can be
operated, eg relays, opto-isolators then the world.

Ron
--
  /\
  []       Ron Dickinson
  []     <<<<<        >>>>>
  []     Compusolve-Redilec
 /--\    Derbyshire England
 !!!!    +44 01246 - 570281

1999\05\03@053457 by Benjamin Petersen

flavicon
face
> >
> >>   Does the PIC drive any kind of load other than LEDs? If
> so, can you
> >>   temporarily disconnect them to see if that has any effect?
> >
> Use the output to drive a transistor and much bigger loads can be
> operated, eg relays, opto-isolators then the world.

But it can surly drive a LED.

Regards
Benjamin Petersen

1999\05\03@070853 by paulb

flavicon
face
Graham wrote:

> I have found though that when I apply power while MCLR is low, wait a
> couple of seconds, then let MCLR go high through a pull-up resistor,
> it works every time.  This could mean that the power line takes that
> long to stabilize, which is very strange!

 Use the "brownout" circuit from the application notes.  One PNP
transistor and three resistors, Figure 8-15 of document DS30430C, page
46.

 As I see it, it is unwise *not* to use this circuit or a better one,
in any PIC application.

 Why isn't it built-in?  Well, if it were, it would limit you to a
specific voltage range for circuit operation.  It is expected that you
design this circuit for whatever operating voltage you will be using,
taking into account the characteristics of other associated devices.

 The circuit also uses a few microamps in operation.

 Of course, they *could* have included some sort of very low current,
1V threshold device I suppose.
--
 Cheers,
       Paul B.

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