| Electronic Components Datasheet Search |
|
HT45F5R Datasheet(PDF) 99 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT45F5R Datasheet(HTML) 99 Page - Holtek Semiconductor Inc |
|
99 / 138 page ![]() Rev. 1.10 98 De�e��e� 1�� �01� Rev. 1.10 99 De�e��e� 1�� �01� HT45F5R Charger ASSP Flash MCU HT45F5R Charger ASSP Flash MCU A/D Conversion Programming Examples ThefollowingtwoprogrammingexamplesillustratehowtosetupandimplementanA/Dconversion. Inthefirstexample,themethodofpollingtheADBZbitintheSADC0registerisusedtodetect whentheconversioncycleiscomplete,whereasinthesecondexample,theA/Dinterruptisusedto determinewhentheconversioniscomplete. Example: using an ADBZ polling method to detect the end of conversion clr ADE ; disable ADC interrupt mov a,03H mov SADC1,a ; select fSYS/8 as A/D clock set ADCEN mov a,0Ch ; setup PAS0 to configure pin AN0 mov PAS0,a mov a,20h mov SADC0,a ; enable and connect AN0 channel to A/D converter : start_conversion: clr START ; high pulse on start bit to initiate conversion set START ; reset A/D clr START ; start A/D polling_EOC: sz ADBZ ; poll the SADC0 register ADBZ bit to detect end of A/D conversion jmp polling_EOC ; continue polling mov a,SADOL ; read low byte conversion result value mov SADOL_buffer,a ; save result to user defined register mov a,SADOH ; read high byte conversion result value mov SADOH_buffer,a ; save result to user defined register : : jmp start_conversion ; start next A/D conversion |
|
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 |