FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Forum index » Electronix » Basics
PIC internal oscillator running fast
Post new topic   Reply to topic Page 1 of 1 [7 Posts] View previous topic :: View next topic
Author Message
Eric Behr
electronics forum beginner


Joined: 09 Jul 2006
Posts: 4

PostPosted: Wed Jul 12, 2006 7:45 pm    Post subject: Re: PIC internal oscillator running fast Reply with quote

In article <9vk5b25ct91c6oam7f0gii42msdj0dc8ti@4ax.com>, <feebo> wrote:
Quote:
On 9 Jul 2006 22:37:03 GMT, behr@muir.math.niu.edu (Eric Behr) wrote:

I never noticed this because I haven't needed much accuracy in the
past. I now calibrated all the chips I have via trial-and-error.
Live and learn... Thanks very much for prodding me towards this
possibility.

sonow you have them calibrated, what is the variance between them
(clock wise)

I had to use 0x17 on one of them, 0x1c on another, and 0x23 on two
others. I didn't check the extremes, except I know that they ran at
up to 1.25 MHz CLCKOUT with - I assume - OSCCAL being all 1s.

--
Eric Behr | NIU Mathematical Sciences | (815) 753 6727
behr@math.niu.edu | http://www.math.niu.edu/~behr/ | fax: 753 1112
Back to top
feebo@nirgendwo
electronics forum beginner


Joined: 17 Jun 2006
Posts: 11

PostPosted: Mon Jul 10, 2006 10:26 pm    Post subject: Re: PIC internal oscillator running fast Reply with quote

On 9 Jul 2006 22:37:03 GMT, behr@muir.math.niu.edu (Eric Behr) wrote:

Quote:
In article <e8roq9$n9t$1@news.math.niu.edu>,
Eric Behr <behr@muir.math.niu.edu> wrote:
In article <slrneb2h6t.2l5q.ben@saturn.home.ben.com>,
Ben Jackson <ben@ben.com> wrote:
On 2006-07-09, Eric Behr <behr@muir.math.niu.edu> wrote:
I have several 12f629s from different purchases. I just measured
the CLKOUT signal and I'm getting between 1.15 and 1.25 MHz both

Did your programmer preserve OSCCAL? Are you setting it at startup?

I don't believe so

I meant I believe the programmer preserves it.

But you were absolutely right. It looks like my PicKit was wiping
0x3ff while programming. I can't even complain, because I'm using
Microchip's unsupported Mac OSX software.

I never noticed this because I haven't needed much accuracy in the
past. I now calibrated all the chips I have via trial-and-error.
Live and learn... Thanks very much for prodding me towards this
possibility.
sonow you have them calibrated, what is the variance between them

(clock wise)
Back to top
Ben Jackson
electronics forum beginner


Joined: 19 Sep 2005
Posts: 48

PostPosted: Mon Jul 10, 2006 12:21 am    Post subject: Re: PIC internal oscillator running fast Reply with quote

On 2006-07-09, Ben Jackson <ben@ben.com> wrote:
Quote:
Did your programmer preserve OSCCAL? Are you setting it at startup?

call H'3FF'
bsf STATUS, RP0
movlw d'174'
movwf OSCCAL
bcf STATUS, RP0

Doh, on re-reading this I see that movlw in there for some reason. I
must have manually calibrated the chip I used for the project I was
quoting. So if someone wants to use that snippet, don't keep the
movlw!

--
Ben Jackson AD7GD
<ben@ben.com>
http://www.ben.com/
Back to top
Eric Behr
electronics forum beginner


Joined: 09 Jul 2006
Posts: 4

PostPosted: Sun Jul 09, 2006 10:37 pm    Post subject: Re: PIC internal oscillator running fast Reply with quote

In article <e8roq9$n9t$1@news.math.niu.edu>,
Eric Behr <behr@muir.math.niu.edu> wrote:
Quote:
In article <slrneb2h6t.2l5q.ben@saturn.home.ben.com>,
Ben Jackson <ben@ben.com> wrote:
On 2006-07-09, Eric Behr <behr@muir.math.niu.edu> wrote:
I have several 12f629s from different purchases. I just measured
the CLKOUT signal and I'm getting between 1.15 and 1.25 MHz both

Did your programmer preserve OSCCAL? Are you setting it at startup?

I don't believe so

I meant I believe the programmer preserves it.

But you were absolutely right. It looks like my PicKit was wiping
0x3ff while programming. I can't even complain, because I'm using
Microchip's unsupported Mac OSX software.

I never noticed this because I haven't needed much accuracy in the
past. I now calibrated all the chips I have via trial-and-error.
Live and learn... Thanks very much for prodding me towards this
possibility.

--
Eric Behr | NIU Mathematical Sciences | (815) 753 6727
behr@math.niu.edu | http://www.math.niu.edu/~behr/ | fax: 753 1112
Back to top
Eric Behr
electronics forum beginner


Joined: 09 Jul 2006
Posts: 4

PostPosted: Sun Jul 09, 2006 8:26 pm    Post subject: Re: PIC internal oscillator running fast Reply with quote

In article <slrneb2h6t.2l5q.ben@saturn.home.ben.com>,
Ben Jackson <ben@ben.com> wrote:
Quote:
On 2006-07-09, Eric Behr <behr@muir.math.niu.edu> wrote:
I have several 12f629s from different purchases. I just measured
the CLKOUT signal and I'm getting between 1.15 and 1.25 MHz both

Did your programmer preserve OSCCAL? Are you setting it at startup?

I don't believe so; certainly not on all the parts I tried, unless
my PicKit 1 messes it up (Microchip claims that their tools always
preserve it). Plus I didn't think the OSCCAL value can alter the
frequency more than a few %. But I'll play around with it. Thanks.

--
Eric Behr | NIU Mathematical Sciences | (815) 753 6727
behr@math.niu.edu | http://www.math.niu.edu/~behr/ | fax: 753 1112
Back to top
Ben Jackson
electronics forum beginner


Joined: 19 Sep 2005
Posts: 48

PostPosted: Sun Jul 09, 2006 6:03 pm    Post subject: Re: PIC internal oscillator running fast Reply with quote

On 2006-07-09, Eric Behr <behr@muir.math.niu.edu> wrote:
Quote:
I have several 12f629s from different purchases. I just measured
the CLKOUT signal and I'm getting between 1.15 and 1.25 MHz both

Did your programmer preserve OSCCAL? Are you setting it at startup?

call H'3FF'
bsf STATUS, RP0
movlw d'174'
movwf OSCCAL
bcf STATUS, RP0

If your programmer has wiped out OSCCAL at 3ff you are going to have
to work out what it should be.

--
Ben Jackson AD7GD
<ben@ben.com>
http://www.ben.com/
Back to top
Eric Behr
electronics forum beginner


Joined: 09 Jul 2006
Posts: 4

PostPosted: Sun Jul 09, 2006 5:14 pm    Post subject: PIC internal oscillator running fast Reply with quote

I have several 12f629s from different purchases. I just measured
the CLKOUT signal and I'm getting between 1.15 and 1.25 MHz both
with a simple freq. counter (DMM) and a decently calibrated scope.
Vdd between 3 and 5V doesn't make too much difference in what I'm
seeing.

I understand that Microchip INTOSC accuracy specs are optimistic,
but up to 25% off is way more than I expected. Other than really
lousy manufacturing tolerances, what else might be causing this?
Thanks for any ideas or hints.

--
Eric Behr | NIU Mathematical Sciences | (815) 753 6727
behr@math.niu.edu | http://www.math.niu.edu/~behr/ | fax: 753 1112
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [7 Posts] View previous topic :: View next topic
The time now is Wed Apr 24, 2019 2:12 pm | All times are GMT
Forum index » Electronix » Basics
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Universal / Commutator motor running slowly- puzzled! google@river-view.freeser Repair 3 Fri Jul 21, 2006 11:45 am
No new posts Are there any fast simulation tools? ddznq Basics 2 Tue Jul 18, 2006 1:08 pm
No new posts Sony turntable runs too fast, too slow jeffgreinert@yahoo.com Repair 13 Fri Jul 14, 2006 4:37 am
No new posts FS Hewlett-Packard Audio Oscillator Model 200c <wboas@nyx.net> Equipment 0 Fri Jul 07, 2006 12:45 am
No new posts MAKE MONEY FAST!!!!! Durn Basics 3 Sat Jul 01, 2006 8:48 pm

Copyright © 2004-2005 DeniX Solutions SRL
Other DeniX Solutions sites: Unix/Linux blog |  Unix/Linux documentation |  Unix/Linux forums |  Medicine forum |  Science forum  |  Send and track newsletters


Powered by phpBB © 2001, 2005 phpBB Group