Searching \ for '[PIC] a/d sample acquisition during sleep' 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/ios.htm?key=a%2Fd
Search entire site for: 'a/d sample acquisition during sleep'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] a/d sample acquisition during sleep'
2007\11\29@184621 by Dwayne Reid

flavicon
face
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.

Any thoughts?

dwayne

--
Dwayne Reid   <spam_OUTdwaynerTakeThisOuTspamplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax
http://www.trinity-electronics.com
Custom Electronics Design and Manufacturing

2007\11\30@003849 by Robert Rolf

picon face

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
clock too?

Robert

2007\11\30@060939 by Bob Axtell

face picon face
Robert Rolf wrote:
{Quote hidden}

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
powerup schemes
are suspected to be poor at times.

--Bob A

2007\11\30@091134 by Michael Rigby-Jones

picon face


> -----Original Message-----
> From: .....piclist-bouncesKILLspamspam@spam@mit.edu [piclist-bouncesspamKILLspammit.edu] On
Behalf
> 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
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.
{Quote hidden}

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).

Regards

Mike

=======================================================================
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
services.
=======================================================================

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