Searching \ for '16F84 10MHz Accuracy/Trim' 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 10MHz Accuracy/Trim'.

Truncated match.
PICList Thread
'16F84 10MHz Accuracy/Trim'
1998\10\19@024000 by James Cameron

flavicon
face
WIL REEDER wrote:
> It is very accurate as long as the pic clock is trimmed properly.

If I write code on a 16F84-10 that uses the TMR0 attached to the
oscillator as part of a time base ... how do I calculate the error,
measure the error and trim accordingly?

I've a plan to take my car's cruise control speed sensor line and attach
it to a PIC in order to display speed more accurately than the analog
speed meter.

--
James Cameron                                    (spam_OUTcameronTakeThisOuTspamstl.dec.com)
Digital Equipment Corporation (Australia) Pty. Ltd. A.C.N. 000 446 800

1998\10\19@044020 by Regulus Berdin

flavicon
face
James Cameron wrote:
>
> WIL REEDER wrote:
> > It is very accurate as long as the pic clock is trimmed properly.
>
> If I write code on a 16F84-10 that uses the TMR0 attached to the
> oscillator as part of a time base ... how do I calculate the error,
> measure the error and trim accordingly?
The adjustment is done using a trimmer as loading capacitor on the
crystal. To adjust a frequency meter is very easy, just inject an
accurate and known frequency to the meter and rotate the trimmer caps to
have the same reading.

You may be tempted to put a frequency counter on the oscillator to
trim.  But putting a probe on the oscillator can load the crystal and
change the frequency a bit.

> I've a plan to take my car's cruise control speed sensor line and attach
> it to a PIC in order to display speed more accurately than the analog
> speed meter.
For your application, the same technique applies.  Just simulate the
speed with an accurate frequency generator and adjust the trimmer cap.

A way also is to make a program to toggle an output of the pic and
measure the frequency and adjust accordingly.

Reggie

1998\10\19@074026 by paulb

flavicon
face
James Cameron wrote:

> If I write code on a 16F84-10 that uses the TMR0 attached to the
> oscillator as part of a time base ... how do I calculate the error,
> measure the error and trim accordingly?

 What crystal do you propose to use?  If for example it *is* 10MHz,
that is very easy to adjust with no connection to the circuit at all.
Just tune an HF ("shortwave") receiver to WWVH (Hawaii - generally can
be received in Australia) then approach with the PIC assembly until you
receive its signal with comparable strength to WWVH, and tune the
trimmer for zero beat.

 For other frequencies, program the 16F84 to execute:

       movlw   1       ; for bit zero
       xorlw   -1
       tris    porta
       clrf    porta
       movlw   -1
loop    xorwf   porta,f
       goto loop

 .. with WDT disabled to output one-sixth of the clock frequency on bit
0 of port A (or any other as required) to a frequency meter without
needing to probe the crystal lines.  Add a NOP to output one eighth if
this is easier.

> I've a plan to take my car's cruise control speed sensor line and
> attach it to a PIC in order to display speed more accurately than the
> analog speed meter.

 This *is* an entirely different question is it not?  An *un-*trimmed
crystal will be many orders of magnitude more accurate than an analog
tachometer, and far more accurate than you could ever regulate engine or
vehicle speed.

 Basic versions were published in the early «80s, but seem to have died
out.  I«d still love to build a good *versatile* (multiple display, re-
programmable) vehicle computer from a kit.  LEDs (bright ones) would be
nicer than LCDs, though an alphanumeric (say 40 x 2) LCD as well would
be great.  Say, three LED displays (4-digit) and the LCD.  I«m not sure
I want to build it from scratch though.
--
 Cheers,
       Paul B.

1998\10\19@095052 by WIL REEDER

flavicon
face
----------
> From: James Cameron <.....cameronKILLspamspam@spam@STL.DEC.COM>
> To: PICLISTspamKILLspamMITVMA.MIT.EDU
> Subject: 16F84 10MHz Accuracy/Trim
> Date: Sunday, October 18, 1998 11:29 PM
>
> WIL REEDER wrote:
> > It is very accurate as long as the pic clock is trimmed properly.
>
> If I write code on a 16F84-10 that uses the TMR0 attached to the
snip
Hi James,

You may be able to get a standard for your speed control at speeds from the
manual or calculate it from tire (tyre) diameter axle ratio and number of
magnets.
The trim circuit: simply replace the 22pf capacitor on osc1 with a 10pf
fixed in parallel with a 4-20pf trimmer. This circuit allows the clock to
be bent a fair bit.
I hope this is some help.


Wil Reeder
Vancouver Canada
.....teachtechKILLspamspam.....bc.sympatico.ca

1998\10\19@101121 by Mercy jean-marc

flavicon
face
At 06:51 19/10/1998 -0700, you wrote:
>Hi James,
>
>You may be able to get a standard for your speed control at speeds from the
>manual or calculate it from tire (tyre) diameter axle ratio and number of
>magnets.
>The trim circuit: simply replace the 22pf capacitor on osc1 with a 10pf
>fixed in parallel with a 4-20pf trimmer. This circuit allows the clock to
>be bent a fair bit.
>I hope this is some help.
>
>
>Wil Reeder

How much ? I mean is it a few ppm or more ?

1998\10\19@115257 by Peter L. Peres
picon face
On Mon, 19 Oct 1998, James Cameron wrote:

> WIL REEDER wrote:
> > It is very accurate as long as the pic clock is trimmed properly.
>
> If I write code on a 16F84-10 that uses the TMR0 attached to the
> oscillator as part of a time base ... how do I calculate the error,
> measure the error and trim accordingly?

With PICs you can control timing loop durations to +/- 1 processor cycle.
So there are TWO ways to trim:

- physically trim the crystal

or

- make the loop a little bit faster than it should be and add a trim delay
as required.

For calibration, you'd need a more accurate instrument to start with.
Maybe a good quality signal generator that's been calibrated recently. A
good ham receiver can also be used to calibrate the oscillator, but I
don't know about its precision.

OTOH: How accurate do you want your speedometer to be ? A crystal should
give 1000 ppm without much help over car temperature and part dispersion.
That's 0.1%. Would it help you very much if you'd have a speedometer
showing 80.1 km/h with the last figure jumping all the time ? I think not.

Peter

1998\10\19@124037 by Dave VanHorn

flavicon
face
>If I write code on a 16F84-10 that uses the TMR0 attached to the
>oscillator as part of a time base ... how do I calculate the error,
>measure the error and trim accordingly?


First, be sure that you are using the right type of crystal, and have
the right size loading caps.
If that is taken care of, then your error should be around 100-200 ppm
You can measure the oscillator with a frequency counter, or pick it up
with a shortwave radio.
Check WWV on 2.5, 5, 10, or 20 MHz, to make sure the radio dial
calibration is correct.
If WWV 10.000000 shows up as 10.1 on your radio, then I'd assume that
an oscillator pickup at 8.1 was really at 8.0  WWV is never off
frequency.
Knowing where your rock is singing, figure the error in percent or
PPM.  I'd expect you to be WAY under 1% error, which is accurate
enough for your application.

>I've a plan to take my car's cruise control speed sensor line and
attach
>it to a PIC in order to display speed more accurately than the analog
>speed meter.

You'll already be there.  The counter won't miss pulses, so there
isn't any error to speak of.

1998\10\19@152752 by cousens

flavicon
face
Variables such as tyre pressure(which also varies with temperature)
and tyre wear will make the crystal error insignificant.

No matter how careful you are with your design, I think you will not get
even
close to a crystal's accuracy.
When you corner, your tyres walk sideways, each individual tread block
shifts
to the side as it touches the ground and takes the car weight and
centrifugal
force, the next block undistorted touches the ground and starts to bend
to
the side.
The same happens when you apply normal driving power to the wheels,
to a lesser extent, but it will be a limiting factor in accuracy.

To calibrate the distance/pulse figure of your system,
set your pic to count the pulses and drive a
fixed distance. Do you have accurate motorway distance markers ?

--
Peter Cousens
email: EraseMEcousensspam_OUTspamTakeThisOuTher.forthnet.gr  phone: + 3081 380534
snailmail:  Folia, Agia Fotini, Karteros, Heraklion  Crete, Greece.

Is it true that they have, on the new version of windows
managed to increase the MTBF from 95 to 98 minutes ?
(That's why they called it 95)


James Cameron wrote:
{Quote hidden}

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