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

📄 hardware.h

📁 电路原理图
💻 H
字号:
/**********************************************************************
 *                                                                     *
 *                        Software License Agreement                   *
 *                                                                     *
 *    The software supplied herewith by Microchip Technology           *
 *    Incorporated (the "Company") for its dsPIC controller            *
 *    is intended and supplied to you, the Company's customer,         *
 *    for use solely and exclusively on Microchip dsPIC                *
 *    products. The software is owned by the Company and/or its        *
 *    supplier, and is protected under applicable copyright laws. All  *
 *    rights are reserved. Any use in violation of the foregoing       *
 *    restrictions may subject the user to criminal sanctions under    *
 *    applicable laws, as well as to civil liability for the breach of *
 *    the terms and conditions of this license.                        *
 *                                                                     *
 *    THIS SOFTWARE IS PROVIDED IN AN "AS IS" CONDITION.  NO           *
 *    WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING,    *
 *    BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND    *
 *    FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE     *
 *    COMPANY SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL,  *
 *    INCIDENTAL OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.  *
 *                                                                     *
  **********************************************************************/

 /**********************************************************************
 *                                                                     * 
 *    Author: Smart Power Soutions, Jorge Zambada, Alex Dumais         * 
 *                                                                     *
 *    Filename:       hardware.h                                       *
 *    Date:           07/23/07                                          *
 *    File Version:   5.10                                             *
 *    Project:        53                                               *
 *    Drawing:        2                                                *
 *                                                                     *
 *    Tools used:    MPLAB v7.61 C30 Compiler v 3.01                   *
 *                                                                     *
 *    Linker File:    p33FJ256MC710.gld                                *
 *                                                                     *
 *                                                                     *
 ***********************************************************************
 *	Code Description
 *  
 * This file contins details of the hardware for the project
 * PCB : dsPIC30F Motor Control Development PCB 02-01648 REVB
 *
 **********************************************************************/

// This is the clock frequency in Hz including any PLL factor
#define CLOCK_FREQ 40000000 

// NB Using LAT Registers rather than PORT registers
// to prevent any read/modify/write issues with outputs

// These are the pushbutton pin connections
#define	BUTTON1	!PORTDbits.RD6		//S3 on PCB
#define	BUTTON2	!PORTDbits.RD7		//S6 on PCB
#define	BUTTON3	!PORTAbits.RA7		//S5 on PCB
#define	BUTTON4	!PORTDbits.RD13		//S4 on PCB


// These are the LEDs
#define LED1 LATAbits.LATA6			//D9 on PCB
#define LED2 LATAbits.LATA5			//D8 on PCB
#define LED3 LATAbits.LATA7			//D7 on PCB
#define LED4 LATAbits.LATA3			//D6 on PCB

// This is the control line for the driver IC for the firing signals
// It must be low to activate the signals to the power module.
#define	PWM_OUTPUT_DISABLE LATDbits.LATD11

// Also declare some useful shortcuts
#define DISABLE_FIRING PWM_OUTPUT_DISABLE=1
#define ENABLE_FIRING PWM_OUTPUT_DISABLE=0

// This is the reset line for the hardware faults in the power module.
// It is also used to reset the 12C671 providing the isolated
// feedback of the |Vac| and Vdc signals. Therefore the min high time
// is 4us to allow for the opto and to ensure 12C671 has pulse > 2us.
#define FAULT_RESET	LATEbits.LATE9


⌨️ 快捷键说明

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