当前位置:首页 >> 电子/电路 >>

MSP430寄存器的中文解释,熟知这些写起程序来很方便


我都舍不得欺负的人,哪能让别人欺负? 一辈子那么长,等你几年算什么我爱的人我要亲手给她幸 福 人我不放心,我想你的时候我一定要找得到你不许你们欺负他!全世界只有我才可以!放弃你,下辈子 吧!!MSP430寄存器中文注释---P1/2口(带中断功能)

/************************************************************ * DIGITAL I/O Port1/2 寄存器定义 有中断功能 ************************************************************/

#define P1IN_ const sfrb P1IN #define P1OUT_ sfrb P1OUT

0x0020 /* P1 输入寄存器 */ = P1IN_; 0x0021 /* P1 输出寄存器 */ = P1OUT_; 0x0022 /* P1 方向选择寄存器 */ = P1DIR_; 0x0023 /* P1 中断标志寄存器*/ = P1IFG_; 0x0024 /* P1 中断边沿选择寄存器*/ = P1IES_; 0x0025 /* P1 中断使能寄存器 */ = P1IE_; 0x0026 /* P1 功能选择寄存器*/ = P1SEL_;

#define P1DIR_ sfrb P1DIR

#define P1IFG_ sfrb P1IFG

#define P1IES_ sfrb P1IES

#define P1IE_ sfrb P1IE

#define P1SEL_ sfrb P1SEL

#define P2IN_ const sfrb P2IN #define P2OUT_ sfrb P2OUT

0x0028 /* P2 输入寄存器 */ = P2IN_; 0x0029 /* P2 输出寄存器 */ = P2OUT_; 0x002A /* P2 方向选择寄存器 */ = P2DIR_; 0x002B /* P2 中断标志寄存器 */ = P2IFG_;

#define P2DIR_ sfrb P2DIR

#define P2IFG_ sfrb P2IFG

#define P2IES_ sfrb P2IES

0x002C /* P2 中断边沿选择寄存器 */ = P2IES_; 0x002D /* P2 中断使能寄存器 */ = P2IE_; 0x002E /* P2 功能选择寄存器 */ = P2SEL_;

#define P2IE_ sfrb P2IE

#define P2SEL_ sfrb P2SEL

MSP430寄存器中文注释---P3/4口 (无中断功能)

/************************************************************ * DIGITAL I/O Port3/4寄存器定义 无中断功能 ************************************************************/

#define P3IN_ const sfrb P3IN #define P3OUT_ sfrb P3OUT

0x0018 /* P3 输入寄存器 */ = P3IN_; 0x0019 /* P3 输出寄存器 */ = P3OUT_; 0x001A /* P3 方向选择寄存器 */ = P3DIR_; 0x001B /* P3 功能选择寄存器*/ = P3SEL_;

#define P3DIR_ sfrb P3DIR

#define P3SEL_ sfrb P3SEL

#define P4IN_ const sfrb P4IN #define P4OUT_ sfrb P4OUT

0x001C /* P4 输入寄存器 */ = P4IN_; 0x001D /* P4 输出寄存器 */ = P4OUT_; 0x001E /* P4 方向选择寄存器 */ = P4DIR_; 0x001F /* P4 功能选择寄存器 */ = P4SEL_;

#define P4DIR_ sfrb P4DIR

#define P4SEL_ sfrb P4SEL

/************************************************************ * DIGITAL I/O Port5/6 I/O口寄存器定义PORT5和6 无中断功能

************************************************************/

#define P5IN_ const sfrb P5IN #define P5OUT_ sfrb P5OUT

0x0030 /* P5 输入寄存器 */ = P5IN_; 0x0031 /* P5 输出寄存器*/ = P5OUT_; 0x0032 /* P5 方向选择寄存器*/ = P5DIR_; 0x0033 /* P5 功能选择寄存器*/ = P5SEL_;

#define P5DIR_ sfrb P5DIR

#define P5SEL_ sfrb P5SEL

#define P6IN_ const sfrb P6IN #define P6OUT_ sfrb P6OUT

0x0034 /* P6 输入寄存器 */ = P6IN_; 0x0035 /* P6 输出寄存器*/ = P6OUT_; 0x0036 /* P6 方向选择寄存器*/ = P6DIR_; 0x0037 /* P6 功能选择寄存器*/ = P6SEL_;

#define P6DIR_ sfrb P6DIR

#define P6SEL_ sfrb P6SEL

MSP430寄存器中文注释--- 硬件乘法器

/************************************************************ 硬件乘法器的寄存器定义 ************************************************************/

#define MPY_

0x0130 /* 无符号乘法 */

sfrw

MPY

= MPY_; 0x0132 /* 有符号乘法*/ = MPYS_; 0x0134 /* 无符号乘加 */ = MAC_; 0x0136 /* 有符号乘加 */ = MACS_; 0x0138 /* 第二乘数 */ = OP2_; 0x013A /* 低6位结果寄存器 */ = RESLO_; 0x013C /* 高6位结果寄存器 */ = RESHI_; 0x013E /*结果扩展寄存器 */ = SUMEXT_;

#define MPYS_ sfrw MPYS

#define MAC_ sfrw MAC

#define MACS_ sfrw MACS

#define OP2_ sfrw OP2

#define RESLO_ sfrw RESLO

#define RESHI_ sfrw RESHI

#define SUMEXT_ const sfrw SUMEXT

MSP430寄存器中文注释---看门狗和定时器

/************************************************************ * 看门狗定时器的寄存器定义

************************************************************/

#define WDTCTL_ sfrw WDTCTL

0x0120 = WDTCTL_; 0x0001 0x0002 0x0004 0x0008 0x0010 0x0020 0x0040 /*选择WDTCNT的四个输出端之一*/ /*选择WDTCNT的四个输出端之一*/ /*选择WDTCNT的时钟源*/ /*清除WDTCNT端: 为1时 从0开始计数*/ /*选择模式 0: 看门狗模式; 1: 定时器模式*/ /*选择NMI/RST 引脚功能 0:?为 RST; 1:为NMI*/ /*WDTNMI=1时.选择触发延 0:为上升延 1:为下降延*/

#define WDTIS0 #define WDTIS1 #define WDTSSEL #define WDTCNTCL #define WDTTMSEL #define WDTNMI #define WDTNMIES

#define WDTHOLD

0x0080

/*停止看门狗定时器工作 0:启动;1:停止*/

#define WDTPW

0x5A00

/* 写密码:高八位*/

/* SMCLK= 1MHz定时器模式 */ #define WDT_MDLY_32 WDTPW+WDTTMSEL+WDTCNTCL TSMCLK*2POWER15=32ms 复位状态 */ #define WDT_MDLY_8 WDTPW+WDTTMSEL+WDTCNTCL+WDTIS0 TSMCLK*2POWER13=8.192ms " */ #define WDT_MDLY_0_5 WDTPW+WDTTMSEL+WDTCNTCL+WDTIS1 TSMCLK*2POWER9=0.512ms " */ #define WDT_MDLY_0_064 WDTPW+WDTTMSEL+WDTCNTCL+WDTIS1+WDTIS0 TSMCLK*2POWER6=0.512ms " */ /* ACLK=32.768KHz 定时器模式*/ #define WDT_ADLY_1000 WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL TACLK*2POWER15=1000ms " */ #define WDT_ADLY_250 WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL+WDTIS0 TACLK*2POWER13=250ms " */ #define WDT_ADLY_16 TACLK*2POWER9=16ms WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL+WDTIS1 " */ /* /* /* /* /* /* /*

#define WDT_ADLY_1_9 WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL+WDTIS1+WDTIS0 /* TACLK*2POWER6=1.9ms " */ /* SMCLK=1MHz看门狗模式 */ #define WDT_MRST_32 WDTPW+WDTCNTCL TSMCLK*2POWER15=32ms 复位状态 */ #define WDT_MRST_8 WDTPW+WDTCNTCL+WDTIS0 TSMCLK*2POWER13=8.192ms " */ #define WDT_MRST_0_5 WDTPW+WDTCNTCL+WDTIS1 TSMCLK*2POWER9=0.512ms " */ #define WDT_MRST_0_064 WDTPW+WDTCNTCL+WDTIS1+WDTIS0 TSMCLK*2POWER6=0.512ms " */ /* ACLK=32KHz看门狗模式 */ #define WDT_ARST_1000 WDTPW+WDTCNTCL+WDTSSEL TACLK*2POWER15=1000ms " */ #define WDT_ARST_250 WDTPW+WDTCNTCL+WDTSSEL+WDTIS0 TACLK*2POWER13=250ms " */ /* /* /* /* /* /*

#define WDT_ARST_16 TACLK*2POWER9=16ms

WDTPW+WDTCNTCL+WDTSSEL+WDTIS1 " */

/* /*

#define WDT_ARST_1_9 WDTPW+WDTCNTCL+WDTSSEL+WDTIS1+WDTIS0 TACLK*2POWER6=1.9ms " */

MSP430寄存器中文注释---A/D采样寄存器定义

/************************************************************ * ADC12 A/D采样寄存器定义 ************************************************************/ /*ADC12转换控制类寄存器*/ #define ADC12CTL0_ sfrw ADC12CTL0 0x0;' /* ADC12 Control 0 */ = ADC12CTL0_; 0x01A2 /* ADC12 Control 1 */ = ADC12CTL1_;

#define ADC12CTL1_ sfrw ADC12CTL1

/*ADC12中断控制类寄存器*/ #define ADC12IFG_ sfrw ADC12IFG 0x01A4 /* ADC12 Interrupt Flag */ = ADC12IFG_; 0x01A6 /* ADC12 Interrupt Enable */ = ADC12IE_; 0x01A8 /* ADC12 Interrupt Vector Word */ = ADC12?IV_;

#define ADC12IE_ sfrw ADC12IE

#define ADC12IV_ sfrw ADC12IV

/*ADC12存贮器类寄存器*/ #define ADC12MEM_ 0x0140 /* ADC12 Conversion Memory */

#ifndef __IAR_SYSTEMS_ICC #define ADC12MEM #else #define ADC12MEM #endif #define ADC12MEM0_ ADC12MEM_ /* ADC12 Conversion Memory 0 */ ((int*) ADC12MEM_) /* ADC12 Conversion Memory (for C) */ ADC12MEM_ /* ADC12 Conversion Memory (for assembler) */

sfrw

ADC12MEM0

= ADC12MEM0_; 0x0142 /* ADC12 Conversion Memory 1 */ = ADC12MEM1_; 0x0144 /* ADC12 Conversion Memory 2 */ = ADC12MEM2_; 0x0146 /* ADC12 Conversion Memory 3 */ = ADC12MEM3_; 0x0148 /* ADC12 Conversion Memory 4 */ = ADC12MEM4_; 0x014A /* ADC12 Conversion Memory 5 */ = ADC12MEM5_; 0x014C /* ADC12 Conversion Memory 6 */ = ADC12MEM6_; 0x014E /* ADC12 Conversion Memory 7 */ = ADC12MEM7_; 0x0150 /* ADC12 Conversion Memory 8 */ = ADC12MEM8_; 0x0152 /* ADC12 Conversion Memory 9 */ = ADC12MEM9_; 0x0154 /* ADC12 Conversion Memory 10 */ = ADC12MEM10_; 0x0156 /* ADC12 Conversion Memory 11 */ = ADC12MEM11_; 0x0158 /* ADC12 Conversion Memory 12 */ = ADC12MEM12_; 0x015A /* ADC12 Conversion Memory 13 */ = ADC12MEM13_; 0x015C /* ADC12 Conversion Memory 14 */ = ADC12MEM14_; 0x015E /* ADC12 Conversion Memory 15 */

#define ADC12MEM1_ sfrw ADC12MEM1

#define ADC12MEM2_ sfrw ADC12MEM2

#define ADC12MEM3_ sfrw ADC12MEM3

#define ADC12MEM4_ sfrw ADC12MEM4

#define ADC12MEM5_ sfrw ADC12MEM5

#define ADC12MEM6_ sfrw ADC12MEM6

#define ADC12MEM7_ sfrw ADC12MEM7

#define ADC12MEM8_ sfrw ADC12MEM8

#define ADC12MEM9_ sfrw ADC12MEM9

#define ADC12MEM10_ sfrw ADC12MEM10

#define ADC12MEM11_ sfrw ADC12MEM11

#define ADC12MEM12_ sfrw ADC12MEM12

#define ADC12MEM13_ sfrw ADC12MEM13

#define ADC12MEM14_ sfrw ADC12MEM14

#define ADC12MEM15_

sfrw

ADC12MEM15

= ADC12MEM15_;

/*ADC12存贮控制类寄存器*/ #define ADC12MCTL_ 0x0080 /* ADC12 Memory Control */

#ifndef __IAR_SYSTEMS_ICC #define ADC12MCTL #else #define ADC12MCTL #endif #define ADC12MCTL0_ sfrb ADC12MCTL0 ADC12MCTL_ /* ADC12 Memory Control 0 */ = ADC12MCTL0_; 0x0081 /* ADC12 Memory Control 1 */ = ADC12MCTL1_; 0x0082 /* ADC12 Memory Control 2 */ = ADC12MCTL2_; 0x0083 /* ADC12 Memory Control 3 */ = ADC12MCTL3_; 0x0084 /* ADC12 Memory Control 4 */ = ADC12MCTL4_; 0x0085 /* ADC12 Memory ?Control 5 */ = ADC12MCTL5_; 0x0086 /* ADC12 Memory Control 6 */ = ADC12MCTL6_; 0x0087 /* ADC12 Memory Control 7 */ = ADC12MCTL7_; 0x0088 /* ADC12 Memory Control 8 */ = ADC12MCTL8_; 0x0089 /* ADC12 Memory Control 9 */ = ADC12MCTL9_; 0x008A /* ADC12 Memory Control 10 */ = ADC12MCTL10_; ((char*) ADC12MCTL_) /* ADC12 Memory Control (for C) */ ADC12MCTL_ /* ADC12 Memory Control (for assembler) */

#define ADC12MCTL1_ sfrb ADC12MCTL1

#define ADC12MCTL2_ sfrb ADC12MCTL2

#define ADC12MCTL3_ sfrb ADC12MCTL3

#define ADC12MCTL4_ sfrb ADC12MCTL4

#define ADC12MCTL5_ sfrb ADC12MCTL5

#define ADC12MCTL6_ sfrb ADC12MCTL6

#define ADC12MCTL7_ sfrb ADC12MCTL7

#define ADC12MCTL8_ sfrb ADC12MCTL8

#define ADC12MCTL9_ sfrb ADC12MCTL9

#define ADC12MCTL10_ sfrb ADC12MCTL10

#define ADC12MCTL11_ sfrb ADC12MCTL11

0x008B /* ADC12 Memory Control 11 */ = ADC12MCTL11_; 0x008C /* ADC12 Memory Control 12 */ = ADC12MCTL12_; 0x008D /* ADC12 Memory Control 13 */ = ADC12MCTL13_; 0x008E /* ADC12 Memory Control 14 */ = ADC12MCTL14_; 0x008F /* ADC12 Memory Control 15 */ = ADC12MCTL15_;

#define ADC12MCTL12_ sfrb ADC12MCTL12

#define ADC12MCTL13_ sfrb ADC12MCTL13

#define ADC12MCTL14_ sfrb ADC12MCTL14

#define ADC12MCTL15_ sfrb ADC12MCTL15

/* ADC12CTL0 内8位控制寄存器位*/ #define ADC12SC #define ENC #define ADC12TOVIE #define ADC12OVIE #define ADC12ON #define REFON #define REF2_5V #define MSH #define MSC 0x001 0x002 0x004 0x008 0x010 0x020 0x040 0x080 0x080 /*采样/转换控制位*/ /* 转换允许位*/ /*转换时间溢出中断允许位*/ /*溢出中断允许位*/ /*ADC12内核控制位*/ /*参考电压控制位*/ /*内部参考电压的电压值选择位 '0'为1.5V; '1'为2.5V*/ /*多次采样/转换位*/ /*多次采样/转换位*/

/*SHT0 采样保持定时器0 控制ADC12的结果存贮器MEM0~MEM7的采样周期*/ #define SHT0_0 #define SHT0_1 #define SHT0_2 #define SHT0_3 #define SHT0_4 #define SHT0_5 #define SHT0_6 #define SHT0_7 0*0x100 1*0x100 2*0x100 3*0x100 4*0x100 5*0x100 6*0x100 7*0x100 /*采样周期=TADC12CLK*4 */ /*采样周期=TADC12CLK*8 */ /*采样周期=TADC12CLK*16 */ /*采样周期=TADC12CLK*32 */ /*采样周期=TADC12CLK*64 */ /*采样周期=TADC12CLK*96 */ /*采样周期=TADC12CLK*128 */ /*采样周期=TADC12CLK*192 */

#define SHT0_8 #define SHT0_9 #define SHT0_10 #define SHT0_11 #define SHT0_12 #define SHT0_13 #define SHT0_14 #define SHT0_15

8*0x100 9*0x100 10*0x100 11*0x100 12*0x100 13*0x100 14*0x100 15*0x100

/*采样周期=TADC12CLK*256 */ /*采样周期=TADC12CLK*384 */ /*采样周期=TADC12CLK*512 */ /*采样周期=TADC12CLK*768 */ /*采样周期=TADC12CLK*1024 */ /*采样周期=TADC1?2CLK*1024 */ /*采样周期=TADC12CLK*1024 */ /*采样周期=TADC12CLK*1024 */

/*SHT1 采样保持定时器1 控制ADC12的结果存贮器MEM8~MEM15的采样周期*/ #define SHT1_0 #define SHT1_1 #define SHT1_2 #define SHT1_3 #define SHT1_4 #define SHT1_5 #define SHT1_6 #define SHT1_7 #define SHT1_8 #define SHT1_9 #define SHT1_10 #define SHT1_11 #define SHT1_12 #define SHT1_13 #define SHT1_14 #define SHT1_15 0*0x100 1*0x100 2*0x100 3*0x100 4*0x100 5*0x100 6*0x100 7*0x100 8*0x100 9*0x100 10*0x100 11*0x100 12*0x100 13*0x100 14*0x100 15*0x100 /*采样周期=TADC12CLK*4 */ /*采样周期=TADC12CLK*8 */ /*采样周期=TADC12CLK*16 */ /*采样周期=TADC12CLK*32 */ /*采样周期=TADC12CLK*64 */ /*采样周期=TADC12CLK*96 */ /*采样周期=TADC12CLK*128 */ /*采样周期=TADC12CLK*192 */ /*采样周期=TADC12CLK*256 */ /*采样周期=TADC12CLK*384 */ /*采样周期=TADC12CLK*512 */ /*采样周期=TADC12CLK*768 */ /*采样周期=TADC12CLK*1024 */ /*采样周期=TADC12CLK*1024 */ /*采样周期=TADC12CLK*1024 */ /*采样周期=TADC12CLK*1024 */

/* ADC12CTL1 内8位控制寄存器位*/ #define ADC12BUSY #define CONSEQ_0 #define CONSEQ_1 0x0001 0*2 1*2 /*ADC12忙标志位*/ /*单通道单次转换*/ /*序列通道单次转换*/

#define CONSEQ_2 #define CONSEQ_3 #define ADC12SSEL_0 #define ADC12SSEL_1 #define ADC12SSEL_2 #define ADC12SSEL_3 #define ADC12DIV_0 #define ADC12DIV_1 #define ADC12DIV_2 #define ADC12DIV_3 #define ADC12DIV_4 #define ADC12DIV_5 #define ADC12DIV_6 #define ADC12DIV_7 #define ISSH #define SHP #define SHS_0 #define SHS_1 #define SHS_2

2*2 3*2 0*8 1*8 2*8 3*8 0*0x20 1*0x20 2*0x20 3*0x20 4*0x20 5*0x20 6*0x20 7*0x20 0x0100 0x0200 0*0x400 1*0x400 %2

/*单通道多次转换*/ /*序列通道多次转换*/ /*ADC12内部时钟源*/ /*ACLK*/ /*MCLK*/ /*SCLK*/ /*1分频*/ /*2分频*/ /*3分频*/ /*4分频*/ /*5分频*/ /*6分频*/ /*7分频*/ /*8分频*/ /*采样输入信号反向与否控制位*/ /*采样信号(SAMPCON)选择控制位*/ /*采样信号输入源选择控制位 ADC12SC*/ /*采样信号输入源选择控制位 TIMER_A.OUT1*/


相关文章:
MSP430寄存器详细分类
MSP430寄存器详细分类_电子/电路_工程科技_专业资料...程序可检测 COV 来断定原值读出前是否又发生捕获事件.../比较寄存器 15--0 在捕获比较模块中,可读可写。...
MSP430寄存器
MSP430寄存器_计算机软件及应用_IT/计算机_专业资料。...MSP430教程6:MSP430寄存器中文注释 收藏 MSP430...停止*/ #define WDTPW 位*/ 0x5A00 /* 写密码:...
MSP430G2553寄存器的中文注释
MSP430G2553寄存器的中文注释_工学_高等教育_教育专区。MSP430G2553寄存器的的中文...停止*/ /* 写密码:高八位*/ /* SMCLK= 1MHz 定时器模式 */ #define W...
6MSP430寄存器中文注释
MSP430 寄存器中文注释 寄存器中文注释---P1/2 口(带中断功能) 带中断功能) /*** * DIGITAL I/O Port1/2 寄存器定义 有中断功能 ***...
MSP430寄存器中文注释
MSP430 寄存器中文注释 MSP430 寄存器中文注释---P1/2 口(带中断功能) /*** * DIGITAL I/O Port1/2 寄存器定义 有中断功能 ***/ #define...
MSP430寄存器的一些注释,带中文解释
MSP430 教程 6:MSP430 寄存器中文注释收藏 : MSP430 寄存器中文注释 寄存器中文注释---P1/2 口(带中断功能) 带中断功能) /*** * DIGITAL I/O Port1/2 ...
MSP430寄存器中文注释
MSP430寄存器中文注释_计算机硬件及网络_IT/计算机_专业资料。MSP430 寄存器中文...停止*/ #define WDTPW 0x5A00 /* 写密码:高八位*/ /* SMCLK= 1MHz 定时...
MSP430寄存器中文注释
MSP430寄存器中文注释MSP430寄存器中文注释隐藏>> MSP430 寄存器中文注释---P1/...停止*/ #define WDTPW 0x5A00 /* 写密码:高八位*/ /* SMCLK= 1MHz 定时...
MSP430程序库六通过SPI操作AD7708
MSP430 程序库<六>通过 SPI 操作 AD7708 AD7708 ...手册的寄存器部分和 程序流程的部分进行了翻译,如果...AD7708 的每次操作都以写通信寄存器开始,通 过这一...
MSP430系列寄存器详细分类及介绍
MSP430系列寄存器详细分类及介绍_电子/电路_工程科技...程序可检测 COV 来断定原值读出前是否又发生捕获事件.../比较寄存器 15--0 在捕获比较模块中,可读可写。...
更多相关标签: