A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.
Crystals - Paul - Oct 17 14:14:56 2008
Hello. Just wondering, i've worked with PICs for a while now and been
using 2222 680 Series Low K 100Vdc capacitors for the oscillator with
LF A147K 20/16Mhz crystal. All works fine, but had some issues with it
today. First, am i using the correct type of capacitor? Not sure on the
size as the PIC says one thing and the Crystal says another.
Basically, i had a 16Mhz/18pF arrangment for a PIC16F877, working fine.
I changed the pic for a PIC18F4331 and the osc seems random. I made a
simple LED flash program and it wasn't very accurate, and would the pic
would reset regually.. Put the 877 back in, all ok. A little weird.. I
set the Osc to HS.
I'm currently trying to get hold of my project that i used the 4331 in
to see what i used, as that worked fine. Any advice about selection of
these components. I have located AN588 btw
Oh, while i'm on, does any pic have a pulse output device? Not PWM, but
just pulse. Currently using PWM 50%, but just wondering.
Thank you,
Paul
------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: Crystals - "John J. McDonough, WB8RCR" - Oct 17 14:47:32 2008
Paul
The voltage rating seems a little overkill, but otherwise it should be fine.
The LP/XT/HS configuration bit has to do with drive. Generally the lower
drive selection matches with lower frequencies, and for most crystals it
should be fine. However, it is possible to have an especially active
crystal that wants lower drive than you would expect, or a particularly dead
crystal that needs higher. Generally the only penalty for higher drive than
necessary is increased power consumption. In theory you could damage the
crystal with too much drive, but in practice I''ve never seen that happen.
The capacitor value depends on your crystal spec and the PIC. The PIC
provides some capacitance, usually around 10 pF, and the remainder of the
crystal's load capacitance is provided by the external capacitors. Given
that caps typically have pretty high tolerances, putting in a pair of caps
equal to the crystal's specified load is generally close enough.
Your symptom does not sound like a slightly wrong value. It takes a lot of
capacitance to change the crystal frequency very much. In my experience,
leaving the caps out entirely will only change the frequency by a couple of
percent. If you are building a counter, then you might replace one of the
caps with a trimmer. On the other hand, very high capacitances, uF instead
of pF, could make the oscillator reluctant to start.
Take a careful look at your configuration bits, plus, of course, the usual
checks for cold solder joints and the like. Also, excessive heat can damage
a crystal, although proper operation after replacing the 877 would indicate
that isn't the case. Also, don't forget that the 18F has a PLL oscillator,
and if the PLL is turned on, your crystal is limited to 10MHz if you want
reliable operation.
72/73 de WB8RCR http://www.qsl.net/wb8rcr
didileydadidah QRP-L #1446 Code Warriors #35
----- Original Message -----
From: "Paul"
To:
Sent: Friday, October 17, 2008 2:14 PM
Subject: [piclist] Crystals
> Hello. Just wondering, i've worked with PICs for a while now and been
> using 2222 680 Series Low K 100Vdc capacitors for the oscillator with
> LF A147K 20/16Mhz crystal. All works fine, but had some issues with it
> today. First, am i using the correct type of capacitor? Not sure on the
> size as the PIC says one thing and the Crystal says another.
> Basically, i had a 16Mhz/18pF arrangment for a PIC16F877, working fine.
> I changed the pic for a PIC18F4331 and the osc seems random. I made a
> simple LED flash program and it wasn't very accurate, and would the pic
> would reset regually.. Put the 877 back in, all ok. A little weird.. I
> set the Osc to HS.
>
> I'm currently trying to get hold of my project that i used the 4331 in
> to see what i used, as that worked fine. Any advice about selection of
> these components. I have located AN588 btw
>
> Oh, while i'm on, does any pic have a pulse output device? Not PWM, but
> just pulse. Currently using PWM 50%, but just wondering.
>
> Thank you,
> Paul
> ------------------------------------
>
> to unsubscribe, go to http://www.yahoogroups.com and follow the
> instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: Crystals - Alex - Oct 20 7:46:31 2008
I've noticed the 18F4331 oscillator being a bit erratic - in my case
using the internal oscillator. Works fine in debug on the ICD2, moody
startup when running standalone, needs a kick on the supply to get it
running. Anyone else seen this?
--- In p...@yahoogroups.com, "Paul"
wrote:
>
> Hello. Just wondering, i've worked with PICs for a while now and been
> using 2222 680 Series Low K 100Vdc capacitors for the oscillator with
> LF A147K 20/16Mhz crystal. All works fine, but had some issues with it
> today. First, am i using the correct type of capacitor? Not sure on the
> size as the PIC says one thing and the Crystal says another.
> Basically, i had a 16Mhz/18pF arrangment for a PIC16F877, working fine.
> I changed the pic for a PIC18F4331 and the osc seems random. I made a
> simple LED flash program and it wasn't very accurate, and would the pic
> would reset regually.. Put the 877 back in, all ok. A little weird.. I
> set the Osc to HS.
>
> I'm currently trying to get hold of my project that i used the 4331 in
> to see what i used, as that worked fine. Any advice about selection of
> these components. I have located AN588 btw
>
> Oh, while i'm on, does any pic have a pulse output device? Not PWM, but
> just pulse. Currently using PWM 50%, but just wondering.
>
> Thank you,
> Paul
>
------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: Re: Crystals - Temtu - Oct 20 8:44:03 2008
Hi Alex,
Please check
http://www.epsontoyocom.co.jp/english/C_support/C_design/MSP430series/index.html
----- Original Message -----
From: Alex
To: p...@yahoogroups.com
Sent: Monday, October 20, 2008 7:46 AM
Subject: [piclist] Re: Crystals
I've noticed the 18F4331 oscillator being a bit erratic - in my case
using the internal oscillator. Works fine in debug on the ICD2, moody
startup when running standalone, needs a kick on the supply to get it
running. Anyone else seen this?
--- In p...@yahoogroups.com, "Paul"
wrote:
>
> Hello. Just wondering, i've worked with PICs for a while now and been
> using 2222 680 Series Low K 100Vdc capacitors for the oscillator with
> LF A147K 20/16Mhz crystal. All works fine, but had some issues with it
> today. First, am i using the correct type of capacitor? Not sure on the
> size as the PIC says one thing and the Crystal says another.
> Basically, i had a 16Mhz/18pF arrangment for a PIC16F877, working fine.
> I changed the pic for a PIC18F4331 and the osc seems random. I made a
> simple LED flash program and it wasn't very accurate, and would the pic
> would reset regually.. Put the 877 back in, all ok. A little weird.. I
> set the Osc to HS.
>
> I'm currently trying to get hold of my project that i used the 4331 in
> to see what i used, as that worked fine. Any advice about selection of
> these components. I have located AN588 btw
>
> Oh, while i'm on, does any pic have a pulse output device? Not PWM, but
> just pulse. Currently using PWM 50%, but just wondering.
>
> Thank you,
> Paul
>

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: Crystals - Paul - Oct 20 12:48:32 2008
Hi
Thanks for the info. Thing is, I've never had a problem with the osc before. Its always
just seemed to work.
I'm not 100% sure the 4331 is ok to be honest, it was a year ago when I used them last,
and they might not be ok..
I'm getting a couple more to check, plus some new crystals and a few various caps to play
with.
Hopefully this may get me going. Daft thing is, I've got hold of my old board, and its the
same bits I'm using now. But as I said, 4331 maybe broke!
I really want to take out a chip and read the config, but I daren't in case it doesn't
work again!
I am thinking along the lines of interference now though, the difference now from then is
the 5V PSU. What happened tonight was that the pic just wouldn't run, so I turned the PSU
off from the mains and it started flashing until the power was gone.. Interference from
the PSU? I am thinking.. More tests tomorrow
Thanks
Paul
From: John J. McDonough, WB8RCR
Sent: Friday, October 17, 2008 7:47 PM
To: p...@yahoogroups.com
Subject: Re: [piclist] Crystals
Paul
The voltage rating seems a little overkill, but otherwise it should be fine.
The LP/XT/HS configuration bit has to do with drive. Generally the lower
drive selection matches with lower frequencies, and for most crystals it
should be fine. However, it is possible to have an especially active
crystal that wants lower drive than you would expect, or a particularly dead
crystal that needs higher. Generally the only penalty for higher drive than
necessary is increased power consumption. In theory you could damage the
crystal with too much drive, but in practice I''ve never seen that happen.
The capacitor value depends on your crystal spec and the PIC. The PIC
provides some capacitance, usually around 10 pF, and the remainder of the
crystal's load capacitance is provided by the external capacitors. Given
that caps typically have pretty high tolerances, putting in a pair of caps
equal to the crystal's specified load is generally close enough.
Your symptom does not sound like a slightly wrong value. It takes a lot of
capacitance to change the crystal frequency very much. In my experience,
leaving the caps out entirely will only change the frequency by a couple of
percent. If you are building a counter, then you might replace one of the
caps with a trimmer. On the other hand, very high capacitances, uF instead
of pF, could make the oscillator reluctant to start.
Take a careful look at your configuration bits, plus, of course, the usual
checks for cold solder joints and the like. Also, excessive heat can damage
a crystal, although proper operation after replacing the 877 would indicate
that isn't the case. Also, don't forget that the 18F has a PLL oscillator,
and if the PLL is turned on, your crystal is limited to 10MHz if you want
reliable operation.
72/73 de WB8RCR http://www.qsl.net/wb8rcr
didileydadidah QRP-L #1446 Code Warriors #35
----- Original Message -----
From: "Paul"
To:
Sent: Friday, October 17, 2008 2:14 PM
Subject: [piclist] Crystals
> Hello. Just wondering, i've worked with PICs for a while now and been
> using 2222 680 Series Low K 100Vdc capacitors for the oscillator with
> LF A147K 20/16Mhz crystal. All works fine, but had some issues with it
> today. First, am i using the correct type of capacitor? Not sure on the
> size as the PIC says one thing and the Crystal says another.
> Basically, i had a 16Mhz/18pF arrangment for a PIC16F877, working fine.
> I changed the pic for a PIC18F4331 and the osc seems random. I made a
> simple LED flash program and it wasn't very accurate, and would the pic
> would reset regually.. Put the 877 back in, all ok. A little weird.. I
> set the Osc to HS.
>
> I'm currently trying to get hold of my project that i used the 4331 in
> to see what i used, as that worked fine. Any advice about selection of
> these components. I have located AN588 btw
>
> Oh, while i'm on, does any pic have a pulse output device? Not PWM, but
> just pulse. Currently using PWM 50%, but just wondering.
>
> Thank you,
> Paul
> ------------------------------------
>
> to unsubscribe, go to http://www.yahoogroups.com and follow the
> instructionsYahoo! Groups Links

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: Crystals - Alex - Oct 26 7:57:34 2008
Solved it - it was software, of course. INT0 flapping and interrupt
left enabled, floated safe on the ICD2 but in freerun it would get
stuck in an eternal unserviced interrupt loop very soon after startup.
That's what comes of reusing code and not going through it with a fine
tooth comb.
--- In p...@yahoogroups.com, "Alex"
wrote:
>
> I've noticed the 18F4331 oscillator being a bit erratic - in my case
> using the internal oscillator. Works fine in debug on the ICD2, moody
> startup when running standalone, needs a kick on the supply to get it
> running. Anyone else seen this?
> --- In p...@yahoogroups.com, "Paul" wrote:
> >
> > Hello. Just wondering, i've worked with PICs for a while now and been
> > using 2222 680 Series Low K 100Vdc capacitors for the oscillator with
> > LF A147K 20/16Mhz crystal. All works fine, but had some issues
with it
> > today. First, am i using the correct type of capacitor? Not sure
on the
> > size as the PIC says one thing and the Crystal says another.
> > Basically, i had a 16Mhz/18pF arrangment for a PIC16F877, working
fine.
> > I changed the pic for a PIC18F4331 and the osc seems random. I made a
> > simple LED flash program and it wasn't very accurate, and would
the pic
> > would reset regually.. Put the 877 back in, all ok. A little
weird.. I
> > set the Osc to HS.
> >
> > I'm currently trying to get hold of my project that i used the
4331 in
> > to see what i used, as that worked fine. Any advice about
selection of
> > these components. I have located AN588 btw
> >
> > Oh, while i'm on, does any pic have a pulse output device? Not
PWM, but
> > just pulse. Currently using PWM 50%, but just wondering.
> >
> > Thank you,
> > Paul
>
------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: Crystals - Paul - Oct 26 9:07:50 2008
Hi
I've got the 18F4331 working now. As it was only a test circuit i did not put in the cap
that goes across the supply rails (0.1uF), i forget its name. I put that in, and all is
well!
Thanks for the help
Paul
From: John J. McDonough, WB8RCR
Sent: Friday, October 17, 2008 6:47 PM
To: p...@yahoogroups.com
Subject: Re: [piclist] Crystals
Paul
The voltage rating seems a little overkill, but otherwise it should be fine.
The LP/XT/HS configuration bit has to do with drive. Generally the lower
drive selection matches with lower frequencies, and for most crystals it
should be fine. However, it is possible to have an especially active
crystal that wants lower drive than you would expect, or a particularly dead
crystal that needs higher. Generally the only penalty for higher drive than
necessary is increased power consumption. In theory you could damage the
crystal with too much drive, but in practice I''ve never seen that happen.
The capacitor value depends on your crystal spec and the PIC. The PIC
provides some capacitance, usually around 10 pF, and the remainder of the
crystal's load capacitance is provided by the external capacitors. Given
that caps typically have pretty high tolerances, putting in a pair of caps
equal to the crystal's specified load is generally close enough.
Your symptom does not sound like a slightly wrong value. It takes a lot of
capacitance to change the crystal frequency very much. In my experience,
leaving the caps out entirely will only change the frequency by a couple of
percent. If you are building a counter, then you might replace one of the
caps with a trimmer. On the other hand, very high capacitances, uF instead
of pF, could make the oscillator reluctant to start.
Take a careful look at your configuration bits, plus, of course, the usual
checks for cold solder joints and the like. Also, excessive heat can damage
a crystal, although proper operation after replacing the 877 would indicate
that isn't the case. Also, don't forget that the 18F has a PLL oscillator,
and if the PLL is turned on, your crystal is limited to 10MHz if you want
reliable operation.
72/73 de WB8RCR http://www.qsl.net/wb8rcr
didileydadidah QRP-L #1446 Code Warriors #35
----- Original Message -----
From: "Paul"
To:
Sent: Friday, October 17, 2008 2:14 PM
Subject: [piclist] Crystals
> Hello. Just wondering, i've worked with PICs for a while now and been
> using 2222 680 Series Low K 100Vdc capacitors for the oscillator with
> LF A147K 20/16Mhz crystal. All works fine, but had some issues with it
> today. First, am i using the correct type of capacitor? Not sure on the
> size as the PIC says one thing and the Crystal says another.
> Basically, i had a 16Mhz/18pF arrangment for a PIC16F877, working fine.
> I changed the pic for a PIC18F4331 and the osc seems random. I made a
> simple LED flash program and it wasn't very accurate, and would the pic
> would reset regually.. Put the 877 back in, all ok. A little weird.. I
> set the Osc to HS.
>
> I'm currently trying to get hold of my project that i used the 4331 in
> to see what i used, as that worked fine. Any advice about selection of
> these components. I have located AN588 btw
>
> Oh, while i'm on, does any pic have a pulse output device? Not PWM, but
> just pulse. Currently using PWM 50%, but just wondering.
>
> Thank you,
> Paul
> ------------------------------------
>
> to unsubscribe, go to http://www.yahoogroups.com and follow the
> instructionsYahoo! Groups Links
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: Crystals - "John J. McDonough, WB8RCR" - Oct 26 9:24:58 2008
A bypass cap across the supply rails, in fact, plenty of caps, is an
absolute must. The problem is that if you leave it out, things might work,
or they might work sometimes. You want a .1 or a .01 right next to the
supply pin on the PIC, as close to the supply pin as you can get, and a
physically smalll cap with short leads. It is critically important to
minumize the inductance between the PIC's power pin and the cap. A short
stretch of PC trace or a centimeter or two of lead is too much inducatance.
If you leave it out, you MAY get strange operation sometimes. In truth, a
lot of the time you can get away without it, but if you are having a problem
because it is missing, the problems can be maddeningly difficult to debug.
Better to be liberal with caps than to spend days fighting intermittent
problems.
72/73 de WB8RCR http://www.qsl.net/wb8rcr
didileydadidah QRP-L #1446 Code Warriors #35
----- Original Message -----
From: Paul
To: p...@yahoogroups.com
Sent: Sunday, October 26, 2008 9:06 AM
Subject: Re: [piclist] Crystals
Hi
I've got the 18F4331 working now. As it was only a test circuit i did not
put in the cap that goes across the supply rails (0.1uF), i forget its name.
I put that in, and all is well!
Thanks for the help
Paul
From: John J. McDonough, WB8RCR
Sent: Friday, October 17, 2008 6:47 PM
To: p...@yahoogroups.com
Subject: Re: [piclist] Crystals
Paul
The voltage rating seems a little overkill, but otherwise it should be fine.
The LP/XT/HS configuration bit has to do with drive. Generally the lower
drive selection matches with lower frequencies, and for most crystals it
should be fine. However, it is possible to have an especially active
crystal that wants lower drive than you would expect, or a particularly dead
crystal that needs higher. Generally the only penalty for higher drive than
necessary is increased power consumption. In theory you could damage the
crystal with too much drive, but in practice I''ve never seen that happen.
The capacitor value depends on your crystal spec and the PIC. The PIC
provides some capacitance, usually around 10 pF, and the remainder of the
crystal's load capacitance is provided by the external capacitors. Given
that caps typically have pretty high tolerances, putting in a pair of caps
equal to the crystal's specified load is generally close enough.
Your symptom does not sound like a slightly wrong value. It takes a lot of
capacitance to change the crystal frequency very much. In my experience,
leaving the caps out entirely will only change the frequency by a couple of
percent. If you are building a counter, then you might replace one of the
caps with a trimmer. On the other hand, very high capacitances, uF instead
of pF, could make the oscillator reluctant to start.
Take a careful look at your configuration bits, plus, of course, the usual
checks for cold solder joints and the like. Also, excessive heat can damage
a crystal, although proper operation after replacing the 877 would indicate
that isn't the case. Also, don't forget that the 18F has a PLL oscillator,
and if the PLL is turned on, your crystal is limited to 10MHz if you want
reliable operation.
72/73 de WB8RCR http://www.qsl.net/wb8rcr
didileydadidah QRP-L #1446 Code Warriors #35
----- Original Message -----
From: "Paul"
To:
Sent: Friday, October 17, 2008 2:14 PM
Subject: [piclist] Crystals
> Hello. Just wondering, i've worked with PICs for a while now and been
> using 2222 680 Series Low K 100Vdc capacitors for the oscillator with
> LF A147K 20/16Mhz crystal. All works fine, but had some issues with it
> today. First, am i using the correct type of capacitor? Not sure on the
> size as the PIC says one thing and the Crystal says another.
> Basically, i had a 16Mhz/18pF arrangment for a PIC16F877, working fine.
> I changed the pic for a PIC18F4331 and the osc seems random. I made a
> simple LED flash program and it wasn't very accurate, and would the pic
> would reset regually.. Put the 877 back in, all ok. A little weird.. I
> set the Osc to HS.
>
> I'm currently trying to get hold of my project that i used the 4331 in
> to see what i used, as that worked fine. Any advice about selection of
> these components. I have located AN588 btw
>
> Oh, while i'm on, does any pic have a pulse output device? Not PWM, but
> just pulse. Currently using PWM 50%, but just wondering.
>
> Thank you,
> Paul
> ------------------------------------
>
> to unsubscribe, go to http://www.yahoogroups.com and follow the
> instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )