PIC oscillators
Archiver
Posts: 46,084
I have a little problem. I have started getting into PIC chips, so one of
the first things I did with the free sample was make it serially transfer
data to and from a BSII. This worked great. I put the sample LED blinking
curcuit back together so I could test the new PICs that I ordered from
Digikey and noticed that the new PIC blinked the LED about 10 times faster
than it should. My immediate reaction was to think that the sample PIC was
a different speed than the Digikey PIC. I changed from the sample resonator
to the Digikey resonator (which are the same in every way I can tell) and it
still did that. When I was using the original free PIC, the curcuit worked
exactly as expected. I have since tried it with both the new and old
resonators, and it produces results exactly like the new PICs. The free one
is a PIC16F84A-20/P and the new ones are PIC16F84A-04/P. According to
digikey, the old one is 20mhz and the new one is 4mhz. I bought 4mhz
resonators from Digikey. What is going on?
One thing that may have something to do with it: In the EPIC Programmer
software, there is an oscillator selection option. Right now it is set to
XT, and the other options are LP (LF), HS, and RC. In the digikey catalog
it says as a column header Xtal/RC. I have no idea what those abbreviations
mean, but I am guessing that Xtal is external and RC is either
resistor-capacitor or resonator-capacitor. The resonators I have are
complete with built-in caps, btw.
Thanks for reading this question that hardly involves stamps at all.
______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup
the first things I did with the free sample was make it serially transfer
data to and from a BSII. This worked great. I put the sample LED blinking
curcuit back together so I could test the new PICs that I ordered from
Digikey and noticed that the new PIC blinked the LED about 10 times faster
than it should. My immediate reaction was to think that the sample PIC was
a different speed than the Digikey PIC. I changed from the sample resonator
to the Digikey resonator (which are the same in every way I can tell) and it
still did that. When I was using the original free PIC, the curcuit worked
exactly as expected. I have since tried it with both the new and old
resonators, and it produces results exactly like the new PICs. The free one
is a PIC16F84A-20/P and the new ones are PIC16F84A-04/P. According to
digikey, the old one is 20mhz and the new one is 4mhz. I bought 4mhz
resonators from Digikey. What is going on?
One thing that may have something to do with it: In the EPIC Programmer
software, there is an oscillator selection option. Right now it is set to
XT, and the other options are LP (LF), HS, and RC. In the digikey catalog
it says as a column header Xtal/RC. I have no idea what those abbreviations
mean, but I am guessing that Xtal is external and RC is either
resistor-capacitor or resonator-capacitor. The resonators I have are
complete with built-in caps, btw.
Thanks for reading this question that hardly involves stamps at all.
______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup
Comments
Yanroy wrote:
>
> I have a little problem. I have started getting into PIC chips, so one of
> the first things I did with the free sample was make it serially transfer
> data to and from a BSII. This worked great. I put the sample LED blinking
> curcuit back together so I could test the new PICs that I ordered from
> Digikey and noticed that the new PIC blinked the LED about 10 times faster
> than it should. My immediate reaction was to think that the sample PIC was
> a different speed than the Digikey PIC. I changed from the sample resonator
> to the Digikey resonator (which are the same in every way I can tell) and it
> still did that. When I was using the original free PIC, the curcuit worked
> exactly as expected. I have since tried it with both the new and old
> resonators, and it produces results exactly like the new PICs. The free one
> is a PIC16F84A-20/P and the new ones are PIC16F84A-04/P. According to
> digikey, the old one is 20mhz and the new one is 4mhz. I bought 4mhz
> resonators from Digikey. What is going on?
>
> One thing that may have something to do with it: In the EPIC Programmer
> software, there is an oscillator selection option. Right now it is set to
> XT, and the other options are LP (LF), HS, and RC. In the digikey catalog
> it says as a column header Xtal/RC. I have no idea what those abbreviations
> mean, but I am guessing that Xtal is external and RC is either
> resistor-capacitor or resonator-capacitor. The resonators I have are
> complete with built-in caps, btw.
>
> Thanks for reading this question that hardly involves stamps at all.
>
> ______________________________________________
> FREE Personalized Email at Mail.com
> Sign up at http://www.mail.com/?sr=signup
prior to burning it.
The PIC16F84A for the 20MHz version, and the PIC16F84 for
the 4MHz version. This should cure the problem.
Regards,
Bruce
webmaster@r...
http://ww.rentron.com
Original Message
From: "Yanroy" <yanroy@u...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, February 09, 2001 4:14 PM
Subject: [noparse][[/noparse]basicstamps] PIC oscillators
> I have a little problem. I have started getting into PIC chips, so one of
> the first things I did with the free sample was make it serially transfer
> data to and from a BSII. This worked great. I put the sample LED blinking
> curcuit back together so I could test the new PICs that I ordered from
> Digikey and noticed that the new PIC blinked the LED about 10 times faster
> than it should. My immediate reaction was to think that the sample PIC was
> a different speed than the Digikey PIC. I changed from the sample resonator
> to the Digikey resonator (which are the same in every way I can tell) and it
> still did that. When I was using the original free PIC, the curcuit worked
> exactly as expected. I have since tried it with both the new and old
> resonators, and it produces results exactly like the new PICs. The free one
> is a PIC16F84A-20/P and the new ones are PIC16F84A-04/P. According to
> digikey, the old one is 20mhz and the new one is 4mhz. I bought 4mhz
> resonators from Digikey. What is going on?
>
> One thing that may have something to do with it: In the EPIC Programmer
> software, there is an oscillator selection option. Right now it is set to
> XT, and the other options are LP (LF), HS, and RC. In the digikey catalog
> it says as a column header Xtal/RC. I have no idea what those abbreviations
> mean, but I am guessing that Xtal is external and RC is either
> resistor-capacitor or resonator-capacitor. The resonators I have are
> complete with built-in caps, btw.
>
> Thanks for reading this question that hardly involves stamps at all.
>
>
> ______________________________________________
> FREE Personalized Email at Mail.com
> Sign up at http://www.mail.com/?sr=signup
>
>
>
>
difference between the 2 PICs is the 20 can be safely run up to 20 mhz, and
the 04 is only safe to 4 mhz. I run a 20 on a 4 mhz crystal all the time
(less power draw if you don't need the extra speed). On the oscillator
setting, LP is low power for use with very slow speeds on the khz range, HS
is high speed which is what you are suppose to use with a 20 mhz crystal or
resonator, but I have always run XT just fine. XT is for Crystal which is
also the setting you use for a resonator. RC is for a resistor capacitor to
cut cost, but the timing tends to drift with temperature.
Still doesn't address your problem as the speed is controlled by the
resonator, crystal, or RC you are using and the rating on the chip just
assures you it will not melt at that speed or lower.
I am using LETBasic (www.Letbasic.com), Micro Engineering Labs PIC Basic Pro
(www.melabs.com), and assembler. To program with.
Tim
[noparse][[/noparse]Denver, CO]
> I have a little problem. I have started getting into PIC chips, so one of
> the first things I did with the free sample was make it serially transfer
> data to and from a BSII. This worked great. I put the sample
> LED blinking
> curcuit back together so I could test the new PICs that I ordered from
> Digikey and noticed that the new PIC blinked the LED about 10 times faster
> than it should. My immediate reaction was to think that the
> sample PIC was
> a different speed than the Digikey PIC. I changed from the
> sample resonator
> to the Digikey resonator (which are the same in every way I can
> tell) and it
> still did that. When I was using the original free PIC, the
> curcuit worked
> exactly as expected. I have since tried it with both the new and old
> resonators, and it produces results exactly like the new PICs.
> The free one
> is a PIC16F84A-20/P and the new ones are PIC16F84A-04/P. According to
> digikey, the old one is 20mhz and the new one is 4mhz. I bought 4mhz
> resonators from Digikey. What is going on?
>
> One thing that may have something to do with it: In the EPIC Programmer
> software, there is an oscillator selection option. Right now it is set to
> XT, and the other options are LP (LF), HS, and RC. In the digikey catalog
> it says as a column header Xtal/RC. I have no idea what those
> abbreviations
> mean, but I am guessing that Xtal is external and RC is either
> resistor-capacitor or resonator-capacitor. The resonators I have are
> complete with built-in caps, btw.
>
> Thanks for reading this question that hardly involves stamps at all.
>
>
> ______________________________________________
> FREE Personalized Email at Mail.com
> Sign up at http://www.mail.com/?sr=signup
>
>
>
>
far... I haven't had a chance to try programming the chip as an F84 instead
of F84A.
______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup
Depending on how your code has been written, if the wdt resets
and starts your program from the beginning it may result in what
you have described.
Not following proper coding but here is an example
Start
Output high
Pause 1 sec.
Ouput low
Pause 1 sec.
goto start
If your wdt is set at say 1.1 sec then will essentially replace your
last statement "goto start"
The WDT is configurable and a part of the fuses when you program.
For now the best bet is to leave it disabled. It can be a powerful
tool in complex programs and a pain in simple ones.
Hope this helps
On 9 Feb 2001, at 18:14, Yanroy wrote:
> I have a little problem. I have started getting into PIC chips, so one of
> the first things I did with the free sample was make it serially transfer
> data to and from a BSII. This worked great. I put the sample LED blinking
> curcuit back together so I could test the new PICs that I ordered from
> Digikey and noticed that the new PIC blinked the LED about 10 times faster
> than it should. My immediate reaction was to think that the sample PIC was
> a different speed than the Digikey PIC. I changed from the sample resonator
> to the Digikey resonator (which are the same in every way I can tell) and it
> still did that. When I was using the original free PIC, the curcuit worked
> exactly as expected. I have since tried it with both the new and old
> resonators, and it produces results exactly like the new PICs. The free one
> is a PIC16F84A-20/P and the new ones are PIC16F84A-04/P. According to
> digikey, the old one is 20mhz and the new one is 4mhz. I bought 4mhz
> resonators from Digikey. What is going on?
>
> One thing that may have something to do with it: In the EPIC Programmer
> software, there is an oscillator selection option. Right now it is set to
> XT, and the other options are LP (LF), HS, and RC. In the digikey catalog
> it says as a column header Xtal/RC. I have no idea what those abbreviations
> mean, but I am guessing that Xtal is external and RC is either
> resistor-capacitor or resonator-capacitor. The resonators I have are
> complete with built-in caps, btw.
>
> Thanks for reading this question that hardly involves stamps at all.
>
>
> ______________________________________________
> FREE Personalized Email at Mail.com
> Sign up at http://www.mail.com/?sr=signup
>
>
>
>
Dan Henne
Sales
HVW Technologies Inc.
Dan@H...
Tel[noparse]:([/noparse]403)730-8603 Fax[noparse]:([/noparse]403)730-8903
Visit our web site: http://www.hvwtech.com