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

📄 startup.msa

📁 Actions ucOS-II mp3方案源码,可以做参考
💻 MSA
字号:
/*
*******************************************************************************
*                ACTOS AP
*        main ap of sdk 3.0
*
*        (c) Copyright, Actions Co,Ld.
*             All Right Reserved
*
*******************************************************************************
*/
                                       
public GUIPROP_AA2_DispChar
public GUIPROP_AA2_GetCharDistX
public GUIPROP_AA2_GetFontInfo
public GUIPROP_AA2_IsInFont
public GUIPROP_AA4_DispChar
public GUIPROP_AA4_GetCharDistX
public GUIPROP_AA4_GetFontInfo
public GUIPROP_AA4_IsInFont
public GUIPROP_DispChar
public GUIPROP_GetCharDistX
public GUIPROP_GetFontInfo
public GUIPROP_IsInFont                                   
                             
                                   

PLL_Clock    EQU    0b8h;088H;90H;0A0H;0B0H;0C0H;    // 27MHz;33MHz;39MHz;45MHz;51MHz

        extern main

        org 0000h  
        jp    start
        org 0038h
        di
        reti
        org 0100h   
start:    
        ld sp,3effh 
        call MCUInit 
        ld a,0xf4
        out (05h),a
        jp main   
MCUInit:     
        //clear watchdog 
        in      a,(4eh)
        or      08h
        out     (4eh),a
        ld      a,0x22
        out     (0x4e),a
        
        /*  Set A15 Normal        */
        ld      a,0x01        
        out     (0x04),a        
        
        /*Set interrupt mode,Disable all interrupt */
        di
        im      1                                     
        xor     a
        out     (0x27),a
        
        /* Enable MCU Clock Of High frequency OSC ,24MHZ */
        ld      a,0x85                                
        out     (0x40),a    
        /* Wait 64 Cycles */
        ld      b,0ffh
delay_for_Wait_64_Cycles:
        djnz    delay_for_Wait_64_Cycles
        
        //an    important factor
        //ld    a,21h                //mcu pll
        ld    a,10h                //hosc
        out    (00h),a                // mcu selcet 24MHz
        ld    b,0ffh
wait10240:
        djnz    wait10240
        
        ld    a,PLL_Clock
        out    (70h),a
        ld    b,0ffh
wait10241:
        djnz    wait10241    
        
        ld    a,0f3h
        out    (05h),a                //SET TO RESERVED VALUE
        
        /* Enable DMA Clock Of High frequency OSC ,12MHZ  */
        in      a,(0x04)
        or      0x08
        out     (0x04),a
        
        ld      a,0x00
        out     (0x3d),a   
        RET                     

        
GUIPROP_AA2_DispChar:         
GUIPROP_AA2_GetCharDistX:     
GUIPROP_AA2_GetFontInfo:      
GUIPROP_AA2_IsInFont:         
GUIPROP_AA4_DispChar:         
GUIPROP_AA4_GetCharDistX:     
GUIPROP_AA4_GetFontInfo:      
GUIPROP_AA4_IsInFont:
GUIPROP_DispChar:             
GUIPROP_GetCharDistX:         
GUIPROP_GetFontInfo:          
GUIPROP_IsInFont:                      
        end          

⌨️ 快捷键说明

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