| Electronic Components Datasheet Search |
|
DF69 Datasheet(PDF) 52 Page - PADAUK Technology. |
|
|
|||||||||||||||||||||||||||||
DF69 Datasheet(HTML) 52 Page - PADAUK Technology. |
|
52 / 106 page ![]() DF69 DC Fan Controller 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-high PBDIDR = 0B_XXXX_1111; // PB0 ~ PB3digital 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, PB1; // set PB1 as ADC input $ ADCC Enable, PB0; // set PB0 as ADC input Next, setting ADCM register, example as below: $ ADCM 10BIT, /32; // 10-bit, /32 $ ADCM 10BIT, /16; // 10-bit, /16 $ ADCM 10BIT, /8; // 10-bit, /8 $ ADCM 8BIT, /8; // 8-bit, /8 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; ©Copyright 2018, PADAUK Technology Co. Ltd Page 52 of 106 PDK-DS-DF69_V003 – Apr. 18, 2018 |
|
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 |