MSP430F42X
MSP单片机

MSP430X11X系列
MSP430X12X系列
MSP430X13X系列
MSP430X14X系列
TAIV保存中断向量
液晶驱动模块
MSP430的一个片内外围模块
按照显示缓存的内容来产生SEG和COM信号。
含有驱动外部直接相连的LCD的全部功能模块。
MSP430液晶驱动模块主要特点
具有显示缓存器
所需的SEG、COM信号自动产生 4种驱动方法 多种扫描频率 段输出端口可以切换为通常输出端口
显示缓存器可作为一般存储器
MSP430系列单片机包含以下主要功能部件:
CPU:MSP430系列单片机的CPU和通用微处理器基本相同,只是在设计上采用了面向控
制的结构和指令系统。MSP430的内核CPU结构是按照精简指令集和高透明的宗旨而设计
的,使用的指令有硬件执行的内核指令和基于现有硬件结构的仿真指令。这样可以提 高指令执行速度和效率,增强了MSP430的实时处理能力。
定时器A特性
输入时钟可以有多种选择,可是慢时钟,快时钟以及外部时钟
虽然没有自动重载时间常数功能,但产生的定时脉冲或 PWM(脉宽调 制)信号没有软件带来的误差。
不仅能捕获外部事件发生的时间还可锁定其发生时的高低电平。
可实现串行通讯 完善的中断服务功能 4种计数功能选择 8种输出方式选择
支持多时序控制
看门狗定时器应用举例
中断允许 WDTIE位 于IE1.0, 初始状态为 复位
# include <msp430x14x.h> void main(void) { WDTCTL = WDT_MDLY_32; // 定时周期为32ms IE1 |= WDTIE; // 使能WDT中断 P1DIR |= 0x01; // P1.0输出 _EINT(); // 系统中断允许 for (;;) { _BIS_SR(CPUOFF); // 进入 LPM0 两种中断 _NOP(); ,两个级 } 别,两种 } 处理 // 看门狗中断服务子程序 #pragma vector= WDT_VECTOR __interrupt void watchdog_timer (void) { P1OUT ^= 0x01; // P1.0取反 }
msp430f247

MSP430F23xMSP430F24x(1)MSP430F2410 ZHCSA15H–JUNE2007–REVISED AUGUST2011混合信号微控制器特性•低电源电压范围,1.8V至3.6V•片载比较器•超低功耗•具有可编程电平检测功能的电源电压监控器/监视器–激活模式:270μA(在1MHz频率和2.2V电压•欠压检测器条件下)•引导加载程序–待机模式(VLO):0.3μA•串行板上编程、无需外部编程电压、由安全熔丝实–关闭模式(RAM保持):0.1μA现的可编程代码保护•可在不到1μs的时间里超快速地从待机模式唤醒•系列产品包括:•16位精简指令集(RISC)架构,62.5ns指令周期时–MSP430F233间–8KB+256B闪存存储器,•基本时钟模块配置:–1KB RAM–内部频率高达16MHz–MSP430F235–内部极低功耗低频(LF)振荡器–16KB+256B闪存存储器–32kHz晶振–2KB RAM–具有4个精度为±1%校准频率且高达16MHz–MSP430F247,MSP430F2471(1)的内部频率–32KB+256B闪存存储器–谐振器–4KB RAM–外部数字时钟源–MSP430F248,MSP430F2481–外部电阻器–48KB+256B闪存存储器•带内部基准、采样与保持以及自动扫描功能的12–4KB RAM位模数(A/D)转换器–MSP430F249,MSP430F2491•具有3个捕获/比较寄存器的16位Timer_A–60KB+256B闪存存储器•具有7个捕获/比较寄存器(带有影子寄存器)的–2KB RAM16位Timer_B–MSP430F2410•4个通用串行通信接口(USCI)–56KB+256B闪存存储器–USCI_A0和USCI_A1–4KB RAM–支持自动波特率检测的增强型通用异步接收发器•采用64引脚四方扁平(QFP)和64引脚四方扁平(UART)无引线(QFN)封装(请见可用选项)–IrDA编码器和解码器•如需了解完整的模块说明,请查阅《MSP430x2xx –同步串行外设接口(SPI)系列用户指南》,文献编号:SLAU144–USCI_B0和USCI_B1–I2C(1)除了ADC12模块不在MSP430F24x1上执行–同步串行外设接口(SPI)外,MSP430F24x1器件与MSP430F24x器件完全一样。
MSP430程序库之定时器TA的PWM输出

MSP430程序库之定时器TA的PWM输出定时器是单片机常用的其本设备,用来产生精确计时或是其他功能;msp430的定时器不仅可以完成精确定时,还能产生PWM波形输出,和捕获时刻值(上升沿或是下降沿到来的时候)。
这里完成一个比较通用的PWM波形产生程序。
1.硬件介绍:MSP430系列单片机的TimerA结构复杂,功能强大,适合应用于工业控制,如数字化电机控制,电表和手持式仪表的理想配置。
它给开发人员提供了较多灵活的选择余地。
当PWM 不需要修改占空比和时间时,TimerA 能自动输出PWM,而不需利用中断维持PWM输出。
MSP430F16x和MSP430F14x单片机内部均含有两个定时器,TA和TB;TA 有三个模块,CCR0-CCR2;TB含有CCR0-CCR67个模块;其中CCR0模块不能完整的输出PWM波形(只有三种输出模式可用);TA可以输出完整的2路PWM波形;TB可以输出6路完整的PWM波形。
定时器的PWM输出有有8种模式:输出模式0 输出模式:输出信号OUTx由每个捕获/比较模块的控制寄存器CCTLx中的OUTx位定义,并在写入该寄存器后立即更新。
最终位OUTx直通。
输出模式1 置位模式:输出信号在TAR等于CCRx时置位,并保持置位到定时器复位或选择另一种输出模式为止。
输出模式2 PWM翻转/复位模式:输出在TAR的值等于CCRx时翻转,当TAR 的值等于CCR0时复位。
输出模式3 PWM置位/复位模式:输出在TAR的值等于CCRx时置位,当TAR 的值等于CCR0时复位。
输出模式4 翻转模式:输出电平在TAR的值等于CCRx时翻转,输出周期是定时器周期的2倍。
输出模式5复位模式:输出在TAR的值等于CCRx时复位,并保持低电平直到选择另一种输出模式。
输出模式6PWM翻转/置位模式:输出电平在TAR的值等于CCRx时翻转,当TAR值等于CCR0时置位。
输出模式7PWM复位/置位模式:输出电平在TAR的值等于CCRx时复位,当TAR的值等于CCR0时置位。
msp430 sd16模块程序

/*MSP430F42X系列单片机16位ADC通用程序库说明:该驱动程序库包含了常用的16位ADC操作与控制功能函数,如选择通道、设置信号放大倍数、设置数据格式、基准源输出开关等,以及常用采样函数,包括单通道采样、平均采样、多通道同时采样等。
可以作为各种程序的底层驱动使用。
要使用该库函数,需要将本文件(ADC16.c)添加进工程,并在需要调用ADC函数的文件开头处包含"ADC16.h"*/// MSP430FE425// +----------------------+// | |// Vin->100:1-->| A0+ XIN|---// -10~+60V | (ADC0) | 32kHz// GND--------->| A0- XOUT|---// | |// 1/2Vref | |// | | |// |-| | P2.2 |--------->向外部模拟电路供电// W1 | |<----->| A1+ |// |_| | (ADC1) |// +------->| A1- VREF |---+----->基准输出// GND | | |// | | ---// 1/2Vref | | --- 1nF// | | | |// |-| | A Vss |---+// W2 | |<----->| A2+ | |// |_| | (ADC2) | |// +------->| A2- | GND// GND | |// +----------------------+#include <msp430x42x0.h>int ADC_Result;char ADC_Flag=0;/**************************************************************************** * 名称:ADC16_Init()* 功能:ADC初始化设置函数* 出口参数:****************************************************************************/ void ADC16_Init(){SD16CTL |= (SD16REFON+SD16VMIDON); //开启内部基准源,开启输出缓冲器SD16CTL |= SD16SSEL_1+SD16DIV_3; //设置ADC时钟SMCLK/8(524KHz) //试验发现500KHz左右采样效果较好,频率高噪声变大,频率低采样速度慢//---------------------------------------------------------------------------SD16CCTL0 |= SD16IE+SD16DF; //有符号(双极性) enable interrupt//---------------------------------------------------------------------------SD16INCTL0 |=SD16INCH_0; //设置新的通道号0//---------------------------------------------------------------------------/*SD16INCTL0&=~(SD16GAIN0+SD16GAIN1+SD16GAIN2);//清除上一次设置的增益switch(Gain) //根据参数设置新的增益{case 1 : SD16INCTL0|=SD16GAIN_1; break; //1倍case 2 : SD16INCTL0|=SD16GAIN_2; break; //2倍case 4 : SD16INCTL0|=SD16GAIN_4; break; //4倍case 8 : SD16INCTL0|=SD16GAIN_8; break; //8倍case 16: SD16INCTL0|=SD16GAIN_16;break; //16倍case 32: SD16INCTL0|=SD16GAIN_32;break; //32倍default: return(0); //设置了不存在的增益,返回错误标志} */}/**************************************************************************** * 名称:ADC16_Sample()* 功能:单个ADC采样函数。
MSP430FE42x

IMPORTANT NOTICETexas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements. Following are URLs where you can obtain information on other Texas Instruments products and application solutions:Products ApplicationsAmplifiers Audio /audioData Converters Automotive /automotiveDSP Broadband /broadbandInterface Digital Control /digitalcontrolLogic Military /militaryPower Mgmt Optical Networking /opticalnetwork Microcontrollers Security /securityTelephony /telephonyVideo & Imaging /videoWireless /wirelessMailing Address:Texas InstrumentsPost Office Box 655303 Dallas, Texas 75265Copyright 2003, Texas Instruments Incorporated。
MSP430BSL使用说明

MSP430BSL 使用说明REV 3.0首先感谢您购买了本公司的MSP430开发工具我们将为您提供最完善的售后服务和最全面的技术支持下图是MSP430BSL的产品清单1、MSP430BSL*12、DB9针对孔串口连线*13、10芯扁平连线*14、附有BSL软件的光盘*1一、BSL的介绍什么是BSL(Bootstrap loader)? Bootstrap loader是MSP430FLASH系列单片机独有的一项功能。
在程序空间、RAM之外有1K左右的引导区,用来存放430的BOOTROM文件(这是一个引导ROM,类似网卡上的BOOTROM)。
当外界给芯片提供一种特定的激励时,芯片内的引导程序开始工作,引导外部数据写入片内ROM、RAM区,或者是发送片内数据到外部。
这些都是通过一个软UART来完成的。
如果是FLASH系列的单片机,则FLASH空间包含了ROM和RAM。
这个引导程序是固化在BOOTROM空间内,而且是一个用户不能直接使用和修改的存储空间。
430BSL的主要原理是通过芯片特殊的上电复位后,引导片外代码烧录到片内FLASH中,来完成系统编程的。
我们的MSP430BSL工具使用非常方便,图形化的界面让你通过鼠标就能顺利下载代码,读出内部任何数据。
这里提及的代码是TI专用的430-TXT格式文本,可以通过IAR-EW430的编译器生成。
MSP430BSL的主要特点1、代码下载。
下载任意编译系统提供的标准430-TXT源代码。
2、读出芯片内的程序、信息FLASH等随意指定空间。
目前支持TI推出的MSP430 FLASH全系列芯片,包括一些补丁程序所做的修改,都在REV3.0软件上做了改进。
3、芯片加密后还能通过256BIT密码字校验后下载、升级、读写芯片内容。
对一些产品遭受破坏还需要读出内部数据来说是非常好的一种工具。
其在仪表的软件调校上也有很广泛的应用。
(JTAG接口一般不留在成熟的产品里)4、尺寸小,随身携带。
MSP430 常见问题解答 V1.0

21. MSP430 JTAG 与 IEEE 1149.1 间的兼容性如何?
MSP430 JTAG 接口执行由 IEEE 标准 1149.1 规定的测试访问端口状态机(TAP 控制器)。 然而,有一 些对于 MSP430 JTAG 的限制(不符合 IEEE 标准 1149.1):
MSP430 必须是 JTAG 链中的第一个器件(这是因为通过 TDI 和 JTAG 熔丝检查序列计时)。 没有 MSP430 器件具有边界扫描单元 只支持 BYPASS 指令。 不支持 SAMPLE,PRELOAD,或 EXTEST 指令。 JTAG 引脚与特定器件上的端口功能共用;由 TEST 引脚控制 JTAG 功能。
PERIPHERALS_8BIT 00000010 000000f0 00000000 000000f0 RWIX
PERIPHERALS_16BIT 00000100 00000100 00000000 00000100 RWIX
RAM
00000200 00000200 00000050 000001b0 RWIX
请参考以下 维基网页。
19. 我在哪里能够找到具有 JTAG 类型(4 线制或 2 线制)的 MSP430 器件的 列表?
这些信息可经由 JTAG 用户指南在 MSP430 编程中找到: tidoc:slau320,表 1-14“整个器件系列的 JTAG 特性”。
20. TI 是否为批量生产提供 MSP430 工具编辑器?
如果你正在使用 C 语言进行编程(现在很常见),在开始使用全新微控制器平台时最困难的是了解外设。 CPU 本身不是问题,这是因为代码由 C 语言编写。因此,研究 TI 提供的可能性,使你在使用这里的 MSP430 外设时更加轻松: MSP430 软件,其中包括:
MSP430F42X0混合信号微控制器

特性
低电源电压范围:1.8V-3.6V
超低功耗:活动模式:250 A@1MHz,2.2V
待机模式:1.1 A
关闭模式(RAM保持):0.1 A
五种省电模式
6 s内从待机模式唤醒
16位RISC体系,125ns指令周期
16位带内部参考的∑-△模数转换器
12位数模转换器
带3个捕获/比较寄存器的16位定时器Timer_A
节电(Brownout)检测器
引导加载程序(BSL)
串行在线编程,无需外部编程电压
安全熔丝可编程代码保护
集成56段带对比度控制LCD驱动器
MSP430x42x0系列器件包括: - MSP430F4250: 16KB ROM,256B RAM 256B Flash Memory
P1.2/TA1/A4- 26 I/O 通用数字I/O/Timer_A,捕获:CCI1A,比较:Out1输出/模拟输入A4-
P1.1/TA0/MCLK 27 I/O 通用数字I/O/Timer_A,捕获:CCI0B/MCLK输出
P1.0/TA0
28 I/O
通用数字I/O/ Timer_A,捕获:CCI0A 输入/比较:Out0输出/BSL
生器,其余的寄存器可用作通用寄存器.
外设利用一个数据,地址和控制总线连接到CPU,并能容易的利用所有处理指令操作.
PC/R0
SP/R1
SR/CG1/R2
CG2/R3
R4
R5
●
●
R14
R15
程序计数器
堆栈指针
状态寄存器
常数发生器
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.
TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. T esting and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.
TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. T o minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.
Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements. Following are URLs where you can obtain information on other Texas Instruments products and application solutions:
Products Applications
Amplifiers Audio /audio
Data Converters Automotive /automotive
DSP Broadband /broadband
Interface Digital Control /digitalcontrol
Logic Military /military
Power Mgmt Optical Networking /opticalnetwork Microcontrollers Security /security
Telephony /telephony
Video & Imaging /video
Wireless /wireless
Mailing Address:Texas Instruments
Post Office Box 655303 Dallas, Texas 75265
Copyright 2004, Texas Instruments Incorporated。