Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
даташитина PIC 12F683 .pdf
Скачиваний:
14
Добавлен:
02.02.2015
Размер:
3.06 Mб
Скачать

PIC12F683

9.3A/D Acquisition Requirements

For the ADC to meet its specified accuracy, the charge holding capacitor (CHOLD) must be allowed to fully charge to the input channel voltage level. The Analog Input model is shown in Figure 9-4. The source impedance (RS) and the internal sampling switch (RSS) impedance directly affect the time required to charge the capacitor CHOLD. The sampling switch (RSS) impedance varies over the device voltage (VDD), see Figure 9-4.

The maximum recommended impedance for analog sources is 10 kΩ. As the source impedance is decreased, the acquisition time may be decreased. After the analog input channel is selected (or changed),

an A/D acquisition must be done before the conversion can be started. To calculate the minimum acquisition time, Equation 9-1 may be used. This equation assumes that 1/2 LSb error is used (1024 steps for the ADC). The 1/2 LSb error is the maximum error allowed for the ADC to meet its specified resolution.

EQUATION 9-1: ACQUISITION TIME EXAMPLE

Assumptions: Temperature = 50°C and external impedance of 10kΩ 5.0V VDD

TACQ = Amplifier Settling Time + Hold Capacitor Charging Time + Temperature Coefficient

=TAMP + TC + TCOFF

=2µs + TC + [(Temperature - 25°C)(0.05µs/°C)]

The value for TC can be approximated with the following equations:

VAPPLIED

 

 

1

= VCHOLD

 

 

 

1 -----------

 

 

 

 

 

2047

 

 

 

 

 

 

 

 

TC

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

---------

 

 

 

 

VAPPLIED

1 e RC = VCHOLD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Tc

 

 

 

 

 

 

 

--------

 

 

 

1

 

APPLIED

RC

 

APPLIED

V

 

1 e

= V

1

-----------

 

 

 

 

 

 

 

 

 

 

 

 

2047

Solving for TC:

TC = CHOLD(RIC + RSS + RS) ln(1/2047)

=10pF(1kΩ + 7kΩ + 10kΩ ) ln(0.0004885)

=1.37µs

Therefore:

TACQ = 2µS + 1.37µS + [(50°C- 25°C)(0.05µS/°C)]

= 4.67µS

;[1] VCHOLD charged to within 1/2 lsb

;[2] VCHOLD charge response to VAPPLIED

;combining [1] and [2]

Note 1: The reference voltage (VREF) has no effect on the equation, since it cancels itself out.

2:The charge holding capacitor (CHOLD) is not discharged after each conversion.

3:The maximum recommended impedance for analog sources is 10 kΩ. This is required to meet the pin leakage specification.

2007 Microchip Technology Inc.

DS41211D-page 67

PIC12F683

 

 

 

 

 

FIGURE 9-4:

ANALOG INPUT MODEL

 

 

 

 

 

VDD

 

Sampling

 

 

 

 

 

 

 

 

 

 

VT = 0.6V

 

Switch

 

 

Rs

ANx

RIC ≤ 1k

SS Rss

 

 

 

 

 

VA

CPIN

VT = 0.6V

I LEAKAGE

 

CHOLD = 10 pF

 

 

5 pF

± 500 nA

 

 

 

 

 

 

 

 

VSS/VREF-

 

 

 

 

 

6V

RSS

Legend: CPIN

 

 

 

 

5V

= Input Capacitance

 

 

VDD 4V

 

VT

= Threshold Voltage

 

 

3V

 

 

 

2V

 

I LEAKAGE = Leakage current at the pin due to

 

 

 

 

 

 

various junctions

 

 

 

 

RIC

= Interconnect Resistance

 

 

 

5 6 7 8 9 10 11

SS

= Sampling Switch

 

 

 

 

 

 

Sampling Switch

CHOLD

= Sample/Hold Capacitance

 

 

 

 

 

 

(kΩ)

 

 

 

 

 

 

FIGURE 9-5: ADC TRANSFER FUNCTION

 

 

Full-Scale Range

 

3FFh

 

 

3FEh

 

 

3FDh

 

Code

3FCh

1 LSB ideal

 

3FBh

 

Output

 

Full-Scale

 

Transition

ADC

004h

 

003h

 

 

 

 

002h

 

 

001h

 

 

000h

Analog Input Voltage

 

 

 

 

1 LSB ideal

VSS/VREF-

 

 

 

Zero-Scale

VDD/VREF+

 

 

 

Transition

 

 

 

 

 

 

DS41211D-page 68

2007 Microchip Technology Inc.

 

 

 

 

 

 

 

 

 

 

 

 

PIC12F683

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TABLE 9-2:

SUMMARY OF ASSOCIATED ADC REGISTERS

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Value on

Value on

Name

Bit 7

 

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

 

Bit 0

 

all other

 

 

 

POR, BOR

 

 

 

 

 

 

 

 

 

 

 

 

 

Resets

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ADCON0

ADFM

VCFG

CHS1

CHS0

 

 

 

 

 

 

 

 

GO/DONE

 

ADON

 

00-- 0000

0000

0000

ANSEL

 

ADCS2

ADCS1

ADCS0

ANS3

ANS2

ANS1

 

ANS0

 

-000 1111

-000 1111

ADRESH

A/D Result Register High Byte

 

 

 

 

 

 

 

 

xxxx xxxx

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

ADRESL

A/D Result Register Low Byte

 

 

 

 

 

 

 

 

xxxx xxxx

uuuu uuuu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

INTCON

GIE

 

PEIE

T0IE

INTE

GPIE

T0IF

INTF

 

GPIF

 

0000 0000

0000 000x

PIE1

EEIE

 

ADIE

CCP1IE

CMIE

OSFIE

TMR2IE

 

TMR1IE

 

0000000

0000 0000

PIR1

EEIF

 

ADIF

CCP1IF

CMIF

OSFIF

TMR2IF

 

TMR1IF

 

0000000

0000000

GPIO

 

GP5

GP4

GP3

GP2

GP1

 

GP0

 

--xx xxxx

--uu uuuu

TRISIO

 

TRISIO5

TRISIO4

TRISIO3

TRISIO2

TRISIO1

 

TRISIO0

 

--11 1111

--11 1111

Legend:

x = unknown, u = unchanged, = unimplemented read as ‘0’. Shaded cells are not used for ADC module.

 

2007 Microchip Technology Inc.

DS41211D-page 69

PIC12F683

NOTES:

DS41211D-page 70

2007 Microchip Technology Inc.