| Electronic Components Datasheet Search |
|
PIC16F1512T-ESSQTP Datasheet(PDF) 146 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16F1512T-ESSQTP Datasheet(HTML) 146 Page - Microchip Technology |
|
146 / 348 page ![]() PIC16(L)F1512/3 DS41624B-page 146 Preliminary 2012 Microchip Technology Inc. 16.6 Automated Capacitive Voltage Divider 16.6.1 CONVERSION SEQUENCE The conversion sequence can be expanded into three stages; pre-charge time, acquisition time, and conversion. See Figure 16-6 for basic information on the timing of these stages. 16.6.2 PRE-CHARGE TIMER The pre-charge stage is an optional 1-127 instruction cycle time used to put the external ADC channel and the internal sample and hold capacitor (CHOLD) into preconditioned states. The pre-charge stage of conversion is enabled by writing a non-zero value to the ADPRE<6:0> bits of the AADPRE register. This stage is initiated when a conversion sequence is started by either the GO/DONE bit or a Special Event Trigger. When initiating an ADC conversion, if the ADPRE bits are cleared, this stage is skipped. During the pre-charge time, CHOLD is shorted to either VDD or VSS, depending on the value of the ADIPPOL bit of the AADCON3 register. The port pin logic of the selected analog channel is overridden to drive a digital high or low out. The output polarity of this override is determined by the ADEPPOL bit of the AADCON3 register. When the ADOOEN bit of the AADCON3 register is set, then the ADOUT pin is overridden during pre-charge. This override functions the same as the channel pin overrides, but the polarity is selected by the ADIPPOL bit. Even though the analog channel of the pin is selected, the analog multiplexer is forced open during the pre- charge stage. The ADC multiplexor logic is overridden and disabled only during the pre-charge time. 16.6.3 ACQUISITION TIMER The acquisition time is used to either acquire the signal or to charge share. The acquisition time counts from 1 to 127 instruction cycle times and is used to allow the voltage on the internal sample and hold capacitor (CHOLD) to charge or discharge from the selected analog channel. The acquisition time of conversion is enabled by writing a non-zero value to the ADACQ<6:0> bits of the AADACQ register. When the acquisition time is enabled, the time starts immediately follow the pre-charge stage. Otherwise, the acquisition time is initiated by either setting the GO/DONE bit or a Special Event Trigger. At the start of the acquisition stage, the selected ADC channel is connected to CHOLD. This allows charge sharing between the pre-charged channel and the CHOLD capacitor. See Figure 16-6. 16.6.4 STARTING A CONVERSION To enable the ADC module, the ADON bit of the AADCON0 register must be set to a ‘1’. Setting the GO/ DONE bit of the AADCON0 register to a ‘1’ in software or by the Special Event Trigger inputs, will start the Analog-to-Digital conversion. Once a conversion begins, it proceeds until complete, while ADON is set. If ADON is cleared (disabled by software), the conversion is halted. The GO/DONE status bit of the AADCON0 register indicates that a conversion is occurring, regardless of the starting trigger. See Figure 16-6. 16.6.5 COMPLETION OF A CONVERSION When the conversion is complete, the ADC module will: • Clear the GO/DONE bit • Set the ADIF Interrupt Flag bit • Update the AADRESxH and AADRESxL registers with new conversion result 16.6.6 TERMINATING A CONVERSION If a conversion must be terminated before completion, the GO/DONE bit can be cleared in software. The AADRESxH and AADRESxL registers will be updated with the partially complete Analog-to-Digital conversion sample. Incomplete bits will match the last bit converted. 16.6.7 DOUBLE SAMPLE CONVERSION Double sampling can be enabled by the ADDSEN bit of the AADCON3 register. When this bit is set, two conversions are completed by each initiation of the GO/ DONE bit or a Special Event Trigger. The GO/DONE bit stays set for the duration of both conversions and can be used to cancel a conversion early. The first conversion is written to the AADRES0H and AADRES0L registers. The second conversion starts two clock cycles after the first has completed and the GO/DONE bit remains set. When the ADIPEN bit of AADCON3 is set, the value used by the ADC for the ADEPPOL, ADIPPOL, and GRDPOL bits is inverted. The value stored in those bit locations is unchanged. All other control signals remain unchanged from the first conversion. The result of the second conversion is stored in the AADRES1H and AADRES1L registers. See Figure 16-8, Figure 16-9 and Figure 16-10 for more information. Note: The GO/DONE bit should not be set in the same instruction that turns on the ADC. Refer to Section 16.6.11 “A/D Double Conversion Procedure”. Note: A device Reset forces all registers to their Reset state. Thus, the ADC module is turned off and any pending conversion is terminated. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |