PIC Timing Acuracy

R

Richard Harris

Guest
Hi,
I have a plan for a PIC project but im not sure about the acuracy that
can be achieved with a PIC.
Basicly I will be using a number of dealy routines but I need the PIC to run
for 2 months and it must not lose more than 2 minutes per week. I intend to
run it at 4MHz And the temperature should be fairly steady (code),
Should this be possible?

Also a question about relays, my understanding is you can use them to switch
a high voltage from a low votage triger, and that you can use them as a
simple switch, you aply voltage to one side and the other side contacts. Is
this the case?

Thanks for your time, any help is much appreciated.
 
"Anthony Fremont" <spam@anywhere.com> schreef in bericht
news:WhYQf.15969$733.13650@tornado.texas.rr.com...
"Richard Harris" <none@none.com> wrote in message
news:dv1haa$bl3$1@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com...
Hi,
I have a plan for a PIC project but im not sure about the
acuracy
that
can be achieved with a PIC.
Basicly I will be using a number of dealy routines but I need the
PIC
to run
for 2 months and it must not lose more than 2 minutes per week. I
intend to
run it at 4MHz And the temperature should be fairly steady (code),
Should this be possible?

That's about 200 parts/million so yes,a 4MHz crystal will do the job
nicely, but it will burn up a couple of mA. Do you really need that
much speed for your application? You could run it from a 32,768Hz
watch
crystal and run continuously (without sleeping) for months (if not
years) from AA cells. In either case, sleeping would increase your
battery life.

Also a question about relays, my understanding is you can use them
to
switch
a high voltage from a low votage triger, and that you can use them
as
a
simple switch, you aply voltage to one side and the other side
contacts. Is
this the case?

Pretty much, but a PIC isn't going to be able to directly drive much
of
a relay. You'll need a driver transistor of some sort for most
relays.
How much voltage are you wanting to switch? A MOSFET may be the way
to
go instead of the relay.

Thanks for your time, any help is much appreciated.




Anthony is right, he missed one thing.
You were talking about delay loops, these are not as accurate as
timers.
The only way you can use delay loops accuratly is when you now exactly
what code is executed and make sure that if you want to switch
something that it takes just as long as not switching anything. This
is most of the times not possible. If you use timers, the accuracy is
mostly depended on the crystal.

Alexander
 
Hi,
Ok me made a circuit diagram that i think is as simple as it can possibly
be.

http://www.synios.com/Circuit1.jpg

Does this look ok?

The technical data sheet on the pic states that it will operate at 12uA @
32kHz 2.0V typical.
So that is about uA = 0.000001(micro) * 12 = 0.000012 Amp hour

Timer Oscillator Current 1.2uA @ 32kHz 2.0V typical.
So that is about uA = 0.000001(micro) * 1.2 = 0.0000012 Amp hour

0.000012 + 0.0000012 = 0.0000132 Amp hour

0.0000132 * 24 (hours in day) = 0.0003168
0.0003168 * 60 (days in 2 months) = 0.019008 Amp

So I would need 0.02 Amp battery then to run the pic for 60 days.

It does seem a little to impressive, have I made some big mistake here ?

Lastly, it seems that a relay is not such a good idea, because it uses to
much current to operate.
I know that the push button switches i need to operate simply contacts two
terminals when the button is
pushed and that the device is running of 3.6V also the current passing
though cant be very much.
What would be the simplest way of operating the switch from the output pin
of a pic? would a Mosfet do the job? and any info on how to do this.

Thank you for your time, it is very much appreciated..


RJH




"Richard Harris" <none@none.com> wrote in message
news:dv1haa$bl3$1@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com...
Hi,
I have a plan for a PIC project but im not sure about the acuracy that
can be achieved with a PIC.
Basicly I will be using a number of dealy routines but I need the PIC to
run
for 2 months and it must not lose more than 2 minutes per week. I intend
to
run it at 4MHz And the temperature should be fairly steady (code),
Should this be possible?

Also a question about relays, my understanding is you can use them to
switch
a high voltage from a low votage triger, and that you can use them as a
simple switch, you aply voltage to one side and the other side contacts.
Is
this the case?

Thanks for your time, any help is much appreciated.
 

Welcome to EDABoard.com

Sponsor

Back
Top