| Electronic Components Datasheet Search |
|
PMS232 Datasheet(PDF) 59 Page - PADAUK Technology. |
|
|
|||||||||||||||||||||||||||||
PMS232 Datasheet(HTML) 59 Page - PADAUK Technology. |
|
59 / 94 page ![]() PMC232/PMS232 Series 12-bit ADC Enhanced FPPA TM 8-bit OTP Controller ©Copyright 2018, PADAUK Technology Co. Ltd Page 59 of 94 PDK-DS-PMx232_V104– Dec. 18, 2018 5-16-6. Using the ADC The following example shows how to use ADC with PB0~PB3. First, defining the selected pins: PBC = 0B_XXXX_0000; // PB0 ~ PB3 as Input PBPH = 0B_XXXX_0000; // PB0 ~ PB3 without pull-up resistor PBDIER = 0B_XXXX_0000; // PB0 ~ PB3 digital input is disabled Next, setting ADCC register, example as below: $ ADCC Enable, PB3; // set PB3 as ADC input $ ADCC Enable, PB2; // set PB2 as ADC input $ ADCC Enable, PB0; // set PB0 as ADC input Next, setting ADCM register, example as below: $ ADCM 12BIT, /16; // recommend /16 @System Clock=8MHz $ ADCM 12BIT, /8; // recommend /8 @System Clock=4MHz Then, start the ADC conversion: AD_START = 1; // start ADC conversion WAIT1 AD_DONE ; // wait ADC conversion result Finally, it can read ADC result when AD_DONE is high: WORD Data; // two bytes result: ADCRH and ADCRL Data = (ADCRH << 8) | ADCRL; The ADC can be disabled by using the following method: $ ADCC Disable; or ADCC = 0; |
|
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 |