| Electronic Components Datasheet Search |
|
STC12LE5616AD Datasheet(PDF) 229 Page - STCmicro Technology Co,.Ltd |
|
|
|||||||||||||||||||||||||||||
STC12LE5616AD Datasheet(HTML) 229 Page - STCmicro Technology Co,.Ltd |
|
229 / 377 page ![]() 2. Assembly language code listing: ;/*----------------------------------------------------------------------------------*/ ;/* --- STC MCU International Limited -------------------------------------*/ ;/* --- STC 1T Series MCU A/D Conversion Demo -----------------------*/ ;/* If you want to use the program or the program referenced in the */ ;/* article, please specify in which data and procedures from STC */ ;/*-----------------------------------------------------------------------------------*/ ;/*Declare SFR associated with the ADC */ AUXR EQU 8EH ADC_CONTR EQU 0C5H ;ADC control register ADC_DATA EQU 0C6H ;ADC high 8-bit result register ADC_LOW2 EQU 0BEH ;ADC low 2-bit result register P1M0 EQU 091H ;P1 mode control register0 P1M1 EQU 092H ;P1 mode control register1 ;/*Define ADC operation const for ADC_CONTR*/ ADC_POWER EQU 80H ;ADC power control bit ADC_FLAG EQU 10H ;ADC complete flag ADC_START EQU 08H ;ADC start control bit ADC_SPEEDLL EQU 00H ;1080 clocks ADC_SPEEDL EQU 20H ;810 clocks ADC_SPEEDH EQU 40H ;540 clocks ADC_SPEEDHH EQU 60H ;270 clocks ADCCH DATA 20H ;ADC channel NO. ;----------------------------------------- ORG 0000H LJMP MAIN ORG 002BH LJMP ADC_ISR ;----------------------------------------- ORG 0100H MAIN: MOV SP, #3FH MOV ADCCH, #0 LCALL INIT_UART ;Init UART, use to show ADC result LCALL INIT_ADC ;Init ADC sfr ORL AUXR, #10H ;set EADCI MOV IE, #0A0H ;Enable ADC interrupt and Open master interrupt switch SJMP $ 229 |
|
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 |