Searching \ for 'Using PIC16C71 A/D' 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: 'Using PIC16C71 A/D'.

Truncated match.
PICList Thread
'Using PIC16C71 A/D'
1998\01\26@154508 by Amey Deosthali

flavicon
face
Hi,

I am new to PIC programming. How do you use PIC16C71 A/D for sampling an
analog signal at 8Khz or 16Khz. The ADCON0 register seems to have scaling
factors of only 2,8 and 32.

Thanks,

Amey Deosthali

1998\01\26@160551 by Bobby R. Bramlett

flavicon
face
Amey,

  The ADCON0 register is for conversion time.  You are asking about
sampling time. At 16kHz you would need to take an A/D reading every 62.5
microseconds.  This is well within the settling time of the 16c71s A/D
module.  Use a timer interrupt set at your sampling rate to start the A/D
conversion and then use the A/D interrupt to read the answer after the
conversion is complete.  Once the conversion is completed the channel will
begin to recharge its internal RC circuit again after 2Tad which will still
give you plenty of time for the reading to settle before your next sampling
point.

Bob
-----Original Message-----
From: Amey Deosthali <spam_OUTameyTakeThisOuTspamVISION.ECE.UTEXAS.EDU>
To: .....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU <PICLISTspamKILLspamMITVMA.MIT.EDU>
Date: Monday, January 26, 1998 2:42 PM
Subject: Using PIC16C71 A/D


{Quote hidden}

1998\01\26@162810 by Amey Deosthali

flavicon
face
> module.  Use a timer interrupt set at your sampling rate to start the A/D
> conversion and then use the A/D interrupt to read the answer after the

Thanks Bob.

I needed the timer for another purpose. So now I need to use 2
timers. So it seems I will have to settle for 16C72 instead of 16C71. I
know about hardware development boards for 16C71. Like the ones by
Siriusmicro. Are there any such boards for 16C72? Any pointers to such
boards?

Thanks,

Amey

1998\01\28@203630 by Amey Deosthali

flavicon
face
Hi all,

I want to use the PIC16C71 A/D converter. Is it possible to use the 20Mhz
clock to get 8-bit accuracy from A/D? The specifications say that if we
use the 20Mhz clock, Tad is violated.

Thanks,

Amey


-------------------------------------------------------------------------------
                       AMEY A. DEOSTHALI
-------------------------------------------------------------------------------
Lab Address:                              Home Address:
ESPL, ENS526E                             3110 Red River, Apt # 208
Dept. of ECE                              Austin, TX 78705
University of Texas at Austin,            Tel:(512)-499-8957
Austin, TX 78712 - 1084.
Tel:(512)-232-2769
               Email:.....ameyKILLspamspam.....vision.ece.utexas.edu
               Web  :http://anchovy.ece.utexas.edu/~amey
-------------------------------------------------------------------------------

1998\01\28@214522 by Andrew Warren
face
flavicon
face
Amey Deosthali <EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU> wrote:

> I want to use the PIC16C71 A/D converter. Is it possible to use the
> 20Mhz clock to get 8-bit accuracy from A/D? The specifications say
> that if we use the 20Mhz clock, Tad is violated.

   There are two ways to solve this, Amey...

   1.  Set the A?D Clock Source to "internal RC" (ADCS0 and ADCS1
       both set to "1").  This will give you a Tad of 2-6 uS
       (typically 4 uS), which is legal for the 16C71.

   2.  Use a 16C710 or 16C711 instead of the 16C71.  The '710 and
       '711 have a minimum Tad of 1.6 uS, which means that you can
       use a 20 MHz clock and set the A/D Clock Source to "32Tosc"
       (ADCS1 = 1, ADCS0 = 0).

   -Andy

=== Andrew Warren - fastfwdspamspam_OUTix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499

1998\01\29@114130 by John Bellini

flavicon
face
You can run most of the pic's at higher speeds and they usually work
okay with no errors,
but.... you have to heatsink them or you might let the smoke out.

> {Original Message removed}

1998\01\29@140637 by Amey Deosthali

flavicon
face
> You can run most of the pic's at higher speeds and they usually work
> okay with no errors,
> but.... you have to heatsink them or you might let the smoke out.

Wow! Is the heat dissipation so high?

I think I am not really clear about the working of the 16C71 A/D.
According to what I understand there are two separate timings to take care
of -- acquisition time and conversion time. Right? Suppose I want to
sample an analog signal at 8Khz. So I want the A/D to take a sample every
125us and convert it. I can control the conversion by the GO/DONE bit
(bit2 in ADCON0). How do I control the acquistion? I want the A/D to
convert the sample which is taken every 125us. Do I do it by turning the
ADON (bit 0 in ADCON0) bit on/off.

What I was thinking of was to program the timer to give an interrupt every
125us. Then in the interrupt service routine, set the ADON bit to 1, wait
for about 10us then start the conversion. After the conversion is
complete, read the ADRES register and then turn off the A/D by turning of
the ADON bit. After doing all the processing, return  from the ISR
and wait for the next interrupt. Is this procedure right?

Thanks,

Amey

1998\01\29@154027 by Mike Keitz

picon face
On Thu, 29 Jan 1998 13:04:02 -0600 Amey Deosthali
<@spam@ameyKILLspamspamvision.ece.utexas.edu> writes:
>> You can run most of the pic's at higher speeds and they usually work
>> okay with no errors,
>> but.... you have to heatsink them or you might let the smoke out.
>
>Wow! Is the heat dissipation so high?

No, it isn't.  The PIC will just malfunction above a certain speed; it
won't be damaged.
>
>I think I am not really clear about the working of the 16C71 A/D.
>According to what I understand there are two separate timings to take
>care
>of -- acquisition time and conversion time. Right? Suppose I want to
>sample an analog signal at 8Khz. So I want the A/D to take a sample
>every
>125us and convert it. I can control the conversion by the GO/DONE bit
>(bit2 in ADCON0). How do I control the acquistion?

The converter works (I think) by first charging a network of capacitors
to the input voltage, then measuring the charge in each one as it is
discharged.  When you select a channel (all the input pins go through an
analog multiplexer, then to the single ADC), the capacitors start
charging.  They have to be allowed to charge for a certain time in order
to equalize to the voltage at the input.  This is the acquisition time.
When the GO bit is set, they are disconected from the input and the
charge measured.  The discharging sequence is controlled by the A/D
converter clock and must be in the proper range to get an accurate
conversion.  The time required is the conversion time.

If you only have one channel, just set the GO bit at regular intervals.
Be sure the time between when the conversion is done and the next one
starts is long enough to meet the acquisition time (i.e. sample period >
acquisition time + conversion time).


I want the A/D to
>convert the sample which is taken every 125us. Do I do it by turning
>the
>ADON (bit 0 in ADCON0) bit on/off.

No, leave this bit on all the time the converter is in use.  If you
aren't going to use the converter for a while (or not at all), turn it
off to save a little power.
>
>What I was thinking of was to program the timer to give an interrupt
>every
>125us.

The ISR just needs to read the ADRES register (getting the result of the
last conversion), then set the GO bit to start the next one.  This will
convert the same channel over and over at regular times.


_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

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