Searching \ for 'Problem with PIC16C84' 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=16C
Search entire site for: 'Problem with PIC16C84'.

Truncated match.
PICList Thread
'Problem with PIC16C84'
1998\08\29@151335 by Thomas Kleffel

flavicon
face
Hi!
I just started working with PICs and I have the following problem:

My application doesn't work.
I don't know wether I conected the resonator corectly.
I use a Ceramic oscilator with 4 MHz.
How can I check wether the clock is running or not?
I have an osciloscope ready.

Thanks for your help, Tommy

1998\08\29@155037 by Eric Naus

picon face
Hi

Just put the scope probe to OSC1 pin 16 and see if the oscillator works.

Have fun

Eric

1998\08\29@160629 by Thomas Kleffel

flavicon
face
Hi!

>Just put the scope probe to OSC1 pin 16 and see if the oscillator works.

I see nothing there...so it seems that it does't work.
Hmm...can anyone tell me which oscilators I can use?
I used some from Farnell  (CST 4.00MGW).

Or is perhaps my PIC broken?
What voltage has to be there between Osc1 and Osc2?

Ciao, Tommy

1998\08\29@173712 by Michael Ghormley

picon face
Thomas,

I have a few ideas.  Perhaps they have been suggested already but it
won't hurt to mention them, yes?

1)  Are you sure that you are burning the __CONFIG bits in XT mode?  I
once set the _CONFIG bit in my assembler but found that my programmer
software overrode these choices.  Once I used the appropriate
checkboxes  on the programmer driver software everything worked.  I
also once had problems because the directive __CONFIG in MPASM starts
with *two* underscores.  I seem to remember my fuses not beig set
correctly due to that.

2)  You didn't mention capacitors.  Does the ceramic resonator you
have, have internal capacitors?  If so, what size?  (They should be
between 15-33pF)  If not, are you hanging a 22pF (or so.  This seems
to work the best and be the most popular size) to ground off of both
OSC1 and OSC2 pins?

3)  And, I COULD BE DEAD WRONG, but if I were going to look for a
crystal or ceramic oscillator operation with a scope probe, my first
thought would be that the probe would load the oscillator down and
stop it, thus seeing nothing.  My try would be to look at pin 15
(OSC2) as that is the output of the PIC's internal inverter circuitry.
If any of the PICsters out there have an opinion on this, I would
like to hear it.

4)  If you are worrying about the `84 being broken, why not place a
canned oscillator into OSC1 (no connection to OSC2).  This eliminates
all kinds of possible problems and would tell you quickly if the PIC
was working.

I hope some of this helps.  Keep us informed.

==
Michael

*************************************************************************
When the way of the Tao is forgotten, kindness and ethics must be taught.
Men must learn to pretend to be wise and good.  --  Lao Tzu
*************************************************************************

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

1998\08\29@175001 by Thomas Kleffel

flavicon
face
Hi!

>Thomas,



>2)  You didn't mention capacitors.  Does the ceramic resonator you
>have, have internal capacitors?  If so, what size?  (They should be
>between 15-33pF)  If not, are you hanging a 22pF (or so.  This seems
>to work the best and be the most popular size) to ground off of both
>OSC1 and OSC2 pins?

Ummm...I don't know...I think I'll get some 22pF capacitors an test it

>4)  If you are worrying about the `84 being broken, why not place a
>canned oscillator into OSC1 (no connection to OSC2).  This eliminates
>all kinds of possible problems and would tell you quickly if the PIC
>was working.
Ahhm...what is a 'canned oscillator'?

Isn't there the posibility to us an RC-Combination for a quick test?

Ciao, tommy

1998\08\29@182942 by Michael Ghormley

picon face
Thomas wrote:

> Ummm...I don't know...I think I'll get some 22pF capacitors an test it

This is probably your problem.

> Ahhm...what is a 'canned oscillator'?

There are oscillator modules that have a crystal and the associated
drive circuitry inside a "can" (an IC carrier made from metal).  They
have a lot of drive and are hard to load down with a scope probe.  I
have used the (Digi-Key part number) CTX185-ND with a lot of success
(half-size and with a tri-stated output).  Perhaps you should surf to
Digi-Key and do a parts search.  Eventually it will lead you to a data
sheet.

> Isn't there the posibility to us an RC-Combination for a quick test?

Yes, but not as certain as with a canned oscillator.  Use the advice
on page 36 of the data sheet.  Just be sure that your cap >20pF and
your resistor is >3K  and <100K.  I have never used the `84 in RC mode
so I can't suggest some nominal values to try.  I can tell you that
you leave the OSC2 pin unconnected and you can look there for your
clock.  It should be 1/4 of the frequency of the RC oscillator.  Once
again, take care to assure that your configuration fuses are being set
properly.

For my money though, if you hang those 22pF caps off of pins 15 and 16
to Vss your problems will most likely disappear.

Again, keep us posted.




==
Michael

*************************************************************************
When the way of the Tao is forgotten, kindness and ethics must be taught.
Men must learn to pretend to be wise and good.  --  Lao Tzu
*************************************************************************

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

1998\08\29@190337 by Thomas Kleffel

flavicon
face
>Thomas wrote:
>
>> Ummm...I don't know...I think I'll get some 22pF capacitors an test it
>
>This is probably your problem.

I hope so...but...
There's one thing, that confuses me:
My ceramic-oscilators have 3 pins in a row.
The middle is GND.
So if there were no capacitors in it, why should they have 3 pins?

But I'm just going to test it in RC-Mode...

Ciao, Tommy

1998\08\29@193527 by Thomas Kleffel

flavicon
face
Hi!

>> Isn't there the posibility to us an RC-Combination for a quick test?
>
>Yes, but not as certain as with a canned oscillator.  Use the advice
>on page 36 of the data sheet.  Just be sure that your cap >20pF and
>your resistor is >3K  and <100K.  I have never used the `84 in RC mode
>so I can't suggest some nominal values to try.  I can tell you that
>you leave the OSC2 pin unconnected and you can look there for your
>clock.  It should be 1/4 of the frequency of the RC oscillator.  Once
>again, take care to assure that your configuration fuses are being set
>properly.


I just tried with RC. It didn't work :(
I tried it with two 16C84 and a 16F84.
I think there's a problem with my current.
I have exactly 5 Volts at the PIC.

Is this ok?

Do I have to conect any other pins than Vcc, Vss, OSC1 and OSC2 for this
test?

Is it possible, that if my software is broken it stops the clock?

Ciao, Tommy

1998\08\29@201158 by Bob Cousins

flavicon
picon face
Thomas Kleffel wrote:

>Do I have to conect any other pins than Vcc, Vss, OSC1 and OSC2 for this
>test?

You probably need to tie /MCLR (pin 4) to +5V with a 1k resistor.

I recommend looking at the file "first.txt" from David Tait, which I think is
bundled with his PP programmer stuff. I'll send you a copy as his site is down.

Ok, here's David's circuit anyway:
<fixed>
             /
           +-O O---+---------------+--------------------+
           |       |               |                    |
           |       |          +----O----+               |
           | +     |          |   14    | PIC16C84      |
        -------    |   ____   |         |        ____   |
          ---      +--[____]--O 4    16 O----+--[____]--+
        -------         1K    |         |    |   4.7K   |
 4.5V     ---          ____   |         |    |          |
battery -------    +--[____]--O 10      |   _|_        _|_
          ---     _|_  220    |    5    |   ___ 22pF   ___ 0.1uF
           | -    \ /^        +----O----+    |          |
           |      --- LED          |         |          |
           |       |               |         |          |
           +-------+---------------+---------+----------+
</fixed>

I found you can be slightly flexible with values. You don't need the LED on pin
10, its just for visible output.

>Is it possible, that if my software is broken it stops the clock?

<joke>You didn't accidently set Clock Inhibit did you?</joke>

Have fun.
--
Bob Cousins, Software Engineer.
Home page at http://www.lintilla.demon.co.uk/

1998\08\29@213737 by Reginald Neale

flavicon
face
Mike said:

>3)  And, I COULD BE DEAD WRONG, but if I were going to look for a
>crystal or ceramic oscillator operation with a scope probe, my first
>thought would be that the probe would load the oscillator down and
>stop it, thus seeing nothing.  My try would be to look at pin 15
>(OSC2) as that is the output of the PIC's internal inverter circuitry.
> If any of the PICsters out there have an opinion on this, I would
>like to hear it.
>

I routinely troubleshoot boards with 16C54A parts and use a scope probe
right on the resonator pins to see if it's working. I use a 10X probe,
which reduces the loading problem. With a resonator you should see about 3V
p-p sine wave on the OSC in pin and a full 5V on the OSC out. Not sure what
you would see with RC; my guess would be similar voltage levels but
waveform more like a sawtooth.

We use Panasonic and Murata parts that have the caps built in. If Thomas's
has three pins in a row that's probably what he has.

Thomas, what frequency is it? Do you have MCLR tied high or pulled up? Do
you have the watchdog timer disabled?

Reg Neale

1998\08\30@004835 by Ralph Landry

flavicon
face
Tommy,
Even if the resonator has 3 pins does not mean the caps are
built in, they do offer them in both flavors, those with caps and
those without.

-Ralph
spam_OUTrlandryTakeThisOuTspamhaywood.main.nc.us
"If they call it Tourist Season why can't we shoot 'em?"

1998\08\30@030118 by Michael Ghormley

picon face
Thomas wrote:

> I just tried with RC. It didn't work :(

What values did you use for the R and C?  Did you see any waveform at
all?  Did you remember to set the __CONFIG fuses for _RC_OSC?  Did you
check for the programmer overriding your __CONFIG directive?

>                 I tried it with two 16C84 and a 16F84.
>                 I think there's a problem with my current.
>                 I have exactly 5 Volts at the PIC.
>
>                 Is this ok?

It's great.  So Vdd is not your problem, however do this little test
for me.  Using a DMM (not an Oscope), measure the voltage at Pin 14
(Vdd) from the ground of your power supply.  Do you see +5VDC?  Now
measure the voltage at Pin 5 (Vss).  Do you see 0V?  Now, measure the
voltage from Pin 5 to Pin 14.  Is it also +5VDC?  If not, then you
might have a bad ground connection.

If those tests are OK, then take a look from GND to Pin 4 (MCLR) and
make sure that your pull-up resistor is giving you a good +5VDC here
as well.

Did you check if your programmer driver software is overriding your
__CONFIG statement (remember those check boxes I was telling you
about)?  Does your programmer verify that your code made it into the
PIC OK?

> Do I have to conect any other pins than Vcc, Vss, OSC1 and OSC2 for
> this test?

Yes.  As Bob pointed out, Pin 4 is the MCLR pin and is usually tied to
+V via a resistor.  About any value will do.  I have used 10K in the
past with no problems.  David Tait used 1K.  Anything will do.

> Is it possible, that if my software is broken it stops the clock?

No.  I don't think that software could stop the clock unless *the
config fuses aren't correct* which could affect the operation of the
R/C or ceramic resonator.  Once again, a canned oscillator would give
you the best and most reliable clock.  Of course, if you don't have
one, that isn't much help.

Send me either a schematic (ASCII art or GIF) or just a detailed
description of what is connected to each pin, plus the ASM file and
I'll be glad to look it over.  Best to do this off of the list.  Reach
me at:

    .....mjg99KILLspamspam@spam@yahoo.com

Hang in there.  Once this little glitch is overcome, you'll be the
master of a new art.

==
Michael

*************************************************************************
When the way of the Tao is forgotten, kindness and ethics must be taught.
Men must learn to pretend to be wise and good.  --  Lao Tzu
*************************************************************************

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

1998\08\30@061212 by Thomas Kleffel

flavicon
face
Hi!

>>3)  And, I COULD BE DEAD WRONG, but if I were going to look for a
>>crystal or ceramic oscillator operation with a scope probe, my first
>>thought would be that the probe would load the oscillator down and
>>stop it, thus seeing nothing.  My try would be to look at pin 15
>>(OSC2) as that is the output of the PIC's internal inverter circuitry.
>> If any of the PICsters out there have an opinion on this, I would
>>like to hear it.
>>
>
>I routinely troubleshoot boards with 16C54A parts and use a scope probe
>right on the resonator pins to see if it's working. I use a 10X probe,
>which reduces the loading problem. With a resonator you should see about 3V
>p-p sine wave on the OSC in pin and a full 5V on the OSC out. Not sure what
>you would see with RC; my guess would be similar voltage levels but
>waveform more like a sawtooth.
On pin 16 I see about 0.9 Volts and on pin 15 I see a 4MHz-Sine-Wave
between 1.0 and 1.6 Volts.


>We use Panasonic and Murata parts that have the caps built in. If Thomas's
>has three pins in a row that's probably what he has.
>
>Thomas, what frequency is it? Do you have MCLR tied high or pulled up? Do
>you have the watchdog timer disabled?

It's 4MHz. I have MCLR connectet to +5V.
The watch dog timer is off.


I've just testet it with RC-Combinations and I found a combination that
worked.
(10kOhm,80pF)

I was able to see a square-wave at OSC2.

But this doesn't help me, as I need exactly 4MHz.

Thanks for your help, Tommy

1998\08\30@061221 by Thomas Kleffel

flavicon
face
>Thomas wrote:
>
>> I just tried with RC. It didn't work :(
>
>What values did you use for the R and C?  Did you see any waveform at
>all?  Did you remember to set the __CONFIG fuses for _RC_OSC?  Did you
>check for the programmer overriding your __CONFIG directive?


That's not the Problem. I've now found a combination that worked :)
But thios doesn't help me, as I need exactly 4MHz. :(
Hmm...I now know that my pic is ok ! :)
I don't use directives at all, I always set my config direct in the
programmer.


{Quote hidden}

These Tests were all ok...


>If those tests are OK, then take a look from GND to Pin 4 (MCLR) and
>make sure that your pull-up resistor is giving you a good +5VDC here
>as well.

Mhhmmm...I connectet MCLR directly to the +5V without the pull-up-resistor.

>Did you check if your programmer driver software is overriding your
>__CONFIG statement (remember those check boxes I was telling you
>about)?  Does your programmer verify that your code made it into the
>PIC OK?
I ckecked that, yes. My programmer is a Picstart 16B1. It does verify, and
I can set the fuses manually there.


>
>> Do I have to conect any other pins than Vcc, Vss, OSC1 and OSC2 for
>> this test?
>
>Yes.  As Bob pointed out, Pin 4 is the MCLR pin and is usually tied to
>+V via a resistor.  About any value will do.  I have used 10K in the
>past with no problems.  David Tait used 1K.  Anything will do.

As I said, I did ith without a resistor. Is this ok?


Ciao, Tommy

1998\08\30@074549 by uter van ooijen / floortje hanneman

picon face
> Do I have to conect any other pins than Vcc, Vss, OSC1 and OSC2 for this
test?

What did you do with MCLR? Tie it to Vcc with a 33k!
I have had problems with 3-pin ceramic resonators, so I stick to crystals
(with separate caps).
And mayby post your full schematics and the program you are using!

regards,
Wouter.

1998\08\30@083441 by Robert & Susan Hoar

flavicon
face
Be sure you have the internal settings right. The pic will just sit there
like a bump on a log if it thinks there is a different type of clock there.
I routinely use RC, but when I program the pic, if I don't set the mode
right it will do nothing.

My stepper motor driver uses RC since there is no time exact requirements
necessary.

Check it out if you need to.


Red
Robert Hoar

rwhoarspamKILLspamtecnet1.jcte.jcs.mil
.....srhoarKILLspamspam.....global2000.net

With Interest in Astronomy, Celestrial Navigation,
Embedded Controls, Nuclear Power.

ICQ #10764173

For great search engines and other info try my web page
<http://www.members.global2000.net/~srhoar/>

1998\08\30@104249 by Reginald Neale

flavicon
face
Tommy said:

>
>That's not the Problem. I've now found a combination that worked :)
>But thios doesn't help me, as I need exactly 4MHz. :(

 Most resonators are spec'd within 0.5%. How close do you need to be?

>As I said, I did ith without a resistor. Is this ok?

 Yes, that's fine. When you change from RC to resonator, are you changing
 the OSC config bit from RC to X?

Reg Neale

1998\08\30@111243 by Thomas Kleffel

flavicon
face
>>That's not the Problem. I've now found a combination that worked :)
>>But thios doesn't help me, as I need exactly 4MHz. :(

>  Most resonators are spec'd within 0.5%. How close do you need to be?

That's ok..I need about 2%

>>As I said, I did ith without a resistor. Is this ok?
>
>  Yes, that's fine. When you change from RC to resonator, are you changing
>  the OSC config bit from RC to X?
Yes..I checked that.

Thanks, Tommy

1998\08\31@045533 by Stefan Sczekalla-Waldschmidt

flavicon
face
Hi Folks,

What ever you are doing with a PIC...

KEEP IN MIND TO PULL EVERY UNUSED PIN OF THE PIC TO A DEDICATED VOLTAGE
VIA PULL-UP OR PULL-DOWN RESISTORS OR MAKE ALL UNUSED PINS OUTPUT.

Just in case Oszilator running and nothing works :-)

Kind regards

       Stefan Sczekalla-Waldschmidt
       EraseMEsswspam_OUTspamTakeThisOuToikossw.de

1998\08\31@083956 by David VanHorn

flavicon
face
>KEEP IN MIND TO PULL EVERY UNUSED PIN OF THE PIC TO A DEDICATED VOLTAGE
>VIA PULL-UP OR PULL-DOWN RESISTORS OR MAKE ALL UNUSED PINS OUTPUT.


On ANY microcontroller, unused I/O pins should be set as output, and unused
chip features should be disabled.

1998\08\31@101232 by Stefan Sczekalla-Waldschmidt

flavicon
face
David VanHorn wrote:
>
> >KEEP IN MIND TO PULL EVERY UNUSED PIN OF THE PIC TO A DEDICATED VOLTAGE
> >VIA PULL-UP OR PULL-DOWN RESISTORS OR MAKE ALL UNUSED PINS OUTPUT.
>
> On ANY microcontroller, unused I/O pins should be set as output, and unused
> chip features should be disabled.

Well, ok, pulling unused inputs to a dedicated voltage e.g. GND, Vss
sould be done everywhere... :-)

Mit freundlichen Gruessen,

       Stefan Sczekalla-Waldschmidt
       sswspamspam_OUToikossw.de

1998\08\31@112025 by David VanHorn

flavicon
face
>> On ANY microcontroller, unused I/O pins should be set as output, and
unused
>> chip features should be disabled.
>
>Well, ok, pulling unused inputs to a dedicated voltage e.g. GND, Vss
>sould be done everywhere... :-)


I agree, it's simpler in terms of hardware though, to set them to output and
take them to a definite state. If the pins can't be defined as an output,
then certainly, they need to be tied to whichever logic level results in
them being "idle".

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