| Electronic Components Datasheet Search |
|
DM300019 Datasheet(PDF) 32 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
DM300019 Datasheet(HTML) 32 Page - Microchip Technology |
|
32 / 50 page ![]() dsPICDEM™ 80-Pin Starter Development Board User’s Guide DS51584B-page 28 © 2006 Microchip Technology Inc. 3.4.2 Analog-to-Digital Conversion This program consists of two subroutines which (1) perform the A/D conversion and (2) transmit the converted value over an RS-232 serial connection (see Figure 3-2). The A/D conversion routine samples the analog output of Potentiometer RB2. The transmit routine converts the 12-bit binary value from ADC12 to a three-digit HEX code, converts the HEX code to an ASCII character and loads the ASCII value into the transmission buffer of UART1. UART1 transmits each ASCII character with a CR and LF to delimit each sample as a separate line on the receiving terminal. FIGURE 3-2: ANALOG-TO-DIGITAL CONVERSION FLOW DIAGRAM INIT ADC12 INIT UART Start A/D Conversion Convert HEX Digit 3 to ASCII ADC Complete? Buffer Full? Load Digit 3 into Transmit Buffer START Delay 10 msec Convert 12-bit Binary to 3-digit HEX Convert HEX Digit 2 to ASCII Buffer Full? Load Digit 2 into Transmit Buffer Convert HEX Digit 1 to ASCII Buffer Full? Load Digit 1 into Transmit Buffer Generate ASCII CR Buffer Full? Load CR into Transmit Buffer Generate ASCII LF Buffer Full? Load Transmit Buffer Yes No Yes Yes Yes Yes Yes No No No No No |
|
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 |