| Electronic Components Datasheet Search |
|
MCP25020I/P Datasheet(PDF) 41 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
MCP25020I/P Datasheet(HTML) 41 Page - Microchip Technology |
|
41 / 66 page ![]() © 2007 Microchip Technology Inc. DS21664D-page 41 MCP2502X/5X 7.0 ANALOG-TO-DIGITAL CONVERTER (A/D) MODULE 7.1 Description The Analog-to-Digital (A/D) module is a four-channel, 10-bit successive approximation type of A/D. The A/D allows conversion of an analog input signal to a corresponding 10-bit number. The four channels are multiplexed on the GP[3:0] pins. The converter is turned off/on via the ADCON0 register and each channel is individually enabled via the ADCON1 control register. The VREF+ and VREF- sources are user- selectable as internal or external. Each channel can be set to one of two conversion modes: 1. Auto-conversion 2. Convert-on-request. 7.2 A/D Module Registers The A/D module itself has several registers. The registers are: • A/D Control Register 0 (ADCON0) • A/D Control Register 1 (ADCON1) • Transmit-on-Change Register (IOINTEN) • Compare and Polarity Register (ADCMPnL) • A/D Result Registers (ADRESnL, ADRESnH) The ADCON0 register controls the operation of the A/D module, including auto-conversion rate and enable bit. The ADCON1 register enables the A/D function on port pins GP3:GP0, A/D conversion rate and selects the voltage reference source. The IOINTEN register’s four least significant bits enable/disable the transmit- on-change function. The ADCMPnL.ADPOL bit sets the polarity (above or below threshold) for the transmit- on-change function. The result of an A/D conversion is made available to the user within the data field of the Read A/D Registers output message via the CAN bus. This message can be directly requested by another CAN node or be automatically transmitted (TXIDO), as has been described previously. Additionally, the individual channel results may be read using the “Read Register” command as described in Section 4.3.1 “Information Request Messages” and as shown in Table 3-2 by addressing the appropriate A/D result register (ADRESnL and ADRESnH). 7.3 A/D Conversion Modes There are two modes of conversion that can be individually selected for each analog channel that has been enabled. These are auto-conversion and conversion-on-request. 7.3.1 AUTO-CONVERSION MODE If the Auto-conversion mode is selected (STCON), an A/D conversion is performed sequentially for each channel that has been set to Analog Input mode and has been configured for Auto-conversion mode. Conversion starts with AN0 and is immediately followed by AN1, etc. Once the conversion has completed, the value is stored in the analog channel registers for the respective channel. The rate of the auto-conversion is determined by a timer and prescaler. The formula for determining conversion rates is: Typical conversion rates with a 20 MHz oscillator input are shown in Table 7-1. TABLE 7-1: AUTO-CONVERSION RATES FOR GIVEN PRESCALE RATES AT 20 MHZ The timer is turned on if one of the GPnTXC bits are set in the IOINTEN register and configured as analog input. The prescaler counter is cleared when the device is reset (RST reset or Power-on reset). Note: The GPDDR register controls the direction of the GPIO pins, even when they are being used as analog inputs. The user must ensure that the bits in the GPDDR register are maintained set (input) when using them as analog inputs. TOPS[2:0] Prescale Rate Auto-Conversion Rate 000 1:1 51 µs 001 1:8 410 µs 010 1:32 2 ms 011 1:128 7 ms 100 1:512 26 ms 101 1:1024 52 ms 110 1:2048 105 ms 111 1:4096 210 ms T OSC () 1024 () Prescaler rate () |
|
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 |