EasyManua.ls Logo

STC micro STC8A8K64D4 Series - Page 523

Default Icon
901 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
STC8A8K64D4 Series Manual
- 507 -
Fosc_KHZ EQU 24000 ;Define the main clock KHZ
Reload EQU (65536 - Fosc_KHZ/600) ;Timer 0 reload value, corresponding to 300KHz
ADC_CONTR DATA 0xBC ; microcontrollers with ADC
ADC_RES DATA 0xBD ; microcontrollers with ADC
ADC_RESL DATA 0xBE ; microcontrollers with ADC
AUXR DATA 0x8E
AUXR2 DATA 0x8F
P0M1 DATA 093H
P0M0 DATA 094H
P1M1 DATA 091H
P1M0 DATA 092H
P2M1 DATA 095H
P2M0 DATA 096H
P3M1 DATA 0B1H
P3M0 DATA 0B2H
P4M1 DATA 0B3H
P4M0 DATA 0B4H
P5M1 DATA 0C9H
P5M0 DATA 0CAH
CHANNEL EQU 8 ;ADC channel numbers
ADC_90T EQU (3 SHL 5) ;ADC conversion time 90T
ADC_180T EQU (2 SHL 5) ;ADC conversion time 180T
ADC_360T EQU (1 SHL 5) ;ADC conversion time 360T
ADC_540T EQU 0 ;ADC conversion time 540T
ADC_FLAG EQU (1 SHL 4) ;Cleared by software
ADC_START EQU (1 SHL 3) ;Cleared automatically
P_LED7 BIT P2.7;
P_LED6 BIT P2.6;
P_LED5 BIT P2.5;
P_LED4 BIT P2.4;
P_LED3 BIT P2.3;
P_LED2 BIT P2.2;
P_LED1 BIT P2.1;
P_LED0 BIT P2.0;
adc EQU 30H ; Current ADC value in 30H ~ 3FH, two bytes constitute one value
adc_prev EQU 40H ; Previous ADC value in 40H ~ 4FH, two bytes constitute a value
TouchZero EQU 50H ; ADC 0 value in 50H~5FH, two bytes constitute a value
TouchZeroCnt EQU 60H ; 0-point automatic tracking count in 60H~67H
cnt_250ms DATA 68H
ORG 0000H
LJMP MAIN
ORG 0100H
MAIN:
MOV SP,#0D0H
MOV P0M0,#00H
MOV P0M1,#00H
MOV P1M0,#00H
MOV P1M1,#00H
MOV P2M0,#00H
MOV P2M1,#00H

Table of Contents

Related product manuals