Exact match. Not showing close matches.
'[PIC] a/d sample acquisition during sleep'
|Good day to all.
I've got an interesting question that the datasheet hasn't been able to answer.
This project has a 16F676 that spends most of its time sleeping. All
peripherals are turned OFF during sleep except for Timer1 (32KHz
crystal). One of those turned-off peripherals is the a/d convertor.
I wish to sample an analog voltage each time the Timer1 interrupt
occurs (2 second period). The voltage I wish to sample is connected
to RA1. ANSEL is configured to point to RA1 while the PIC is sleeping.
When a Timer1 interrupt occurs, the a/d is turned on, the analog
signal is read, the a/d is turned off.
Question: do I have to wait for the analog input acquisition time
before starting the conversion? Remember: the correct input is
already selected by ANSEL.
The data sheet is unclear about this.
I'm being greedy, of course. As things currently stand, waiting for
the a/d conversion (sample acquisition & conversion) is the longest
task I need to accomplish. This project is expected to operate for
several years from a single Lithium cell and I'm doing everything I
can to ensure that the average current is as low as possible. That
means: shortening the time the PIC is awake as much as possible.
My hope is that the currently selected analog channel is connected to
the sample capacitor even while the a/d is disabled.
Dwayne Reid <planet.eon.net> dwayner
Trinity Electronics Systems Ltd Edmonton, AB, CANADA
(780) 489-3199 voice (780) 487-6397 fax
Custom Electronics Design and Manufacturing
Dwayne Reid wrote:
> My hope is that the currently selected analog channel is connected to
> the sample capacitor even while the a/d is disabled.
> Any thoughts?
So why not code it both ways and see if there is any difference in the A/D
output for input voltage extremes?
The input MAY be connected through to the charge division cap,
but it may still need time to settle the reference and charge balance divider tree.
And remember that the BOD is a very power hungry device and should never be
used in low power applications.
Can you do the work using the A/D RC clock and using a 32khz clock for the program
Robert Rolf wrote:
I am certain that the input cap IS connected when the A/D is ON, but not
when it is off.
If the input impedance is very low, you can connect for a short time;
otherwise I leave
it on for 10mS+ before starting the conversion.
Yes, BOD uses some power, but certainly is worth it to ensure proper
startup. I have
been burned a few times without it, especially remote sensors whose
are suspected to be poor at times.
> -----Original Message-----
> From: mit.edu [ piclist-bouncesmit.edu] On piclist-bounces
> Of Dwayne Reid
> Sent: 29 November 2007 23:46
> To: pic microcontroller discussion list
> Subject: [PIC] a/d sample acquisition during sleep
> Good day to all.
> I've got an interesting question that the datasheet hasn't been able
> This project has a 16F676 that spends most of its time sleeping. All
> peripherals are turned OFF during sleep except for Timer1 (32KHz
> crystal). One of those turned-off peripherals is the a/d convertor.
> I wish to sample an analog voltage each time the Timer1 interrupt
> occurs (2 second period). The voltage I wish to sample is connected
> to RA1. ANSEL is configured to point to RA1 while the PIC is
I'd say there is a reasonable chance that you wouldn't have to, but I
think this is really a case of "suck it and see". If you do need to
acquire after waking up and enabling the A/D, then you ought to be able
to see a noticeable change in the digitised value with and without any
acquisition time (especially if your source impedance is toward the
higher end of the allowed range).
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
More... (looser matching)
- Last day of these posts
- In 2007
, 2008 only
- New search...