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

📄 init_port.s

📁 该文件包含30F的电机控制程序
💻 S
字号:
;START_HEADER
;
; dsPIC30F6014 Demo Source File
; (c) Copyright 2005 Microchip Technology, All rights reserved
;
; --------------------------------------------------------------------------
; File Revision History:
; --------------------------------------------------------------------------
;
; $Log: init_port.s,v $
; Revision 1.3  2005/04/04 23:44:26  VasukiH
; Updates to comments in file header
;
; Revision 1.2  2005/04/04 23:15:59  VasukiH
; Updates for MPLAB C30 v1.30 compatiblity
;
; Revision 1.1.1.1  2003/08/23 00:38:32  VasukiH
; First import of demo source into CVS Repository
;
;
;
; --------------------------------------------------------------------------
;
; Software and Development Tools Info:
; --------------------------------------------------------------------------
; Tool                          Version
; --------------------------------------------------------------------------
; MPLAB IDE                     7.0
; MPLAB C30 Toolsuite           1.30
; dsPICDEM(TM) Processor Board  1.10
; --------------------------------------------------------------------------
;
; File Notes:
; 1. This routine configures all PortD pins for outputs and turns off
;    all four LEDs connected to RD1-RD4 on power up
;       RD0 = LED1
;       RD1 = LED2
;       RD2 = LED3
;       RD3 = LED4
;END_HEADER


.include "p30fxxxx.inc"

.global _init_port

.section .text                          ;Code section in Program FLASH memory

_init_port:

        clr     TRISD                   ;Set all Port D pins as output pins
        setm    LATD                    ;Set all Port D latches to 1
        bclr    LATD, #LATD4            ;Clear selected latches 4-7 to 0
        bclr    LATD, #LATD5
        bclr    LATD, #LATD6
        bclr    LATD, #LATD7


        return                          ;Return to calling routine

.end                                    ;EOF


⌨️ 快捷键说明

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