EasyManuals Logo

Holtek HT66F0175 User Manual

Default Icon
207 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #129 background imageLoading...
Page #129 background image
Rev. 1.50 128 August 28, 2017 Rev. 1.50 129 August 28, 2017
HT66F0175/HT66F0185
A/D Flash MCU with EEPROM
HT66F0175/HT66F0185
A/D Flash MCU with EEPROM
Example: using the interrupt method to detect the end of conversion
clr ADE ; disable ADC interrupt
mov a,03H
mov SADC1,a ; select f
SYS
/8 as A/D clock and switch off V
BG
voltage
set ADCEN
mov a,03h ; setup ACERL to congure pin AN0
mov ACERL,a
mov a,00h
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
clr ADF ; clear ADC interrupt request ag
set ADE ; enable ADC interrupt
set EMI ; enable global interrupt
:
:
ADC_ISR: ; ADC interrupt service routine
mov acc_stack,a ; save ACC to user dened memory
mov a,STATUS
mov status_stack,a ; save STATUS to user dened memory
:
mov a, SADOL ; read low byte conversion result value
mov SADOL_buffer,a ; save result to user dened register
mov a, SADOH ; read high byte conversion result value
mov SADOH_buffer,a ; save result to user dened register
:
EXIT_INT_ISR:
mov a,status_stack
mov STATUS,a ; restore STATUS from user dened memory
mov a,acc_stack ; restore ACC from user dened memory
reti

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Holtek HT66F0175 and is the answer not in the manual?

Holtek HT66F0175 Specifications

General IconGeneral
BrandHoltek
ModelHT66F0175
CategoryStorage
LanguageEnglish