| Electronic Components Datasheet Search |
|
HT45FM30 Datasheet(PDF) 90 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT45FM30 Datasheet(HTML) 90 Page - Holtek Semiconductor Inc |
|
90 / 188 page ![]() Rev. 1.20 90 De�e��e� 1�� 201� Rev. 1.20 91 De�e��e� 1�� 201� HT45FM30 Brushless DC Motor Flash MCU A/D Programming Example ThefollowingtwoprogrammingexamplesillustratehowtosetupandimplementanA/Dconversion. Inthefirstexample,themethodofpollingtheEOCBbitintheADCR0registerisusedtodetect whentheconversioncycleiscomplete,whereasinthesecondexample,theA/Dinterruptisusedto determinewhentheconversioniscomplete. Example: using an EOCB polling method to detect the end of conversion clr ADE ; disable ADC interrupt mov a,03H mov ADCR1,a ;selectfSYS/8asA/Dclockandswitchoff1.25V clr ADOFF mov a,0Fh ;setupACERLtoconfigurepinsAN0~AN3 mov ACERL,a 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 |
|
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 |