⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 init_sys.s

📁 ks0108 avr单片机1284显示
💻 S
字号:
	.module Init_SYS.C
	.area text(rom, con, rel)
	.dbfile F:\Temp\KS0108_12864LCD\Source\Init_SYS.C
	.dbfunc s Port_Init _Port_Init fV
	.even
_Port_Init:
	.dbline -1
	.dbline 35
; /*----------------------------------------------------------------------------*-
;    
;    Source Name   :  Init_SYS.C (v1.00)  
; 
;   ---------------------------------------------------------------------------- 
;    COPYRIGHT 
;    ---------	
; 
;    Created Date  :  2008.03.01
;    Created By    :  HOCHIEN
;    Modified By   :
;    Modified Date :
;    Version       :  2.0  
;    Description   :  Global system initialization source files. 
;    
;    * * * This program is from : www.ICEworksop.com * * *
; 
; -*----------------------------------------------------------------------------*/
; 
; #include "Main.H"
; #include "Init_SYS.H"
; 
; // ------ Private function prototypes ----------------------------------------
; 
; static void Port_Init(void);
; 
; /*----------------------------------------------------------------------------*-
; 
;    Port_Init() 
;    
;    Globally set up all the port pins to a certain state. 
; 
; -*----------------------------------------------------------------------------*/
; static void Port_Init(void)
;    {
	.dbline 36
;    PORTA = 0x00;
	clr R2
	out 0x1b,R2
	.dbline 37
;    DDRA  = 0x00;
	out 0x1a,R2
	.dbline 38
;    PORTB = 0x00;
	out 0x18,R2
	.dbline 39
;    DDRB  = 0x00;
	out 0x17,R2
	.dbline 40
;    PORTC = 0x00;
	out 0x15,R2
	.dbline 41
;    DDRC  = 0x00;
	out 0x14,R2
	.dbline 42
;    PORTD = 0x00;
	out 0x12,R2
	.dbline 43
;    DDRD  = 0x00;
	out 0x11,R2
	.dbline -2
L1:
	.dbline 0 ; func end
	ret
	.dbend
	.dbfunc e Init_System _Init_System fV
	.even
_Init_System::
	.dbline -1
	.dbline 55
;    }
; 
; /*----------------------------------------------------------------------------*-
; 
;    Init_System()
;    
;    System initialization function.
;    Call this routine to initialize all peripherals 
; 
; -*----------------------------------------------------------------------------*/  
; void Init_System(void)
;    {
	.dbline 56
;    OSCCAL = 0xA7; // Calibrate internal RC 1MHz
	ldi R24,167
	out 0x31,R24
	.dbline 59
;    
;    // Stop errant interrupts until set up
;    CLI(); // Disable all interrupts
	cli
	.dbline 61
;    
;    Port_Init(); // Set port
	xcall _Port_Init
	.dbline 63
;    
;    MCUCR = 0x00;
	clr R2
	out 0x35,R2
	.dbline 64
;    GICR  = 0x00;
	out 0x3b,R2
	.dbline 65
;    TIMSK = 0x00; // Timer interrupt sources
	out 0x39,R2
	.dbline 66
;    SEI(); // Re-enable interrupts
	sei
	.dbline -2
L2:
	.dbline 0 ; func end
	ret
	.dbend
;    // All peripherals are now initialized
;    } 
; 
; /*----------------------------------------------------------------------------*-
;   ---- END OF FILE -----------------------------------------------------------
; -*----------------------------------------------------------------------------*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -