| Electronic Components Datasheet Search |
|
AT91SAM7A2-AI Datasheet(PDF) 113 Page - ATMEL Corporation |
|
|
|||||||||||||||||||||||||||||
AT91SAM7A2-AI Datasheet(HTML) 113 Page - ATMEL Corporation |
|
113 / 369 page ![]() 113 PRELIMINARY AT91SAM7A2 6021A–ATARM–07/04 Conversion Sequence The basic sequence of operation after a reset is detailed below. 1. Program the ADC Mode register: the interface has to know the STARTUPTIME and the PRLVAL before receiving a start command. Determine the names of analog inputs. Indicate if conversions are made in continuous mode (CONTCV=1). 2. Program the ADC Control register (ADC_CR) to enable the ADC. 3. Wait for READY bit in ADC_SR. When the flag is set, the ADC is ready to start conversion. An interrupt can be generated to detect when the ADC is ready to start a conversion if the corresponding bit is enabled in the ADC_IMR (Interrupt Mask Register). This flag can be high only after an enable command has been performed because it is this operation which starts the startup time of 4 µs. Every command (even start) before the ready flag is ignored. 4. Initiate conversion start by writing a start command in the ADC Control register. If a single conversion is being done, the following applies: 5. The analog input voltage is sampled during 1 ADC clock cycle. The digital result is transferred after 10 ADC clock cycles. 6. Conversion completes after 11 ADC clock cycles from the start command. The digital 10-bit data is latched into ADC_DR (Convert Data Register), the EOC bit in ADC_SR (Status Register) is set. 7. The PDC or the CPU can then read the digital value in ADC_DR, which automat- ically clears the EOC bit in ADC_SR. Another result can be saved before the data has been read. In this case, the OVR bit is set. When the PDC has stored all the data required, the TEND bit is set. When multiple conversions or continuous conversions are programmed, steps 5, 6 and 7, as stated above, are repeated. Power Management The ADC is provided with a power management block allowing optimization of power consumption. See “Power Management Block” on page 22. Example of Use Acquisition in a single shot on eight different inputs using the PDC, with an interrupt associated to the end of conversion, is performed according to the following steps. Configuration Steps • Enable the clock on the ADC peripheral by writing the ADC bit in ADC_ECR. • Do a software reset of the ADC to be in a known state by writing the SWRST bit in ADC_CR. • Configuration of ADC_ MR: Select the ADC clock to be less than 700kHz (PRLVAL = 9 for 30MHz), STOPEN bit remains at 0 as the device is not in continuous conversion mode. Analog circuitry stabilization time is programmed using the STARTUPTIME field (0x78 for 30 MHz) and must be more than 4 µs. The number of acquisitions is programmed in the NBRCH field; write 7 for eight conversions. The CONTCV bit selects the conversion mode and is left at 0. • Enable the ADC by writing the ADCEN bit in ADC_CR. • Configuration of ADC_ CMR: This register indicates which input will be used for the eight conversions. • Choose the input order to be {5,7,6,2,0,1,4,3}, therefore ADC_MR has the following programmed value: ((5<<0)|(7<<4)|(6<<8)|(2<<12)|(0<<16)|(1<<20)|(4<<24)|(3<<28)) |
|
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 |