| Electronic Components Datasheet Search |
|
HT67F60 Datasheet(PDF) 158 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT67F60 Datasheet(HTML) 158 Page - Holtek Semiconductor Inc |
|
158 / 242 page ![]() Rev. 1.50 158 March 06 , 2012 Rev. 1.50 159 March 06 , 2012 HT67F30/HT67F40/HT67F50/HT67F60 TinyPowerTM A/D Flash Type 8-Bit MCU with LCD & EEPRO Example: using an EOCB polling method to detect the end of conversion clr EADI ; disable ADC interrupt mov a,03H mov ADCR1,a ;selectfSYS/8asA/Dclockandswitchoff1.25V clr ADOFF mov a,0Fh ;setupACERLandACERHtoconfigurepinsAN0~AN3 mov ACERL,a mov a,00h mov ACERH,00h ;ACERHisonlyforHT67F60 mov a,00h mov ADCR0,a ;enableandconnectAN0channeltoA/Dconverter : start_conversion: clr START ;highpulseonstartbittoinitiateconversion set START ;resetA/D clr START ;startA/D polling_EOC: sz EOCB ;polltheADCR0registerEOCBbittodetectend ;ofA/Dconversion jmppolling_EOC ;continuepolling mov a,ADRL ;readlowbyteconversionresultvalue mov ADRL_buffer,a;saveresulttouserdefinedregister mov a,ADRH ;readhighbyteconversionresultvalue mov ADRH_buffer,a;saveresulttouserdefinedregister : : jmp start_conversion ;startnexta/dconversion Example: using the interrupt method to detect the end of conversion clr EADI ; disable ADC interrupt mov a,03H mov ADCR1,a ;selectfSYS/8asA/Dclockandswitchoff1.25V Clr ADOFF mov a,0Fh ;setupACERLandACERHtoconfigurepinsAN0~AN3 mov ACERL,a mov a,00h mov ACERH,00h ;ACERHisonlyforHT67F60 mov a,00h mov ADCR0,a ;enableandconnectAN0channeltoA/Dconverter Start_conversion: clr START ;highpulseonSTARTbittoinitiateconversion set START ;resetA/D clr START ;startA/D clr ADF ;clearADCinterruptrequestflag set EADI ; enable ADC interrupt set EMI ;enableglobalinterrupt : : ; ADC interrupt service routine ADC_ISR: mov acc_stack,a ;saveACCtouserdefinedmemory mov a,STATUS mov status_stack,a;saveSTATUStouserdefinedmemory : : mov a,ADRL ;readlowbyteconversionresultvalue mov adrl_buffer,a;saveresulttouserdefinedregister mov a,ADRH ;readhighbyteconversionresultvalue mov adrh_buffer,a;saveresulttouserdefinedregister : : EXIT_INT_ISR: mov a,status_stack mov STATUS,a ;restoreSTATUSfromuserdefinedmemory mov a,acc_stack ;restoreACCfromuserdefinedmemory reti |
|
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 |