Вы находитесь на странице: 1из 14

El módulo tiene cinco registros:

• A/D Result High Register (ADRESH)


• A/D Result Low Register (ADRESL)
• A/D Control Register 0 (ADCON0)
• A/D Control Register 1 (ADCON1)
• A/D Control Register 2 (ADCON2)

El registro del ADCON0, demostrado en Register 19-1,


Controla la operación del módulo A/D. Lo
El registro del ADCON1, demostrado en Register 19-2, configura
Las funciones de los alfileres de babor. El registro del ADCON2,
Mostrado en Register 19-3, configura el reloj A/D
La fuente, el tiempo programado de adquisición y la justificación.

bit 7-6 Unimplemented: Read as ‘0’


bit 5-2 CHS3:CHS0: Analog Channel Select bits
0000 = Channel 0 (AN0)
0001 = Channel 1 (AN1)
0010 = Channel 2 (AN2)
0011 = Channel 3 (AN3)
0100 = Channel 4 (AN4)
0101 = Channel 5 (AN5)(1,2)
0110 = Channel 6 (AN6)(1,2)
0111 = Channel 7 (AN7)(1,2)
1000 = Channel 8 (AN8)
1001 = Channel 9 (AN9)
1010 = Channel 10 (AN10)
1011 = Channel 11 (AN11)
1100 = Channel 12 (AN12)
1101 = Unimplemented)(2)
1110 = Unimplemented)(2)
1111 = Unimplemented)(2)
bit 1 GO/DONE: A/D Conversion Status bit
When ADON = 1:
1 = A/D conversion in progress
0 = A/D Idle
bit 0 ADON: A/D On bit
1 = A/D Converter module is enabled El módulo del convertidor está habilitado
0 = A/D Converter module is disabled

Note
Realizar una conversión en canales del unimplemented devolverá una medida flotante de aporte.
bit 7-6 Unimplemented: Read as ‘0’
bit 5 VCFG1: Voltage Reference Configuration bit (VREF- source)
1 = VREF- (AN2)
0 = VSS
bit 4 VCFG0: Voltage Reference Configuration bit (VREF+ source)
1 = VREF+ (AN3)
0 = VDD
bit 3-0 PCFG3:PCFG0: A/D Port Configuration Control bits: control de los bits para la configuracion del
puerto

Note 1: The POR value of the PCFG bits depends on the value of the PBADEN Configuration bit. When
PBADEN = 1, PCFG<2:0> = 000; when PBADEN = 0, PCFG<2:0> = 111.
2: AN5 through AN7 are available only on 40/44-pin devices.

1:El valor POR de los pedacitos PCFG depende del valor del PBADEN que Configuration mordió. Cuando
PBADEN = 1, PCFG < 2:0 > = 000; Cuando PBADEN = 0, PCFG < 2:0 > = 111.
2: El AN5 a través de AN7 está disponible sólo en dispositivos de 40/44-pin.

bit 7 ADFM: A/D Result Format Select bit


1 = Right justified El derecho justificó
0 = Left justified
bit 6 Unimplemented: Read as ‘0’
bit 5-3 ACQT2:ACQT0: A/D Acquisition Time Select bits
111 = 20 TAD
110 = 16 TAD
101 = 12 TAD
100 = 8 TAD
011 = 6 TAD
010 = 4 TAD
001 = 2 TAD
000 = 0 TAD(1)
bit 2-0 ADCS2:ADCS0: A/D Conversion Clock Select bits
111 = FRC (clock derived from A/D RC oscillator)(1) El reloj se derivó de oscilador A/D RC
110 = FOSC/64
101 = FOSC/16
100 = FOSC/4
011 = FRC (clock derived from A/D RC oscillator)(1)
010 = FOSC/32
001 = FOSC/8
000 = FOSC/2

Note 1: If the A/D FRC clock source is selected, a delay of one TCY (instruction cycle) is added before the
A/D
clock starts. This allows the SLEEP instruction to be executed before starting a conversion.

Nota 1: Si la fuente del reloj A/D FRC es seleccionada, un retraso de un TCY se agrega antes del A/D (el
ciclo de búsqueda y ejecución)
El reloj arranca. Esto le permite la instrucción de SUEÑO ser ejecutado antes de iniciar una conversión.

The analog reference voltage is software selectable to


either the device’s positive and negative supply voltage
(VDD and VSS), or the voltage level on the RA3/AN3/
VREF+ and RA2/AN2/VREF-/CVREF pins.
The A/D converter has a unique feature of being able
to operate while the device is in Sleep mode. To
operate in Sleep, the A/D conversion clock must be
derived from the A/D’s internal RC oscillator.
The output of the sample and hold is the input into the
converter, which generates the result via successive
approximation.

El voltaje remisivo analógico es software seleccionable para


Ya sea el positivo de _ s del dispositivo y negativa suministran voltaje
(VDD y VSS), o el nivel de voltaje en el RA3/AN3/
VREF + y alfileres de RA2/AN2/VREF-/CVREF.
El convertidor A/D tiene una característica única de ser capaz
Funcionar mientras el dispositivo está en modo de Sueño. Para
Maneje en el Sueño, el reloj de conversión A/D debe ser
Derivativo de las A/D _ s oscilador interno RC.
La salida de la prueba y agarre es el aporte en lo
El convertidor, que genere el resultado por sucesivo
La aproximación.

A device Reset forces all registers to their Reset state.


This forces the A/D module to be turned off and any
conversion in progress is aborted.
Each port pin associated with the A/D converter can be
configured as an analog input, or as a digital I/O. The
ADRESH and ADRESL registers contain the result of
the A/D conversion. When the A/D conversion is
complete, the result is loaded into the
ADRESH:ADRESL register pair, the GO/DONE bit
(ADCON0 register) is cleared and A/D Interrupt Flag bit,
ADIF, is set. The block diagram of the A/D module is
shown in Figure 19-1.

Una Reanudación del dispositivo obtiene a la fuerza todos los registros para su estado Vuelto a Arrancar.
Esto obtiene a la fuerza el módulo A/D para estar apagado y cualquier
La conversión en marcha es abortada.
Cada alfiler de babor asociado con el convertidor A/D puede ser
Configurado como un aporte analógico, o como uno digital Yo / Ohio Lo
ADRESH y registros ADRESL contienen el resultado de
La conversión A/D. Cuando la conversión A/D es
Complete, el resultado está forrado en lo
ADRESH:ADRESL registre par, el pedacito GO/DO
(ADCON0 regístrese) es aclarado y A/D Bandera Interrupt mordido
ADIF, está listo. La diagrama de bloques del módulo A/D sea
Mostrado en 19-1 Figure.

The value in the ADRESH:ADRESL registers is not


modified for a Power-on Reset. The ADRESH:ADRESL
registers will contain unknown data after a Power-on
Reset.
After the A/D module has been configured as desired,
the selected channel must be acquired before the
conversion is started. The analog input channels must
have their corresponding TRIS bits selected as an
input. To determine acquisition time, see Section 19.1
“A/D Acquisition Requirements”. After this acquisition
time has elapsed, the A/D conversion can be
started. An acquisition time can be programmed to
occur between setting the GO/DONE bit and the actual
start of the conversion.
The following steps should be followed to perform an A/D
conversion:
1. Configure the A/D module:
• Configure analog pins, voltage reference and
digital I/O (ADCON1)
• Select A/D input channel (ADCON0)
• Select A/D acquisition time (ADCON2)
• Select A/D conversion clock (ADCON2)
• Turn on A/D module (ADCON0)
2. Configure A/D interrupt (if desired):
• Clear ADIF bit
• Set ADIE bit
• Set GIE bit
3. Wait the required acquisition time (if required).
4. Start conversion:
• Set GO/DONE bit (ADCON0 register)

El valor en el ADRESH:ADRESL se registra no es


Modificado para una Reanudación que se impulsa adelante. El ADRESH:ADRESL
Los registros contendrán datos desconocidos después de uno energizar
Reanude.
Después de que el módulo A/D haya sido configurado a pedir de boca,
El canal seleccionado debe ser adquirido antes de que lo
La conversión comienza. Los canales de entrada analógicos deben
Seleccione sus pedacitos correspondientes TRIS como uno
El aporte. Para determinar el tiempo de adquisición, vea Sección 19.1
"Una / D Requisitos Acquisition". Después de esta adquisición
El tiempo ha transcurrido, la conversión A/D puede ser
Iniciado. Un tiempo de adquisición puede estar programado
Ocurre entre sedimentarse el GO/DO mordió y lo real
El principio de la conversión.
Los siguientes pasos deberían ser seguidos para realizar a un A/D
La conversión:
1. Configure el módulo A/D:
•†Configure alfileres analógicos, referencia de voltaje y
Digital Yo / la O (ADCON1)
•†Seleccione canal de entrada A/D (ADCON0)
•†Haga una selección el tiempo de adquisición A/D (ADCON2)
•†Seleccione reloj de conversión A/D (ADCON2)
•†Vuélvase contra módulo A/D (ADCON0)
2. Configure interrupción A/D (si deseado):
•†ADIF cristalino mordió
•†ADIE determinado mordió
•†GIE determinado mordió
3. Espere el tiempo requerido (si requirió) de adquisición.
4. Inicie conversión:
•†GO/DO determinado mordió (ADCON0 regístrese)

5. Wait for A/D conversion to complete, by either:


• Polling for the GO/DONE bit to be cleared
OR
• Waiting for the A/D interrupt
6. Read A/D Result registers (ADRESH:ADRESL);
clear bit ADIF, if required.
7. For next conversion, go to step 1 or step 2, as
required. The A/D conversion time per bit is
defined as TAD. A minimum wait of 2 TAD is
required before the next acquisition starts.

5. Espere para que la conversión A/D complete, por ya sea:


•†La llamada selectiva para el GO/DO mordió ser aclarada
Oregon
•†En espera de la interrupción A/D
6. A/D leído Result se registra (ADRESH:ADRESL);
Descongestione a ADIF mordido, si requerido.
7. Para la siguiente conversión, vaya para dar un paso 1 o paso 2, como
Requerido. El tiempo de conversión A/D por pedacito es
Definido como TAD. Una espera mínima de 2 que TAD es
Requerido antes de que la siguiente adquisición principie.
El Voltaje de Umbral___ Threshold Voltage
Leakage Current at the pin due to
various junctions____ La corriente de fuga en el alfiler debido a
Los empalmes diversos
Sampling Switch_____ Probando Interruptor
Sampling Switch Resistance___________ Probando Resistencia del Interruptor

19.1 A/D Acquisition Requirements


For the A/D converter 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 19-3. 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). The source impedance affects the offset voltage
at the analog input (due to pin leakage current). The
maximum recommended impedance for analog
sources is 2.5 k. After the analog input channel is
selected (changed), the channel must be sampled for
at least the minimum acquisition time before starting a
conversion.

19.1 A/D Requisitos Acquisition


Para que el convertidor A/D encuentre su exactitud especificada,
El cargo sujetando condensador (CHOLD) debe ser admitido
Para completamente ir a la carga para el nivel de voltaje del canal de entrada. Lo
El modelo analógico de aporte es demostrado en 19-3 de la Figura. Lo
La impedancia de la fuente (RS) y el muestreo interno
Cambie (RSS) impedancia directamente afecto el tiempo
Requerido para acusar el condensador CHOLD. El muestreo
La impedancia del interruptor (RSS) disiente sobre el voltaje del dispositivo
(VDD). La impedancia de la fuente afecta el voltaje de offset
En el aporte analógico (debido a corriente de fuga del alfiler). Lo
El máximum recomendó impedancia para analógico
Las fuentes son 2.5 k. Después del canal de entrada analógico es
Seleccionado (cambiado), el canal debe ser probado para
En mínimo el tiempo mínimo de adquisición antes de empezar uno
La conversión.

Note: When the conversion is started, the


holding capacitor is disconnected from the
input pin.

Nota: Cuando la conversión comienza, lo


Se el se desconectó de condensador de agarrar lo
El alfiler de aporte.

To calculate the minimum acquisition time,


Equation 19-1 may be used. This equation assumes
that 1/2 LSb error is used (1024 steps for the A/D). The
1/2 LSb error is the maximum error allowed for the A/D
to meet its specified resolution.
Example 19-3 shows the calculation of the minimum
required acquisition time TACQ. This calculation is
based on the following application system
assumptions:
CHOLD = 25 pF
Rs = 2.5 k
Conversion Error ≤1/2 LSb
VDD = 5V →Rss = 2 k
Temperature = 85C (system max.)

Para hacer cálculos el tiempo mínimo de adquisición,


El 19-1 de ecuación puede ser usado. Esta ecuación asume
Ese error 1/2 LSb es usado (1024 pasos para el A/D). Lo
El error 1/2 LSb es el máximo error permitido para el A/D
Para encontrar su resolución especificada.
El 19-3 de ejemplo demuestra el cálculo del mínimo
El tiempo requerido de adquisición TACQ. Este cálculo es
Basado en el siguiente sistema aplicativo
Las suposiciones:
CHOLD = 25 pF
Rs = 2.5 la k
La conversión Error 1/2 LSb
VDD = 5V →℠Rss = 2 la k
La temperatura = 85 ° C (el sistema llegue al límite.)
Amplifier Settling Time + Holding Capacitor Charging Time
+ Temperature Coefficient
El Amplificador Reacomodándose + de Tiempo Creyendo Que Condensador Yendo a la Carga Tiempo
El Coeficiente de Temperatura del +

19.2 Selecting and Configuring


Acquisition Time
The ADCON2 register allows the user to select an
acquisition time that occurs each time the GO/DONE
bit is set. It also gives users the option to use an
automatically determined acquisition time.
Acquisition time may be set with the ACQT2:ACQT0
bits (ADCON2<5:3>), which provides a range of 2 to
20 TAD. When the GO/DONE bit is set, the A/D module
continues to sample the input for the selected acquisition
time, then automatically begins a conversion.
Since the acquisition time is programmed, there may
be no need to wait for an acquisition time between
selecting a channel and setting the GO/DONE bit.
Manual acquisition is selected when
ACQT2:ACQT0 = 000. When the GO/DONE bit is set,
sampling is stopped and a conversion begins. The user
is responsible for ensuring the required acquisition time
has passed between selecting the desired input
channel and setting the GO/DONE bit. This option is
also the default Reset state of the ACQT2:ACQT0 bits
and is compatible with devices that do not offer
programmable acquisition times.
In either case, when the conversion is completed, the
GO/DONE bit is cleared, the ADIF flag is set and the
A/D begins sampling the currently selected channel
again. If an acquisition time is programmed, there is
nothing to indicate if the acquisition time has ended or
if the conversion has begun.
19.2 Haciendo Una Selección y Configurando
El Tiempo de Adquisición
El registro del ADCON2 le permite al usuario hacer una selección uno
El tiempo de adquisición que ocurre cada vez el GO/DO
El pedacito está colocado. También los da a los usuarios la opción para usar uno
El tiempo de adquisición automáticamente determinado.
El tiempo de adquisición puede ser determinado con el ACQT2:El ACQT0
Los pedacitos (ADCON2<5:3 > ), que provea un rango de 2 para
20 TAD. Cuando el GO/DO mordido está listo, el módulo A/D
Continúa probando el aporte para la adquisición seleccionada
El tiempo, luego automáticamente empieza una conversión.
Desde que el tiempo de adquisición está programado, allí lo puede hacer
No ser necesidad para esperar para un tiempo de adquisición en medio
Seleccionar un canal y sedimentarse el GO/DO mordió.
La adquisición manual es seleccionada cuando
El ACQT2:ACQT0 = 000. Cuando el GO/DO mordido está listo,
El muestreo está detenido y una conversión comienza. El usuario
Es responsable de asegurar el tiempo requerido de adquisición
Ha pasado entre seleccionar el aporte deseado
El canal y sedimentarse el GO/DO mordió. Esta opción es
También el defecto Vuelve a Arrancar al estado del ACQT2:Los pedacitos del ACQT0
Y es compatible con artificios que no le ofrecen
Las veces programables de adquisición.
En uno u otro caso, cuando la conversión es completada, lo
GO/DO mordido es descongestionado, la bandera ADIF está colocada y lo
Una / D empieza a probar el canal actualmente seleccionado
Otra vez. Si un tiempo de adquisición está programado, hay lo
Nada a indicar si el tiempo de adquisición ha acabado o
Si la conversión ha comenzado.

19.3 Selecting the A/D Conversion


Clock
The A/D conversion time per bit is defined as TAD. The
A/D conversion requires 11 TAD per 10-bit conversion.
The source of the A/D conversion clock is software
selectable. There are seven possible options for TAD:
• 2 TOSC
• 4 TOSC
• 8 TOSC
• 16 TOSC
• 32 TOSC
• 64 TOSC
• Internal RC Oscillator
For correct A/D conversions, the A/D conversion clock
(TAD) must be as short as possible, but greater than the
minimum TAD (see parameter 130 for more
information).
Table 19-1 shows the resultant TAD times derived from
the device operating frequencies and the A/D clock
source selected.
TABLE 19-

19.3 Seleccionando Al A/D Conversion


El reloj
El tiempo de conversión A/D por pedacito es definido como TAD. Lo
Una conversión de la / D requiere 11 TAD por la conversión de 10 pedacitos.
La fuente del reloj de conversión A/D es software
Seleccionable. Hay siete opciones posibles para TAD:
•†2 TOSC
•†4 TOSC
•†8 TOSC
•†16 TOSC
•†32 TOSC
•†64 TOSC
•†RC interno Oscillator
Pues las conversiones correctas A/D, el reloj de conversión A/D
(TAD) debe ser tan pequeño como posible, excepto mayor que lo
TAD mínimo (vea parámetro 130 para más
La información).
La mesa que el 19-1 muestra las veces resultantes TAD derivó de
El dispositivo manejando frecuencias y el reloj A/D
La fuente seleccionada.
MESA 19

Note 1: The RC source has a typical TAD time of 1.2 s.


2: The RC source has a typical TAD time of 2.5 s.
3: For device frequencies above 1 MHz, the device must be in Sleep for the entire conversion or the A/D
accuracy may be out of specification.
4: Low-power (PIC18LFXXXX) devices only.

Nota 1: La fuente RC tiene a un TAD típico tiempo de 1.2 ¼ s.


2: La fuente RC tiene a un TAD típico tiempo de 2.5 ¼ s.
3: Para las frecuencias del dispositivo por encima de 1 MHz, el dispositivo debe estar en Sueño para la
conversión entera o el A/D
La exactitud puede no tener especificación.
4: Los dispositivos de poder bajo (PIC18LFXXXX) sólo.

19.4 Operation in Power-Managed


Modes
The selection of the automatic acquisition time and A/D
conversion clock is determined in part by the clock
source and frequency while in a power-managed mode.
If the A/D is expected to operate while the device is in
a power-managed mode, the ACQT2:ACQT0 and
ADCS2:ADCS0 bits in ADCON2 should be updated in
accordance with the clock source to be used in that
mode. After entering the mode, an A/D acquisition or
conversion may be started. Once started, the device
should continue to be clocked by the same clock
source until the conversion has been completed.
If desired, the device may be placed into the
corresponding Idle mode during the conversion. If the
device clock frequency is less than 1 MHz, the A/D RC
clock source should be selected.
Operation in the Sleep mode requires the A/D FRC
clock to be selected. If bits ACQT2:ACQT0 are set to
‘000’ and a conversion is started, the conversion will be
delayed one instruction cycle to allow execution of the
SLEEP instruction and entry to Sleep mode. The IDLEN
bit (OSCCON<7>) must have already been cleared
prior to starting the conversion.

19.4 la Operación en Manejado En Poder


Los modos
La selección del tiempo automático de adquisición y A/D
El reloj de conversión es determinado en parte según la hora exacta
La fuente y la frecuencia mientras en un modo manejado en poder.
Se espera que si el A/D opera mientras el dispositivo está adentro
Un modo manejado en poder, el ACQT2:El ACQT0 y
El ADCS2:Los pedacitos del ADCS0 en ADCON2 deberían ponerse al corriente adentro
La conformidad con la fuente del reloj a ser usada en eso
El modo. Después de introducir el modo, una adquisición A/D o
La conversión puede comenzar. Una vez que se empieza, el dispositivo
Debería continuar siendo cronometrado por el mismo reloj
La fuente hasta la conversión ha sido completada.
Estando deseado, el dispositivo se colocó dentro de lo
Correspondiendo modo Sin Valor durante la conversión. Si lo
La frecuencia del reloj del dispositivo está menos de 1 MHz, el A/D RC
La fuente del reloj debería ser seleccionada.
La operación en el modo de Sueño requiere al A/D FRC
El reloj a ser seleccionado. Si el ACQT2 de pedacitos:El ACQT0 está colocado para
_ 000 _ y una conversión comienzan, la conversión será
Lo retardado el ciclo de búsqueda y ejecución para consentir ejecución de lo
La instrucción de SUEÑO y la entrada para el modo Sleep. El IDLEN
El pedacito (OSCCON < 7 > ) ya ha debido haber sido despejado
Antes de iniciar la conversión.

19.5 Configuring Analog Port Pins


The ADCON1, TRISA, TRISB and TRISE registers all
configure the A/D port pins. The port pins needed as
analog inputs must have their corresponding TRIS bits
set (input). If the TRIS bit is cleared (output), the digital
output level (VOH or VOL) will be converted.
The A/D operation is independent of the state of the
CHS3:CHS0 bits and the TRIS bits.
Note 1: When reading the PORT register, all pins
configured as analog input channels will
read as cleared (a low level). Pins
configured as digital inputs will convert as
analog inputs. Analog levels on a digitally
configured input will be accurately
converted.
2: Analog levels on any pin defined as a
digital input may cause the digital input
buffer to consume current out of the
device’s specification limits.
3: The PBADEN bit in Configuration
Register 3H configures PORTB pins to
reset as analog or digital pins by controlling
how the PCFG<3:0> bits in ADCON1
are reset.

19.5 Configuring el Puerto Analog Alfileres


Los registros ADCON1, TRISA, TRISB y TRISE todo
Configure los alfileres del puerto A/D. Los alfileres de babor necesitados tan
Los aportes analógicos deben tener sus pedacitos correspondientes TRIS
El set (el aporte). Si el TRIS mordido es descongestionado (la salida), lo digital
La salida el nivel (VOH o VOL) se convertirá.
La operación A/D es independiente del estado de lo
El CHS3:Los pedacitos del CHS0 y los pedacitos TRIS.
Nota 1: Al leer el registro PORTUARIO, todos los alfileres
Configurado como la voluntad analógica de canales de entrada
Lea tan aclarado (un nivel bajo). Los alfileres
Configurado como los aportes digitales mutarán tan
Los aportes analógicos. Los niveles analógicos en uno digitalmente
El aporte configurado será exactamente
Converso.
2: Los niveles analógicos en cualquier alfiler definido como uno
El aporte digital puede causar el aporte digital
El amortiguador para consumir corriente fuera de lo
Los límites de especificación de _ s del dispositivo.
3: El PBADEN mordió en la Configuración
El 3H de registro configura alfileres PORTB para
Reanude como alfileres analógicos o digitales controlando
Cómo los > pedacitos PCFG < 3:0 en ADCON1
Es vuelta a arrancar.

19.6 A/D Conversions


Figure 19-4 shows the operation of the A/D converter
after the GO/DONE bit has been set and the
ACQT2:ACQT0 bits are cleared. A conversion is
started after the following instruction to allow entry into
Sleep mode before the conversion begins.
Figure 19-5 shows the operation of the A/D converter
after the GO/DONE bit has been set and the
ACQT2:ACQT0 bits are set to ‘010’ and selecting a 4
TAD acquisition time before the conversion starts.
Clearing the GO/DONE bit during a conversion will abort
the current conversion. The A/D Result register pair will
NOT be updated with the partially completed A/D
conversion sample. This means the ADRESH:ADRESL
registers will continue to contain the value of the last
completed conversion (or the last value written to the
ADRESH:ADRESL registers).

Conversions 19.6 A/D


Creo el 19-4 demuestre la operación del convertidor A/D
Después del GO/DO el pedacito ha estado colocado y lo
El ACQT2:Los pedacitos del ACQT0 son despejados. Una conversión es
Iniciado después de la siguiente instrucción para consentir entrada en
El modo de sueño antes de la conversión comienza.
Creo el 19-5 demuestre la operación del convertidor A/D
Después del GO/DO el pedacito ha estado colocado y lo
El ACQT2:Los pedacitos del ACQT0 están colocados para _ 010 _ y seleccionando uno 4
El tiempo de adquisición TAD antes de la conversión principia.
Despejarse el GO/DO mordido durante una conversión abortará
La conversión actual. El par de registro A/D Result lo hará
NO se ponga al corriente con el A/D a medias completado
La prueba de conversión. Esto quiere decir al ADRESH:ADRESL
Los registros continuarán conteniendo el valor de lo último
La conversión completada (o el último valor escrito para lo
ADRESH:ADRESL se registra).

After the A/D conversion is completed or aborted, a


2 TAD wait is required before the next acquisition can be
started. After this wait, acquisition on the selected
channel is automatically started.
Note: The GO/DONE bit should NOT be set in
the same instruction that turns on the A/D.
19.7 Discharge
The discharge phase is used to initialize the value of
the capacitor array. The array is discharged before
every sample. This feature helps to optimize the unitygain
amplifier, as the circuit always needs to charge the
capacitor array, rather than charge/discharge based on
previous measure values.

Después de que la conversión A/D sea completada o abortada, uno


2 TAD esperan es requerido antes de la siguiente adquisición puede ser
Iniciado. Después de esta espera, la adquisición en lo seleccionado
El canal es automáticamente echado a andar.
Nota: El pedacito GO/DO incrustó en
La misma instrucción que se vuelve contra el A/D.
19.7 Se Descargan
La fase de descarga se usa para inicializar el valor de
El conjunto imponente del condensador. El conjunto imponente se da de baja antes
Cada prueba. Esta característica ayuda a optimizar el unitygain
El amplificador, como el circuito siempre necesita ir a la carga lo
El conjunto imponente del condensador, en vez del cargo /descarga basado adelante
Los valores previos de medida.
Holding capacitor is disconnected from analog input (typically 100 ns)
El condensador de agarrar está desconectado de aporte analógico (típicamente 100 ns)

Holding capacitor continues


acquiring input
El condensador de agarrar continúa
Adquiriendo aporte

On the following cycle:


En el siguiente ciclo:

19.8 Use of the CCP2 Trigger


An A/D conversion can be started by the Special Event
Trigger of the CCP2 module. This requires that the
CCP2M3:CCP2M0 bits (CCP2CON<3:0>) be
programmed as ‘1011’ and that the A/D module is
enabled (ADON bit is set). When the trigger occurs, the
GO/DONE bit will be set, starting the A/D acquisition
and conversion and the Timer1 (or Timer3) counter will
be reset to zero. Timer1 (or Timer3) is reset to automatically
repeat the A/D acquisition period with minimal

software overhead (moving ADRESH:ADRESL to the


desired location). The appropriate analog input
channel must be selected and the minimum acquisition
period is either timed by the user, or an appropriate
TACQ time selected before the Special Event Trigger
sets the GO/DONE bit (starts a conversion).
If the A/D module is not enabled (ADON is cleared), the
Special Event Trigger will be ignored by the A/D module
but will still reset the Timer1 (or Timer3) counter.

19.8 Usan del CCP2 Trigger


Una conversión A/D puede comenzar por el Acontecimiento Especial
El gatillo del módulo del CCP2. Esto requiere que lo
El CCP2M3:Los pedacitos del CCP2M0 (CCP2CON 3:0 > ) sean
Programado como _ 1011 _ y que el módulo A/D es
Habilitado (ADON mordido está listo). Cuando el gatillo ocurre, lo
GO/DO mordido estará listo, iniciando la adquisición A/D
Y la conversión y el Timer1 (o Timer3) en dirección opuesta lo harán
Ser puesta a cero. Timer1 (o Timer3) es vuelto a arrancar automáticamente
Repita el período de adquisición A/D con mínimo

El software en lo alto (moviendo a ADRESH:ADRESL para lo


La posición deseada). El aporte analógico apropiado
El canal debe ser seleccionado y la adquisición mínima
El período es uno u otro cronometró por el usuario, o uno apropiado
El tiempo TACQ seleccionado antes del Gatillo Especial de Acontecimiento
Sets el pedacito GO/DO (los principios una conversión).
Si el módulo A/D no está habilitado, lo (ADON es descongestionado)
El gatillo especial de Acontecimiento estará ignorado por el módulo A/D
Pero todavía volverá a arrancar el mueble mostrador Timer1 (o Timer3).

Note 1: These bits are unimplemented on 28-pin devices; always maintain these bits clear.
2: PORTA<7:6> and their direction bits are individually configured as port pins based on various primary
oscillator modes. When disabled, these bits read as ‘0’.
3: RE3 port bit is available only as an input pin when the MCLRE Configuration bit is ‘0’.
4: These registers are not implemented on 28-pin devices.

Nota 1: Estos pedacitos son unimplemented en dispositivos de 28 alfileres; Siempre mantenga que estos
pedacitos se descongestionan.
2: PORTA < 7:6 > y sus pedacitos de dirección son individualmente configurados como de babor alfiler
basado en diversos primario
Los modos del oscilador. Estando deshabilitado, estos pedacitos leídos como _ 0.
3: RE3 ponen a babor pedacito está disponible sólo como un alfiler de aporte cuando el pedacito MCLRE
Configuration es _ 0.
4: Estos registros no son implementados en dispositivos de 28 alfileres.

Вам также может понравиться