;--------------------------------------------------------
; File Created by ChiponCC : aolisn inc.
; Version 3.0.4#6752 (Jul  6 2017 15:09:47) (MSVC)
; This file was generated Wed Apr 04 14:55:16 2018
;--------------------------------------------------------
; chipon port for the 16-bit core
;--------------------------------------------------------
;	.file	"../init_mcu.c"
	.radix dec
	.include "KF8S1010.inc"
;--------------------------------------------------------
; external declarations
;--------------------------------------------------------
	.extern	_PSW_bits
	.extern	_P0_bits
	.extern	_P2_bits
	.extern	_P1_bits
	.extern	_P3_bits
	.extern	_INTCTL_bits
	.extern	_EIF1_bits
	.extern	_EIF2_bits
	.extern	_T1CTL_bits
	.extern	_PWMCTL_bits
	.extern	_CMCTL1_bits
	.extern	_ANSEH_bits
	.extern	_ADCCTL0_bits
	.extern	_OPTR_bits
	.extern	_TR0_bits
	.extern	_TR2_bits
	.extern	_TR1_bits
	.extern	_TR3_bits
	.extern	_EIE1_bits
	.extern	_EIE2_bits
	.extern	_PCTL_bits
	.extern	_OSCCTL_bits
	.extern	_ANSEL_bits
	.extern	_PUR_bits
	.extern	_IOCL_bits
	.extern	_ADCCTL1_bits
	.extern	_T3L_bits
	.extern	_CTCTL_bits
	.extern	_RSCTL_bits
	.extern	_OSCLDOCAL_bits
	.extern	_BRCTL_bits
	.extern	_TSCTL_bits
	.extern	_EUBRGL_bits
	.extern	_EUBRGH_bits
	.extern	_T0
	.extern	_PCL
	.extern	_PSW
	.extern	_P0
	.extern	_P2
	.extern	_P1
	.extern	_P3
	.extern	_PCH
	.extern	_INTCTL
	.extern	_EIF1
	.extern	_EIF2
	.extern	_T1L
	.extern	_T1H
	.extern	_T1CTL
	.extern	_PWMCTL
	.extern	_CMCTL1
	.extern	_VRECAL
	.extern	_ANSEH
	.extern	_ADCDATAH
	.extern	_ADCCTL0
	.extern	_OPTR
	.extern	_TR0
	.extern	_TR2
	.extern	_TR1
	.extern	_TR3
	.extern	_EIE1
	.extern	_EIE2
	.extern	_PCTL
	.extern	_OSCCTL
	.extern	_OSCCAL0
	.extern	_ANSEL
	.extern	_PUR
	.extern	_IOCL
	.extern	_OSCCAL1
	.extern	_BADDRH
	.extern	_BADDRL
	.extern	_EECTL1
	.extern	_EECTL2
	.extern	_ADCDATAL
	.extern	_ADCCTL1
	.extern	_T3L
	.extern	_CTCTL
	.extern	_RSCTL
	.extern	_TXSDR
	.extern	_RXSDR
	.extern	_OSCLDOCAL
	.extern	_T1U
	.extern	_BRCTL
	.extern	_TSCTL
	.extern	_EUBRGL
	.extern	_EUBRGH

	.extern STK12
	.extern STK11
	.extern STK10
	.extern STK09
	.extern STK08
	.extern STK07
	.extern STK06
	.extern STK05
	.extern STK04
	.extern STK03
	.extern STK02
	.extern STK01
	.extern STK00
;--------------------------------------------------------
; global declarations
;--------------------------------------------------------
	.global	_init_mcu

;--------------------------------------------------------
; global definitions
;--------------------------------------------------------
;--------------------------------------------------------
; absolute symbol definitions
;--------------------------------------------------------
;--------------------------------------------------------
; compiler-defined variables
;--------------------------------------------------------
;--------------------------------------------------------
; initialized data
;--------------------------------------------------------
;--------------------------------------------------------
; overlayable items in internal ram 
;--------------------------------------------------------
;	.udata_ovr


func._init_mcu	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _init_mcu	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_init_mcu	;Function start
; 2 exit points
;	op : =
;	.line	18; "../init_mcu.c"	OSCCTL = 0x60;           //8M
	MOV	R0,# 0x60
	MOV	_OSCCTL, R0
;	op : =
;	.line	21; "../init_mcu.c"	TR0 = 0XFF;              //1111 1111		P07,P06触摸通道0,1   设置IO口为输入
	MOV	R0,# 0xff
	MOV	_TR0, R0
;	op : =
;	.line	22; "../init_mcu.c"	TR1 = 0XFF;              //1111 1111		P16,P17触摸通道2,3  设置IO口为输入
	MOV	R0,# 0xff
	MOV	_TR1, R0
;	op : =
;	.line	23; "../init_mcu.c"	TR2 = 0XFF;              //1111 1111		P20,P21触摸通道4,5  设置IO口为输入
	MOV	R0,# 0xff
	MOV	_TR2, R0
;	op : =
;	.line	24; "../init_mcu.c"	TR3 = 0XFF;				 //1111 1111		！！《《注意点:TR3.5这一位必须设置为1，输入态》》！！
	MOV	R0,# 0xff
	MOV	_TR3, R0
;	op : =
;	.line	26; "../init_mcu.c"	P0 = 0X00;               //0000 0000
	CLR	_P0
;	op : =
;	.line	27; "../init_mcu.c"	P1 = 0X00;               //0000 0000
	CLR	_P1
;	op : =
;	.line	28; "../init_mcu.c"	P2 = 0x00;               //0000 0000
	CLR	_P2
;	op : =
;	.line	29; "../init_mcu.c"	P3 = 0X00;				 //0000 0000
	CLR	_P3
;	op : |
;	.line	32; "../init_mcu.c"	ANSEL |= 1<<6;			 //外挂电容脚设置为模拟口
	SET	_ANSEL, 6
;	op : =
;	.line	35; "../init_mcu.c"	T1CTL = 0X00;    		 //1：1分频，不开启计数器T1
	CLR	_T1CTL
;	op : =
;	.line	36; "../init_mcu.c"	T1L = 0;
	CLR	_T1L
;	op : =
;	.line	37; "../init_mcu.c"	T1H = 0;
	CLR	_T1H
;	op : =
;	.line	38; "../init_mcu.c"	T1IF = 0;
	CLR	_EIF1_bits, 0
;	op : =
;	.line	39; "../init_mcu.c"	AIE = 0;
	CLR	_INTCTL_bits, 7
;	op : =
;	.line	43; "../init_mcu.c"	TSCTL=0x22; // 全双工 ，8位 发送使能，低速模式，发送缓存空,低速的
	MOV	R0,# 0x22
	MOV	_TSCTL, R0
;	op : =
;	.line	44; "../init_mcu.c"	RSCTL=0xB0;// 串口使能，无错误，8位无地址概念，使能，单字节接收
	MOV	R0,# 0xb0
	MOV	_RSCTL, R0
;	op : =
;	.line	45; "../init_mcu.c"	BRCTL=0x48; //16位波特率发送器
	MOV	R0,# 0x48
	MOV	_BRCTL, R0
;	op : =
;	.line	46; "../init_mcu.c"	EUBRGL=0x19; 		//     0x33  9600     0x19  19.2    0x3F  10417
	MOV	R0,# 0x19
	MOV	_EUBRGL, R0
;	op : =
;	.line	47; "../init_mcu.c"	TXIE=0;
	CLR	_EIE2_bits, 4
;	op : =
;	.line	48; "../init_mcu.c"	TXIF=0;
	CLR	_EIF2_bits, 4
;	op : =
;	.line	49; "../init_mcu.c"	RXIF=0;
	CLR	_EIF2_bits, 5
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of _init_mcu


;	code size estimation:
;	   32+    0 =    32 instructions (   64 byte)


	.end
