MSP430F149开发板电路原理图
LT-1B MSP430F149完整原理图

自文档归原著所有LT-1BMSP430F149 学习板原理图技术文档说明:自文档归原著所有,但原理图部分有本人自己画图所得,将原著分开的文档画在一个工作区内,方便查阅。
MSP430F149学习板特点选用16 位超低功耗单片机MSP430F149,此MCU的特点如下:l 1.8V~3.6V超宽供电电压l 5 种低功耗模式,从standby 模式唤醒时间小于6μsl0.1uA RAM 保持l0.8uA 实时时钟模式l2K RAM,60KB+256B Flash Memory(支持IAP)l片内硬件乘法器支持四种乘法运算l两个具有PWM输出单元的16-Bit定时器(TimerA3,TimerB7)l两个UART接口,两个SPI 接口(与UART 复用)l一个8 通道12-Bit模数转换器(ADC),具有片内参考电压源l一个模拟比较器,看门狗电路等开发板上功能全面、板上资源丰富:¾三种可选供电方式(标准稳压器接口、USB 接口、电池接口)¾一个8-Bit 双向电平转换接口(5V--3.3V, 3.3V--5V)¾一个兼容USB2.0 规范、符合USB1.1 规范的标准USB 接口¾一个标准的六芯PS2 接口¾一个符合原厂标准的JTAG 仿真调试端口¾一个蜂鸣器¾一个射频通信模块接口¾一个12-Bit 高精度温度传感器¾一个8 路12-Bit 模数转换器(ADC)接口¾一个标准的1602 液晶接口¾一个标准的12864液晶接口¾一个六位共阴极动态扫描数码管电路¾一个可更换的CPU适配器¾一个RTC实时时钟+纽扣电池¾一个存储容量为256×8-Bit的EEPROM¾一个单路输出8-Bit 数模转换器(DAC)¾一个4×4的矩阵式键盘¾一个4×1的独立式按键(与4×4 的矩阵式键盘复用)¾一个标准的RS232接口¾一个简易的RS485接口¾一个含8 个LED 的流水灯电路(红、黄、绿)¾MCU 的全部IO 都用插针引出,便于二次开发提供电源指示灯和上电自动复位、手动复位电路,全SMD 设计、系统稳定可靠。
第二章 MSP430F149基本时钟系统

DCOR DIVS0 DIVS1 SELS DIVM0 DIVM1 SELM0 SELM1
(0x01) /* DCO 外部电阻使能 */ (0x02) /* SMCLK 2 分频 */ (0x04) /* SMCLK 4 分频*/ (0x08) /* SMCLK 时钟源选择 0:DCOCLK / 1:XT2CLK/LFXT1CLK */ (0x10) /* MCLK 2 分频 */ (0x20) /* MCLK 4 分频 */ (0x40) /* MCLK 时钟源选择 01:DCOCLK*/ (0x80) /* MCLK 时钟源选择 10:有 XT2 则选择 XT2CLK 否则选择 LFXT1CLK*/
/*************************************************
*BCSCTL2 控制位定义
**************************************************/
#define #define #define #define #define #define #define #define
/* Modulation Bit 0 */ /* Modulation Bit 1 */ /* Modulation Bit 2 */ /* Modulation Bit 3 */ /* Modulation Bit 4 */ /* DCO Select Bit 0 */ /* DCO Select Bit 1 */ /* DCO Select Bit 2 */
0——禁止中断
1——允许中断
说明:IE1 中其余位可能被其它模块使用。
5、IFG1:中断标志寄存器 1
7
6
5
4
第三章 MSP430F149通用数字端口

PxOUT 寄存器每一位是相应引脚配置为通用 O 输出时的输出值。
0 PxOUT.0
PxOUT.x=0,输出低电平
PxOUT.x=1,输出高电平
例:
P2DIR |=BIT0+BIT2+BIT4;//将 P2.0/P2.2/P2.4 设置为输出
P2OUT |=BIT0+BIT2+BIT4;//P2.0/P2.2/P2.4 输出高电平
P6DIR |=BIT0;//P6.0 设置为输出 P6OUT |=BIT0;//P6.0 输出高电平关闭 LED 灯
P1IES &=~BIT0;//P1.0 中断上升沿触发 P1IFG &=~BIT0;//清除 P1.0 中断标志 P1IE |=BIT0;//允许 P1.0 中断 _EINT();//开放系统中断 while(1) {
P6OUT ^=(BIT0+BIT2+BIT4+BIT6);//P6.0/2/4/6 端口 LED 闪烁 for(i=0;i<50000;i++);//延时 } }
应用二:软件定时,使 P6.0 输出方波使 LED 灯闪烁。程序如下:
#include <msp430x14x.h> void main( void ) {
PxIFG.x=0,没有中断发生
PxIFG.x=1,有中断发生
注意:写 PxOUT.x、PxDIR.x 将导致相应标志位 PxIFG.x 置位;I/O 脚上的中断事件
必须保持 1.5 倍 MCLK 周期以上才能保证中断被识别并使相应标志位置位。
(7)中断触发沿选择寄存器 PxIES(x=1,2)
7 PxIES.7
应用三:在 P3.0 上产生方波,将 P3.0 与 P1.0 相连,P1.0 接收中断,在中断程序中
MSP430F149[1]
![MSP430F149[1]](https://img.taocdn.com/s3/m/53764a89680203d8ce2f2494.png)
D
D D
† The MSP430F14x1 devices are identical to the MSP430F14x devices with the exception that the ADC12 module is not implemented.
description
The Texas Instruments MSP430 family of ultralow-power microcontrollers consist of several devices featuring different sets of peripherals targeted for various applications. The architecture, combined with five low power modes is optimized to achieve extended battery life in portable measurement applications. The device features a powerful 16-bit RISC CPU, 16-bit registers, and constant generators that attribute to maximum code efficiency. The digitally controlled oscillator (DCO) allows wake-up from low-power modes to active mode in less than 6 µs. The MSP430x13x and the MSP430x14x(1) series are microcontroller configurations with two built-in 16-bit timers, a fast 12-bit A/D converter (not implemented on the MSP430F14x1 devices), one or two universal serial synchronous/asynchronous communication interfaces (USART), and 48 I/O pins. Typical applications include sensor systems that capture analog signals, convert them to digital values, and process and transmit the data to a host system. The timers make the configurations ideal for industrial control applications such as ripple counters, digital motor control, EE-meters, hand-held meters, etc. The hardware multiplier enhances the performance and offers a broad code and hardware-compatible family solution.
MSP430F149开发板电路原理图

1
2 P 31
3
4 P 32
5
6 P 33
7
8 P 34
9 10 P 35
11 12 P 36
13 14 P 37
15 16
7
串口通信电路
串口通信电路
J10 5 9 4 8 3 7 2 6 1
SC9
1
C7 1u 3
4
C8 1u 5
14 7 13
8
U12 MAX232
C1+
Vs+
C1-
Vs-
C2+
VCC
SJ9 SW-PB
SJ13 SW-PB
SJ2 SW-PB
SJ6 SW-PB
SJ10 SW-PB
SJ14 SW-PB
SJ3 SW-PB
SJ7 SW-PB
SJ11 SW-PB
SJ15 SW-PB
SJ4 SW-PB
SJ8 SW-PB
SJ12 SW-PB
SJ16 SW-PB
.
JP7 HEADER 8X2
P 30
U6 A
P37
1
3
PS EN
2
SN 74HC 08N
.
VC C C4 0.1 uF
U1 7A 2
A1 5
1
2
24个跑马灯和4位数码显示管电路
A
B
C
D
E
F
G
DP
A
B
C
D
E
F
G
DP A
B
C
D
E
F
G
DP
DB1 DB2 DB3 DB4 DB5 DB6 DB7 DB8
MSP430F149介绍文档

P3DIR |= BIT4; //将P3.4设置为输出方向
P3OUT |= BIT3; //使P3.4输出高电平(实验板上初始化灯的状态为熄//灭)
while(1) {
P3OUT ^= BIT4; //灯的状态取反
Delay(); //调用延时子程序
}
}
/*******以下是一个不精确的延时子程序****(i=0;i<1000;i++)
for(j=0;j<110;j++);
}
将该程序烧入MSP430测试,看现象。
开发板给出的源码程序通常使用以下程序作为延时程序
i=50000;
do(i--);
while(i!=0);
课程入门介绍
MSP430引脚介绍(芯片图参考数据手册第3页)
58脚RST/NMI为430单片机的复位引脚(低电平有效)。
1脚DVCC,63脚DVSS为数字电源接口。
64脚AVCC,62脚AVSS为模拟电源接口。
注意:MSP430系列单片机的供电电压为1.8V~3.6V。
说明(在MSP430小系统中数字电源地与模拟电源地必须通过0欧电阻连接起来以防止数字电路产生的高频信号对模拟电路造成影响)
54脚TDO/TDI,55脚TDI/TCLK,56脚TMS,57脚TCK为JTAG接口(同时拥有仿真器和编程器的功能),用于下载程序并实现硬件在线仿真。
具体引脚功能参考《MSP430英文数据手册.pdf》8页
I/O口的操作
P1~P6的公有寄存器位为PXSEL,PXDIR,PXOUT,PXIN。
其中P1,P2相对于P3,P4,P5,P6还多出了3个寄存器PXIE,PXIES,PXIFG,这三个寄存器是用于设置开启P1,P2的外部触发中断使用的(其中X可以为1,2,3,4,5,6)。
MSP430F149简易数控直流电源

94年“简易数控直流电源”设计要求一、设计任务设计出有一定输出电压范围和功能的数控电源。
其原理示意图如下:二、设计要求1.基本要求(1)输出电压:范围0~+9.9V,步进0.1V,纹波不大于10mV;(2)输出电流:500mA;(3)输出电压值由数码管显示;(4)由“+”、“-”两键分别控制输出电压步进增减;(5)为实现上述几部件工作,自制一稳压直流电源,输出±15V,+5V。
2.发挥部分(1)输出电压可预置在0~9.9V之间的任意一个值;(2)用自动扫描代替人工按键,实现输出电压变化(步进0.1V不变);(3)扩展输出电压种类(比如三角波等)。
三、评分意见项目得分方案设计与论证、理论计算与分析、电路图30基本要求实际完成情况50总结报告20完成第一项5完成第二项15发挥部分完成第三项20且可以方便实现人性化很强的人机界面(键盘输入和液晶输出)。
比之与其它方案,方案三在实现设计要求上有着很大的优越性:不需要外接D/A转换芯片;不需要复杂的参考电压产生电路;不需要外接总线驱动就可以方便实现键盘和液晶显示;MSP430F149内部有足够的存储空间,足以存储程序和显示所需要的汉字字模,不需要扩展存储;MSP430F149有多种低功耗工作模式,通过合理的程序控制可以方便实现低功耗运行。
MSP430F149内部有16位的硬件乘法器,可以快速实现乘法运算;MSP430F149使用的指令简单,只有27条指令,指令周期短,数值计算能力强大。
鉴于以上种种优点,我们最终选择了MSP430F149单片机作为我们的控制中心,并且采用了第三种方案来实现设计的要求。
二.工作原理及电路设计1.工作原理PWM ( pulse-width modulated)脉宽调制信号是一种具有固定周期T,占空比可调的数字信号(如图所示)。
如果PWM 信号的占空比随时间变化,那么通过滤波之后的输出信号将是幅度变化的模拟信号。
因此通过控制PWM 信号的占空比就可以产生不同的模拟信号。
MSP430F149 学习板使用说明

MSP430F149 开发板使用说明2009年09月第一章新手入门1.1 MSP430F149 学习板特点:选用16 位超低功耗单片机MSP430F149,采用子母双板分离设计,MCU 子板与集成外设母板通过插针座连接,使用灵活方便。
ØMCU 的全部IO都用插针引出,便于二次开发提供电源指示灯和上电自动复位、手动复位电路。
2、蜂鸣器实验(1)蜂鸣器1:单频音(步进变音调)(2)蜂鸣器2:奏乐(祝你平安)3、数码管实验(1)数码管1(显示0123)(2)数码管2(动态显示0~F)4、4×1 独立按键实验(1)键盘1:扫描数码管显示5、1602 液晶实验(1)1602 液晶1:动态字符显示(2)1602 液晶2:静态字符显示(3)1602 液晶3:内部时钟显示6、RS232 接口实验(1)RS232 接口1:MCU 发送数据PC 机显示(2)RS232 接口2:按键控制MCU 发送数据PC 机显示(3)RS232 接口3:PC 机发送数据MCU 液晶显示(4)RS232 接口4:MCU 回发接收到的PC 机数据7、RS485 接口实验(1)RS485 接口1:发送程序8、PS2 接口实验(1)PS2 接口1:PS2 控制1602 显示9、12-Bit 高精度温度传感器实验(1)温度传感器1:DS18B20 在液晶显示10、RTC 实时时钟实验(1)实时时钟1:DS1302 测试(2)实时时钟2:DS1302 电子钟11、2k Bit EEPROM 实验(1)EEPROM1:AT24C02 测试(2)EEPROM2:读出数据通过串口在PC 机显示12、12-Bit 模数转换器(ADC)接口实验(1)模数转换器2:ADC 在1602 液晶在显示(2)模数转换器3:ADC 通过串口在PC 机显示13、12864 液晶实验(与12864 液晶配套)(1)12864 液晶并口1:字符显示(2)12864 液晶并口2:汉字显示(3)12864 液晶并口3:图形显示(4)12864 液晶并口4:综合演示(5)12864 液晶串口5:字符显示(6)12864 液晶串口6:汉字显示(7)12864 液晶串口7:图形显示(8)12864 液晶串口8:综合演示14、HS0038红外接口实验(1)红外遥控解码实验,在数码管上显示三、开发板综合程序1、温度时间综合实验(1)DS18B20 + DS1302 + 16022、SSCOM综合实验(1)PC发送接收字符第三章板上资源详解本章详细介绍了MSP430F149 学习板上各个功能模块的硬件电路原理、使用方法和注意事项,使用前请仔细阅读。
MSP430电路图集锦

MSP430电路图集锦:创新设计思维2014年11月12日10:11 来源:电子发烧友网整合作者:Dick 我要评论(0)标签:TI(566)MSP430(499)MSP430系列单片机是美国德州仪器开始推向市场的一种16位超低功耗、具有精简指令集的混合信号处理器。
称之为混合信号处理器,是由于其针对实际应用需求,将多个不同功能的模拟电路、数字电路模块和微处理器集成在一个芯片上,以提供“单片机”解决方案。
该系列单片机多应用于需要电池供电的便携式仪器仪表中。
下面一起来看看基于MSP430的设计电路图集锦。
1、采用MSP430单片机的可穿戴式血糖仪电路介绍了一种便携式血糖仪的设计。
该设计主要从低功耗及精确性的角度出发,以MSP430系列单片机为核心,葡萄糖氧化酶电极为测试传感器,较快地测试出血糖浓度。
此外,所设计的血糖仪还具有储存功能,有助于用户查看血糖浓度历史值和变化趋势。
血糖测试电路:在酶电极两端滴入血液后,会产生自由电子。
由于电极两端存在激励电压,就会有定向电流流过电极。
该激励电压是由ADC模块提供的1.5V稳压通过电阻分压而产生的,大约在300mV左右,它能产生μA级别的定向电流。
由于A/D转换模块测量的是电压,所以需要将该定向电流转换成电压,并且进行一定的放大。
本系统采用图2所示的电路来实现电流到电压的转换和放大。
运算放大器LM358的反相端连接血糖试纸上的酶电极,当有血液滴入时,该电极与地之间为等效电阻Rx,流过该电阻的电流正比于血液中的血糖浓度值。
MSP430的A/D模块输出1.5V的稳压通过R2 和R3分压,产生300mV的激励电压,该电压通过运放的正端加到电极两端。
R4起到反馈放大的作用,它将运放的输出范围限定在A/D模块的转换范围内。
在PCB板布线时,由于运放输出和MSP430的ADC模块输入I/O口之间的走线比较长,为了确保测量值的准确,需要对测试电压进行滤波,C21就是用来起滤波作用的,以减少走线过长所引入的外来干扰对血糖测试的影响。
MSP430F149数据手册_引脚图_参数

An IMPORTANT NOTICE at the end of this data sheet addresses availability,warranty,changes,use in safety-critical applications,intellectual property matters and other important disclaimers.PRODUCTION DATA.MSP430F149,MSP430F148,MSP430F147MSP430F1491,MSP430F1481,MSP430F1471MSP430F135,MSP430F133SLAS272H –JULY 2000–REVISED MAY 20181Device Overview1.1Features•Low Supply Voltage Range,1.8V to 3.6V •Ultra-Low Power Consumption:–Active Mode:280µA at 1MHz,2.2V –Standby Mode:1.6µA–Off Mode (RAM Retention):0.1µA •Five Power-Saving Modes•Wakeup From Standby Mode in Less Than 6µs •16-Bit RISC Architecture,125-ns Instruction Cycle Time•12-Bit Analog-to-Digital Converter (ADC)With Internal Reference,Sample-and-Hold,and Autoscan Feature•16-Bit Timer_B With Seven Capture/Compare-With-Shadow Registers•16-Bit Timer_A With Three Capture/Compare Registers•On-Chip Comparator•Serial Onboard Programming,No External Programming Voltage Needed,Programmable Code Protection by Security Fuse•Serial Communication Interface (USART),Functions as Asynchronous UART or Synchronous SPI Interface–Two USARTs (USART0,USART1)On MSP430F14x and MSP430F14x1Devices –One USART (USART0)On MSP430F13x Devices•Family Members (Also See Device Comparison )–MSP430F133–8KB +256Bytes of Flash Memory,256Bytes of RAM –MSP430F135–16KB +256Bytes of Flash Memory,512Bytes of RAM–MSP430F147,MSP430F1471–32KB +256Bytes of Flash Memory,1KB of RAM–MSP430F148,MSP430F1481–48KB +256Bytes of Flash Memory,2KB of RAM–MSP430F149,MSP430F1491–60KB +256Bytes of Flash Memory,2KB of RAM 1.2Applications•Sensor Systems •Industrial Controls•Hand-Held Meters1.3DescriptionThe Texas Instruments MSP430™family of ultra-low-power microcontrollers (MCUs)consist of several devices featuring different sets of peripherals targeted for various applications.The architecture,combined with five low-power modes is optimized to achieve extended battery life in portable measurement applications.The device features a powerful 16-bit RISC CPU,16-bit registers,and constant generators that attribute to maximum code efficiency.The digitally controlled oscillator (DCO)allows wake-up from low-power modes to active mode in less than 6µs.The MSP430F13x,MSP430F14x,and MSP430F14x1MCUs support two built-in 16-bit timers,a fast 12-bit ADC on the MSP430F13x and the MSP430F14x devices,one USART on the MSP430F13x devices or two USARTs on the MSP430F14x and MSP430F14x1devices,and 48I/O pins.The hardware multiplier enhances the performance and offers a broad code and hardware-compatible family solution.For complete module descriptions,see the MSP430x1xx Family User’s Guide .XT2IN XT2OUTTMS TCK TDI/TCLK TDO/TDIRST/NMIR 2MSP430F149,MSP430F148,MSP430F147MSP430F1491,MSP430F1481,MSP430F1471MSP430F135,MSP430F133SLAS272H –JULY 2000–REVISED MAY 2018Device Overview Copyright ©2000–2018,Texas Instruments Incorporated(1)For the most current device,package,and ordering information,see the Package Option Addendum in Section 8,or see the TI website at .(2)The sizes shown here are approximations.For the package dimensions with tolerances,see the Mechanical Data in Section 8.Device Information (1)PART NUMBERPACKAGE BODY SIZE (2)MSP430F149IPM LQFP (64)10mm ×10mm MSP430F149IPAG TQFP (64)10mm ×10mm MSP430F1491IRTD VQFN (64)9mm ×9mm1.4Functional Block DiagramsFigure 1-1shows the functional block diagram for the MSP430F13x MCUs.Figure 1-1.Functional Block Diagram,MSP430F13xXT2OUTTMS TCK TDI/TCLK TDO/TDIRST/NMIRR 3MSP430F149,MSP430F148,MSP430F147MSP430F1491,MSP430F1481,MSP430F1471MSP430F135,MSP430F133SLAS272H –JULY 2000–REVISED MAY 2018Device Overview Copyright ©2000–2018,Texas Instruments Incorporated Figure 1-2.Functional Block Diagram,MSP430F14xFigure 1-3shows the functional block diagram for the MSP430F14x1MCUs.Figure 1-3.Functional Block Diagram,MSP430F14x14MSP430F149,MSP430F148,MSP430F147MSP430F1491,MSP430F1481,MSP430F1471MSP430F135,MSP430F133SLAS272H –JULY 2000–REVISED MAY 2018Table of Contents Copyright ©2000–2018,Texas Instruments IncorporatedTable of Contents1Device Overview (1)1.1Features ..............................................11.2Applications ...........................................11.3Description ............................................11.4Functional Block Diagrams (2)2Revision History .........................................53Device Comparison . (6)3.1Related Products (6)4Terminal Configuration and Functions (7)4.1Pin Diagrams .........................................74.2Signal Descriptions (105)Specifications (16)5.1Absolute Maximum Ratings (16)5.2ESD Ratings........................................165.3Recommended Operating Conditions ...............165.4Supply Current Into AV CC and DV CC ExcludingExternal Current .....................................175.5Thermal Resistance Characteristics ................185.6Schmitt-Trigger Inputs –Ports P1,P2,P3,P4,P5,and P6...............................................185.7Standard Inputs –RST/NMI,JTAG (TCK,TMS,TDI/TCLK,TDO/TDI)...............................185.8Inputs –Px.y,TAx,TBx............................185.9Leakage Current ....................................195.10Outputs –Ports P1,P2,P3,P4,P5,and P6.......195.11Output Frequency ..................................195.12Typical Characteristics –Ports P1,P2,P3,P4,P5,and P6Outputs (20)5.13Wake-up Time From LPM3.........................215.14RAM .................................................215.15Comparator_A .......................................215.16Typical Characteristics –Comparator_A ............225.17PUC and POR ......................................235.18DCO Frequency .....................................245.19DCO When Using R OSC .............................255.20Crystal Oscillator,LFXT1...........................265.21Crystal Oscillator,XT2..............................265.22USART0,USART1..................................265.2312-Bit ADC,Power Supply and Input RangeConditions ...........................................275.2412-Bit ADC,External Reference ....................275.2512-Bit ADC,Built-In Reference . (28)5.2612-Bit ADC,Timing Parameters....................305.2712-Bit ADC,Linearity Parameters ...................305.2812-Bit ADC,Temperature Sensor and Built-In V MID315.29Flash Memory .......................................315.30JTAG Interface ......................................325.31JTAG Fuse.........................................326Detailed Description (33)6.1CPU .................................................336.2Instruction set .......................................346.3Operating Modes ....................................346.4Interrupt Vector Addresses ..........................356.5Bootloader (BSL)....................................356.6JTAG Fuse Check Mode ............................366.7Memory ..............................................366.8Peripherals ..........................................406.9Input/Output Diagrams (48)7Device and Documentation Support (59)7.1Getting Started and Next Steps .....................597.2Device Nomenclature ...............................597.3Tools and Software .................................617.4Documentation Support .............................627.5Related Links ........................................637.6Community Resources ..............................637.7Trademarks ..........................................637.8Electrostatic Discharge Caution .....................647.9Export Control Notice ...............................647.10Glossary .............................................648Mechanical,Packaging,and OrderableInformation (65)5MSP430F149,MSP430F148,MSP430F147MSP430F1491,MSP430F1481,MSP430F1471MSP430F135,MSP430F133SLAS272H –JULY 2000–REVISED MAY 2018Revision History Copyright ©2000–2018,Texas Instruments Incorporated 2Revision HistoryNOTE:Page numbers for previous revisions may differ from page numbers in the current version.Changes from February 12,2009to May 23,2018Page•Document format and organization changes throughout ........................................................................1•Added Section 1.2,Applications ....................................................................................................1•Added Section 3,Device Comparison ............................................................................................6•Added Section 5.2,ESD Ratings ..................................................................................................16•Removed note (2)with duplicate information from the f LFXT1parameter in Section 5.3,Recommended OperatingConditions ...........................................................................................................................16•Removed duplicate conditions "XTS =0,SELM =0or 1"from the second row of Test Conditions on the I (AM)parameter in Section 5.4,Supply Current Into AV CC and DV CC Excluding External Current ..............................17•Added Section 5.5,Thermal Resistance Characteristics ......................................................................18•Removed ADC12DIV from the equation in the TYP value of the t CONVERT parameter (because ADC12CLK isafter division)in Section 5.26,12-Bit ADC,Timing Parameters ..............................................................30•Changed all instances of bootstrap loader to bootloader throughout document ............................................35•Added Section 7,Device and Documentation Support (59)6MSP430F149,MSP430F148,MSP430F147MSP430F1491,MSP430F1481,MSP430F1471MSP430F135,MSP430F133SLAS272H –JULY 2000–REVISED MAY 2018Device Comparison Copyright ©2000–2018,Texas Instruments Incorporated(1)For the most current package and ordering information,see the Package Option Addendum in Section 8,or see the TI website at.(2)Package drawings,thermal data,and symbolization are available at .(3)Each number in the sequence represents an instantiation of Timer_A with its associated number of capture/compare registers and PWM output generators available.For example,a number sequence of 3,5would represent two instantiations of Timer_A,the first instantiation having 3and the second instantiation having 5capture/compare registers and PWM output generators,respectively.(4)Each number in the sequence represents an instantiation of Timer_B with its associated number of capture/compare registers and PWM output generators available.For example,a number sequence of 3,5would represent two instantiations of Timer_B,the first instantiation having 3and the second instantiation having 5capture/compare registers and PWM output generators,respectively.3Device ComparisonTable 3-1summarizes the features of the device variants in this data sheet.Table 3-1.Device Comparison (1)(2)Device Flash SRAM Timer_A (3)Timer_B (4)USART COMP_AADC12(Channels)I/Os Package MSP430F14960KB 2KB 372184864-pin PM 64-pin PAG 64-pin RTD MSP430F149160KB 2KB 372184864-pin PM 64-pin RTD MSP430F14848KB 2KB 372184864-pin PM 64-pin PAG 64-pin RTD MSP430F148148KB 2KB 372184864-pin PM 64-pin RTD MSP430F14732KB 1KB 372184864-pin PM 64-pin PAG 64-pin RTD MSP430F147132KB 1KB 372184864-pin PM 64-pin RTD MSP430F13516KB512bytes331184864-pin PM 64-pin PAG 64-pin RTD MSP430F1338KB 256bytes 331184864-pin PM 64-pin PAG 64-pin RTD3.1Related ProductsFor information about other devices in this family of products or related products,see the following links.TI 16-bit and 32-bit microcontrollers High-performance,low-power solutions to enable the autonomousfuture Products for MSP430ultra-low-power microcontrollersOne platform.One ecosystem.Endlesspossibilities.Products for other MSP430microcontrollers MCUs for metrology,monitoring,system control,andcommunications Companion Products for MSP430F149Review products that are frequently purchased or used with thisproduct.Reference Designs The TI Designs Reference Design Library is a robust reference design library thatspans analog,embedded processor,and connectivity.Created by TI experts to help you jump start your system design,all TI Designs include schematic or block diagrams,BOMs,and design files to speed your time to market.171819P5.4/MCLK P5.3P5.2P5.1P5.0P4.7/TBCLK P4.6P4.5P4.4P4.3P4.2/TB2P4.1/TB1P4.0/TB0P3.7P3.6P3.5/URXD0484746454443424140393837363534332012345678910111213141516DV CC P6.3/A3P6.4/A4P6.5/A5P6.6/A6P6.7/A7V REF+XIN XOUT Ve REF+V REF−/Ve REF−P1.0/TACLK P1.1/TA0P1.2/TA1P1.3/TA2P1.4/SMCLK21222324P 5.6/A C L K T D O /T D I 63626160596458A V P 6.2/A 2P 6.1/A 1P 6.0/A 0R S T /N M I T C K T M S P 2.6/A D C 12C L K P 2.7/T A 0P 3.0/S T E 0P 3.1/S I M O 0P 1.7/T A 2P 2.1/T A I N C L K P 2.2/C A O U T /T A 0P 2.3/C A 0/T A 1P 2.4/C A 1/T A 2P 2.5/R o s c 5655545725262728295352P 1.5/T A 0X T 2I N X T 2O U T 515049303132P 3.2/S O M I 0P 3.3/U C L K 0P 3.4/U T X D 0P 5.7/T B O U T HT D I /T C L K P 5.5/S M C L KA V D V P 1.6/T A 1P 2.0/A C L K C CS SS S7MSP430F149,MSP430F148,MSP430F147MSP430F1491,MSP430F1481,MSP430F1471MSP430F135,MSP430F133SLAS272H –JULY 2000–REVISED MAY 2018Terminal Configuration and Functions Copyright ©2000–2018,Texas Instruments Incorporated 4Terminal Configuration and Functions4.1Pin DiagramsFigure 4-1shows the pinout for the MSP430F133and MSP430F135MCUs in the 64-pin PM,PAG,and RTD packages.Figure 4-1.64-Pin PM,PAG,or RTD Package (Top View)for MSP430F133and MSP430F135171819P5.4/MCLK P5.3/UCLK1P5.2/SOMI1P5.1/SIMO1P5.0/STE1P4.7/TBCLK P4.6/TB6P4.5/TB5P4.4/TB4P4.3/TB3P4.2/TB2P4.1/TB1P4.0/TB0P3.7/URXD1P3.6/UTXD1P3.5/URXD0484746454443424140393837363534332012345678910111213141516DV CC P6.3/A3P6.4/A4P6.5/A5P6.6/A6P6.7/A7V REF+XIN XOUT Ve REF+V REF−/Ve REF−P1.0/TACLK P1.1/TA0P1.2/TA1P1.3/TA2P1.4/SMCLK21222324P 5.6/A C L K T D O /T D I 63626160596458A V P 6.2/A 2P 6.1/A 1P 6.0/A 0R S T /N M I T C K T M S P 2.6/A D C 12C L K P 2.7/T A 0P 3.0/S T E 0P 3.1/S I M O 0P 1.7/T A 2P 2.1/T A I N C L K P 2.2/C A O U T /T A 0P 2.3/C A 0/T A 1P 2.4/C A 1/T A 2P 2.5/R o s c 5655545725262728295352P 1.5/T A 0X T 2I N X T 2O U T 515049303132P 3.2/S O M I 0P 3.3/U C L K 0P 3.4/U T X D 0P 5.7/T B O U T HT D I /T C L K P 5.5/S M C L KA V D V P 1.6/T A 1P 2.0/A C L K C CS SS S8MSP430F149,MSP430F148,MSP430F147MSP430F1491,MSP430F1481,MSP430F1471MSP430F135,MSP430F133SLAS272H –JULY 2000–REVISED MAY 2018Terminal Configuration and FunctionsCopyright ©2000–2018,Texas Instruments IncorporatedFigure 4-2shows the pinout for the MSP430F147,MSP430F148,and MSP430F149MCUs in the 64-pin PM,PAG,and RTD packages.Figure 4-2.64-Pin PM,PAG,or RTD Package (Top View)for MSP430F147,MSP430F148,and MSP430F149171819P5.4/MCLK P5.3/UCLK1P5.2/SOMI1P5.1/SIMO1P5.0/STE1P4.7/TBCLK P4.6/TB6P4.5/TB5P4.4/TB4P4.3/TB3P4.2/TB2P4.1/TB1P4.0/TB0P3.7/URXD1P3.6/UTXD1P3.5/URXD0484746454443424140393837363534332012345678910111213141516DV CC P6.3P6.4P6.5P6.6P6.7ReservedXIN XOUT DV SS DV SSP1.0/TACLK P1.1/TA0P1.2/TA1P1.3/TA2P1.4/SMCLK21222324P 5.6/A C L K T D O /T D I 63626160596458A V P 6.2P 6.1P 6.0R S T /N M I T C K T M S P 2.6P 2.7/T A 0P 3.0/S T E 0P 3.1/S I M O 0P 1.7/T A 2P 2.1/T A I N C L K P 2.2/C A O U T /T A 0P 2.3/C A 0/T A 1P 2.4/C A 1/T A 2P 2.5/R o s c 5655545725262728295352P 1.5/T A 0X T 2I N X T 2O U T 515049303132P 3.2/S O M I 0P 3.3/U C L K 0P 3.4/U T X D 0P 5.7/T B O U T HT D I /T C L K P 5.5/S M C L KA V D V P 1.6/T A 1P 2.0/A C L K C CS SS S9MSP430F149,MSP430F148,MSP430F147MSP430F1491,MSP430F1481,MSP430F1471MSP430F135,MSP430F133SLAS272H –JULY 2000–REVISED MAY 2018Terminal Configuration and Functions Copyright ©2000–2018,Texas Instruments Incorporated Figure 4-3shows the pinout for the MSP430F1471,MSP430F1481,and MSP430F1491MCUs in the 64-pin PM and RTD packages.Figure 4-3.64-Pin PM or RTD Package (Top View)for MSP430F1471,MSP430F1481,and MSP430F149110MSP430F149,MSP430F148,MSP430F147MSP430F1491,MSP430F1481,MSP430F1471MSP430F135,MSP430F133SLAS272H –JULY 2000–REVISED MAY 2018Terminal Configuration and FunctionsCopyright ©2000–2018,Texas Instruments Incorporated4.2Signal DescriptionsTable 4-1describes the signals for the MSP430F13x and MSP430F14x MCUs.See Table 4-2for the MSP430F14x1signal descriptions.Table 4-1.Signal Descriptions for MSP430F13x and MSP430F14xSIGNAL NAME PIN NO.I/O DESCRIPTIONAV CC 64Analog supply voltage,positive terminal.Supplies the analog portion of the ADC.AV SS 62Analog supply voltage,negative terminal.Supplies the analog portion of the ADC.DV CC 1Digital supply voltage,positive terminal.Supplies all digital parts.DV SS63Digital supply voltage,negative terminal.Supplies all digital parts.P1.0/TACLK 12I/O General-purpose digital I/O pin Timer_A,clock signal TACLK inputP1.1/TA013I/OGeneral-purpose digital I/O pinTimer_A,capture:CCI0A input,compare:Out0output BSL transmitP1.2/TA114I/O General-purpose digital I/O pinTimer_A,capture:CCI0A input,compare:Out0output BSL transmitP1.3/TA215I/O General-purpose digital I/O pinTimer_A,capture:CCI2A input,compare:Out2output P1.4/SMCLK 16I/O General-purpose digital I/O pin SMCLK signal outputP1.5/TA017I/O General-purpose digital I/O pin Timer_A,compare:Out0output P1.6/TA118I/O General-purpose digital I/O pin Timer_A,compare:Out1output P1.7/TA219I/O General-purpose digital I/O pin Timer_A,compare:Out2output/P2.0/ACLK 20I/O General-purpose digital I/O pin ACLK outputP2.1/TAINCLK21I/OGeneral-purpose digital I/O pin Timer_A,clock signal at INCLK P2.2/CAOUT/TA022I/OGeneral-purpose digital I/O pin Comparator_A outputTimer_A,capture:CCI0B input BSL receiveP2.3/CA0/TA123I/OGeneral-purpose digital I/O pin Timer_A,compare:Out1output Comparator_A inputP2.4/CA1/TA224I/O General-purpose digital I/O pin Timer_A,compare:Out2output Comparator_A inputP2.5/R OSC 25I/O General-purpose digital I/O pininput for external resistor defining the DCO nominal frequency P2.6/ADC12CLK 26I/O General-purpose digital I/O pin Conversion clock for ADC P2.7/TA027I/O General-purpose digital I/O pin Timer_A,compare:Out0outputP3.0/STE028I/O General-purpose digital I/O pinSlave transmit enable for USART0in SPI mode P3.1/SIMO029I/O General-purpose digital I/O pinSlave in/master out of USART0in SPI mode P3.2/SOMI030I/O General-purpose digital I/O pinSlave out/master in of USART0in SPI modeP3.3/UCLK031I/O General-purpose digital I/OUSART0clock:external input in UART or SPI mode,output in SPI mode P3.4/UTXD032I/OGeneral-purpose digital I/O pinTransmit data out for USART0in UART mode11MSP430F149,MSP430F148,MSP430F147MSP430F1491,MSP430F1481,MSP430F1471MSP430F135,MSP430F133SLAS272H –JULY 2000–REVISED MAY 2018Terminal Configuration and Functions Copyright ©2000–2018,Texas Instruments IncorporatedTable 4-1.Signal Descriptions for MSP430F13x and MSP430F14x (continued)SIGNAL NAMEPIN NO.I/O DESCRIPTION (1)MSP430F14x devices onlyP3.5/URXD033I/O General-purpose digital I/O pin Receive data in for USART0in UART mode P3.6/UTXD1(1)34I/O General-purpose digital I/O pin Transmit data out for USART1in UART mode P3.7/URXD1(1)35I/O General-purpose digital I/O pin Receive data in for USART1in UART mode P4.0/TB0.36I/O General-purpose digital I/O pin Timer_B,capture:CCI0A or CCI0B input,compare:Out0output P4.1/TB137I/O General-purpose digital I/O pin Timer_B,capture:CCI1A or CCI1B input,compare:Out1output P4.2/TB238I/O General-purpose digital I/O pin Timer_B,capture:CCI2A or CCI2B input,compare:Out2output P4.3/TB3(1)39I/O General-purpose digital I/O pin Timer_B,capture:CCI3A or CCI3B input,compare:Out3output P4.4/TB4(1)40I/O General-purpose digital I/O pin Timer_B,capture:CCI4A or CCI4B input,compare:Out4output P4.5/TB5(1)41I/O General-purpose digital I/O pin Timer_B,capture:CCI5A or CCI5B input,compare:Out5output P4.6/TB6(1)42I/O General-purpose digital I/O pin Timer_B,capture:CCI6A or CCI6B input,compare:Out6output P4.7/TBCLK43I/O General-purpose digital I/O pin Timer_B,clock signal TBCLK input P5.0/STE1(1)44I/O General-purpose digital I/O pin Slave transmit enable for USART1in SPI mode P5.1/SIMO1(1)45I/O General-purpose digital I/O pin Slave in/master out of USART1in SPI mode P5.2/SOMI1(1)46I/O General-purpose digital I/O pin Slave out/master in of USART1in SPI mode P5.3/UCLK1(1)47I/O General-purpose digital I/O pin USART1clock:external input in UART or SPI mode,output in SPI mode P5.4/MCLK48I/O General-purpose digital I/O pin Main system clock MCLK output P5.5/SMCLK49I/O General-purpose digital I/O pin Submain system clock SMCLK output P5.6/ACLK50I/O General-purpose digital I/O pin Auxiliary clock ACLK output P5.7/TBOUTH51I/O General-purpose digital I/O pin Switch all PWM digital output ports to high impedance for Timer_B7(TB0to TB6)P6.0/A059I/O General-purpose digital I/O pin Analog input A0for ADC P6.1/A160I/O General-purpose digital I/O pin Analog input A1for ADC P6.2/A261I/O General-purpose digital I/O pin Analog input A2for ADC P6.3/A32I/O General-purpose digital I/O pin Analog input A3for ADC P6.4/A43I/O General-purpose digital I/O pin Analog input A4for ADC P6.5/A54I/O General-purpose digital I/O pin Analog input A5for ADC P6.6/A65I/O General-purpose digital I/O pin Analog input A6for ADC P6.7/A76I/O General-purpose digital I/O pinAnalog input A7for ADC12MSP430F149,MSP430F148,MSP430F147MSP430F1491,MSP430F1481,MSP430F1471MSP430F135,MSP430F133SLAS272H –JULY 2000–REVISED MAY 2018Terminal Configuration and Functions Copyright ©2000–2018,Texas Instruments IncorporatedTable 4-1.Signal Descriptions for MSP430F13x and MSP430F14x (continued)SIGNAL NAMEPIN NO.I/O DESCRIPTION RST/NMI58I Reset input Nonmaskable interrupt input port Bootloader start TCK57I Test clock,the clock input port for device programming test and bootloader start TDI/TCLK55I Test data input or test clock input.The device protection fuse is connected to TDI/TCLK.TDO/TDI54I/O Test data output or programming data input TMS56I Test mode select,used as an input port for device programming and test VeREF+10I Input for an external reference voltage to the ADC VREF+7O Output of positive terminal of the reference voltage in the ADC VREF −/VeREF −11I Negative terminal for the ADC reference voltage for both sources,the internal reference voltage or an external applied reference voltage XIN8I Input port for crystal oscillator XT1,standard or watch crystals can be connected XOUT9O Output terminal of crystal oscillator XT1XT2IN53I Input port for crystal oscillator XT2,only standard crystals can be connected XT2OUT52O Output terminal of crystal oscillator XT2QFN Pad NA NA QFN package pad,connect to DV SS13MSP430F149,MSP430F148,MSP430F147MSP430F1491,MSP430F1481,MSP430F1471MSP430F135,MSP430F133SLAS272H –JULY 2000–REVISED MAY 2018Terminal Configuration and Functions Copyright ©2000–2018,Texas Instruments Incorporated Table 4-2describes the signals for the MSP430F14x1MCUs.See Table 4-1for the MSP430F13x and MSP430F14x signal descriptions.Table 4-2.Signal Descriptions for MSP430F14x1SIGNAL NAMEPIN NO.I/O DESCRIPTION AV CC64Analog supply voltage positive terminal AV SS62Analog supply voltage negative terminal DV CC1Digital supply voltage,positive terminal.Supplies all digital parts.DV SS63Digital supply voltage,negative terminal.Supplies all digital parts.P1.0/TACLK12I/O General-purpose digital I/O pin Timer_A,clock signal TACLK input P1.1/TA013I/O General-purpose digital I/O pin Timer_A,capture:CCI0A input,compare:Out0output BSL transmit P1.2/TA114I/O General-purpose digital I/O pin Timer_A,capture:CCI1A input,compare:Out1output P1.3/TA215I/O General-purpose digital I/O pin Timer_A,capture:CCI2A input,compare:Out2output P1.4/SMCLK16I/O General-purpose digital I/O pin SMCLK signal output P1.5/TA017I/O General-purpose digital I/O pin Timer_A,compare:Out0output P1.6/TA118I/O General-purpose digital I/O pin Timer_A,compare:Out1output P1.7/TA219I/O General-purpose digital I/O pin Timer_A,compare:Out2output P2.0/ACLK20I/O General-purpose digital I/O pin ACLK output P2.1/TAINCLK 21I/O General-purpose digital I/O pinTimer_A,clock signal at INCLKP2.2/CAOUT/TA022I/O General-purpose digital I/O pinTimer_A,capture:CCI0B inputComparator_A outputBSL receiveP2.3/CA0/TA123I/O General-purpose digital I/O pinTimer_A,compare:Out1outputComparator_A inputP2.4/CA1/TA224I/O General-purpose digital I/O pinTimer_A,compare:Out2outputComparator_A inputP2.5/R OSC 25I/O General-purpose digital I/O pinInput for external resistor defining the DCO nominal frequencyP2.626I/O General-purpose digital I/O pinP2.7/TA027I/O General-purpose digital I/O pinTimer_A,compare:Out0outputP3.0/STE028I/O General-purpose digital I/O pinSlave transmit enable for USART0in SPI modeP3.1/SIMO029I/O General-purpose digital I/O pinSlave in/master out of USART0in SPI modeP3.2/SOMI030I/O General-purpose digital I/O pinSlave out/master in of USART0in SPI modeP3.3/UCLK031I/O General-purpose digital I/OUSART0clock:external input in UART or SPI mode,output in SPI modeP3.4/UTXD032I/O General-purpose digital I/O pinTransmit data out for USART0in UART modeP3.5/URXD033I/OGeneral-purpose digital I/O pinReceive data in for USART0in UART mode14MSP430F149,MSP430F148,MSP430F147MSP430F1491,MSP430F1481,MSP430F1471MSP430F135,MSP430F133SLAS272H –JULY 2000–REVISED MAY 2018Terminal Configuration and FunctionsCopyright ©2000–2018,Texas Instruments Incorporated Table 4-2.Signal Descriptions for MSP430F14x1(continued)SIGNAL NAMEPIN NO.I/O DESCRIPTION P3.6/UTXD134I/O General-purpose digital I/O pin Transmit data out for USART1in UART mode P3.7/URXD135I/O General-purpose digital I/O pin Receive data in for USART1in UART mode P4.0/TB0.36I/O General-purpose digital I/O pin Timer_B,capture:CCI0A or CCI0B input,compare:Out0output P4.1/TB137I/O General-purpose digital I/O pin Timer_B,capture:CCI1A or CCI1B input,compare:Out1output P4.2/TB238I/O General-purpose digital I/O pin Timer_B,capture:CCI2A or CCI2B input,compare:Out2output P4.3/TB339I/O General-purpose digital I/O pin Timer_B,capture:CCI3A or CCI3B input,compare:Out3output P4.4/TB440I/O General-purpose digital I/O pin Timer_B,capture:CCI4A or CCI4B input,compare:Out4output P4.5/TB541I/O General-purpose digital I/O pin Timer_B,capture:CCI5A or CCI5B input,compare:Out5output P4.6/TB642I/O General-purpose digital I/O pin Timer_B,capture:CCI6A or CCI6B input,compare:Out6output P4.7/TBCLK43I/O General-purpose digital I/O pin Timer_B,clock signal TBCLK input P5.0/STE144I/O General-purpose digital I/O pin Slave transmit enable for USART1in SPI mode P5.1/SIMO145I/O General-purpose digital I/O pin Slave in/master out of USART1in SPI mode P5.2/SOMI146I/O General-purpose digital I/O pin Slave out/master in of USART1in SPI mode P5.3/UCLK147I/O General-purpose digital I/O pin USART1clock:external input in UART or SPI mode,output in SPI mode P5.4/MCLK48I/O General-purpose digital I/O pin Main system clock MCLK output P5.5/SMCLK49I/O General-purpose digital I/O pin Submain system clock SMCLK output P5.6/ACLK50I/O General-purpose digital I/O pin Auxiliary clock ACLK output P5.7/TBOUTH51I/O General-purpose digital I/O pin Switch all PWM digital output ports to high impedance for Timer_B7(TB0to TB6)P6.059I/O General-purpose digital I/O pin P6.160I/O General-purpose digital I/O pin P6.261I/O General-purpose digital I/O pin P6.32I/O General-purpose digital I/O pin P6.43I/O General-purpose digital I/O pin P6.54I/O General-purpose digital I/O pin P6.65I/O General-purpose digital I/O pin P6.76I/O General-purpose digital I/O pin RST/NMI58I Reset input Nonmaskable interrupt input port Bootloader start TCK57I Test clock,the clock input port for device programming test and bootloader start TDI/TCLK55I Test data input or test clock input.The device protection fuse is connected to TDI/TCLK.TDO/TDI54I/O Test data output or programming data input TMS56I Test mode select,used as an input port for device programming and test DV SS10I Connect to DV SS Reserved7Reserved,do not connect externally。
智能风扇设计毕业设计

一、方案设计与论证 (3)1.1 整体方案比较和选择 (3)1.2 电源方案比较选择 (3)二、MSP430F149单片机介绍 (5)1. 简单概述 (5)2、MSP430F149主要特点 (5)3 、MSP430F149 芯片引脚功能介绍 (6)三、系统设计 (7)3.1 总体设计 (7)3.2 各单元模块功能介绍及电路设计; (7)3.2.1接收电路模块 (7)3.2.2 电风扇驱动隔离电路 (8)3.2.3键盘模块 (9)3.2.4电源模块 (9)3.2.5 液晶模块 (10)四、软件设计 (10)4.1 设计思路 (10)4.1.1 扫描键盘模块 (10)4.1.2 红外接收模块 (11)4.2 软件流程图 (11)4.3 软件代码 (12)五、系统测试 (19)5.1 测试方法 (19)六、谢辞 (20)七、附件 (21)7.1 MSP430开发板整体原理图 (21)7.3 实物图 (22)八、参考文献 (23)本设计以MSP430F149单片机为核心控制模块,通过主从单片机之间的串行通信来完成电风扇转速数据处理、模式控制和转速控制等,采用PWM脉冲调制技术来控制风扇的转速,用键盘和LCD12864液晶显示来实现人机交互。
该系统有电风扇的无级调速,并可以对电风扇的转速进行设置和转速的实时测试与显示、具有睡眠风、自然风等多种工作模式可以选择、能显示风扇转速、运行模式等等信息和实现定时自动开、关机等功能,系统结构简单,步进小、精度高等优点。
关键词:单片机红外遥控智能控制风扇一、方案设计与论证1.1 整体方案比较和选择根据题目要求,智能电风扇需要◆温度智控功能:风扇可以调节风扇的转速,达到更好的工作效果。
用户可以选择手动设定方式来控制转速。
◆多级调速功能:提供更多的风力级别和风型,提高用户的舒适度。
◆定时工作功能:该定时功能可以让用户自己定制风扇工作时间的长短,以提供更人性化的服务。
◆液晶显示功能:使用液晶屏显示风扇的转速,风扇的工作模式。
推荐-MSP430F149电子秤设计附电路图1 精品

基于MSP430F149电子秤设计附录1 电路原理图附录2 程序/***********************************************************程序功能:在12864液晶上显示重量---------------------------------------------------------------------------------------------------------------测试说明:观察液晶显示***********************************************************/#include <msp430x14x.h>typedef unsigned char uchar;typedef unsigned int uint;extern const unsigned char shuzi_table[];float e;/***************全局变量***************/uchar key_Pressed; //按键是否被按下:1--是,0--否uchar key_val; //存放键值uchar key_Flag; //按键是否已放开:1--是,0--否/*设置键盘逻辑键值与程序计算键值的映射*/uchar key_Map[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};#define LCD_DataIn P4DIR=0x00 //数据口方向设置为输入#define LCD_DataOut P4DIR=0xff //数据口方向设置为输出#define LCD2MCU_Data P4IN#define MCU2LCD_Data P4OUT#define LCD_CMDOut P3DIR|=0x07 //P3口的低三位设置为输出#define LCD_RS_H P3OUT|=BIT0 //P3.0#define LCD_RS_L P3OUT&=~BIT0 //P3.0#define LCD_RW_H P3OUT|=BIT1 //P3.1#define LCD_RW_L P3OUT&=~BIT1 //P3.1#define LCD_EN_H P3OUT|=BIT2 //P3.2#define LCD_EN_L P3OUT&=~BIT2 //P3.2/*******************************************写入内容待显示内容********************************************/const uchar hang1[] = {"小小苏电子称系统"};const uchar hang2[] = {"净重: g "};const uchar hang3[] = {"总价: 元"};const uchar hang4[] = {"单价/Kg"};const uchar hang5[] = {"萝卜"};const uchar hang6[] = {"豆角"};const uchar hang7[] = {"土豆"};const uchar hang8[] = {"白菜"};const uchar hang9[] = {"苹果"};const uchar hang10[] = {"香蕉"};const uchar hang11[] = {"橘子"};const uchar hang12[] = {"桃子"};const uchar hang13[] = {"猪肉"};const uchar hang14[] = {"羊肉"};const uchar hang15[] = {"牛肉"};const uchar hang16[] = {"鸡肉"};const uchar hang17[] = {"山药"};const uchar hang18[] = {"生姜"};const uchar hang19[] = {"木耳"};/*******************************************函数名称:Init_Keypad功能:初始化扫描键盘的IO端口参数:无返回值:无********************************************/void Init_Keypad(void){P1DIR = 0xf0; //P1.0~P1.3设置为输入状态, P1.4~P1.7设置为输出状态P1OUT |= 0xf0; // P1.4~P1.7输出低电平key_Flag = 0;key_Pressed = 0;key_val = 5;}/*******************************************函数名称:Check_Key功能:扫描键盘的IO端口,获得键值参数:无返回值:无********************************************/void Check_Key(void){uchar row ,col,tmp1,tmp2;tmp1 = 0x80;for(row = 0;row < 4;row++) //行扫描{P1OUT = 0xf0; //P1.4~P1.7输出全0P1OUT -= tmp1; //P1.4~p1.7输出四位中有一个为0tmp1 >>=1;if ((P1IN & 0x0f) < 0x0f) //是否P1IN的P1.0~P1.3中有一位为0{ tmp2 = 0x01; // tmp2用于检测出那一位为0for(col = 0;col < 4;col++) // 列检测{ if((P1IN & tmp2) == 0x00) // 是否是该列,等于0为是{ key_val = key_Map[row * 4 + col]; // 获取键值return; // 退出循环}tmp2 <<= 1; // tmp2右移1位}}}//return (key_val);}/*******************************************函数名称:delay功能:延时约15ms,完成消抖功能参数:无返回值:无********************************************/void delay(){uint tmp;for(tmp = 12000;tmp > 0;tmp--);}/*******************************************函数名称:Key_Event功能:检测按键,并获取键值参数:无返回值:无********************************************/void Key_Event(void){uchar tmp;P1OUT &= 0x00; // 设置P1高四位全为0,等待按键输入tmp = P1IN; // 获取p1INif ((key_Pressed == 0x00)&&((tmp & 0x0f) < 0x0f)) //如果有键按下{key_Pressed = 1; // 如果有按键按下,设置key_Pressed标识delay(); //消除抖动Check_Key(); // 调用check_Key(),获取键值}else if((key_Pressed == 1)&&((tmp & 0x0f) == 0x0f)) //如果按键已经释放{key_Pressed = 0; // 清除key_Pressed标识key_Flag = 1; // 设置key_Flag标识}else{_NOP();}}/*******************************************函数名称:Delay_1ms功能:延时约1ms的时间参数:无返回值:无********************************************/void Delay_1ms(void){uchar i;for(i = 150;i > 0;i--) _NOP();}/******************************************* 函数名称:Delay_Nms功能:延时N个1ms的时间参数:n--延时长度返回值:无********************************************/ void Delay_Nms(uint n){uint i;for(i = n;i > 0;i--) Delay_1ms();}/******************************************* 函数名称:Write_Cmd功能:向液晶中写控制命令参数:cmd--控制命令返回值:无********************************************/ void Write_Cmd(uchar cmd){uchar lcdtemp = 0;LCD_RS_L;LCD_RW_H;LCD_DataIn;do //判忙{ LCD_EN_H;_NOP();lcdtemp = LCD2MCU_Data;LCD_EN_L;}while(lcdtemp & 0x80);LCD_DataOut;LCD_RW_L;MCU2LCD_Data = cmd;LCD_EN_H;_NOP();LCD_EN_L;}/******************************************* 函数名称:Write_Data功能:向液晶中写显示数据参数:dat--显示数据返回值:无********************************************/ void Write_Data(uchar dat){uchar lcdtemp = 0;LCD_RS_L;LCD_RW_H;LCD_DataIn;do //判忙{LCD_EN_H;_NOP();lcdtemp = LCD2MCU_Data;LCD_EN_L;}while(lcdtemp & 0x80);LCD_DataOut;LCD_RS_H;LCD_RW_L;MCU2LCD_Data = dat;LCD_EN_H;_NOP();LCD_EN_L;}/******************************************* 函数名称:Ini_Lcd功能:初始化液晶模块参数:无返回值:无********************************************/ void Ini_Lcd(void){LCD_CMDOut; //液晶控制端口设置为输出Delay_Nms(500);Write_Cmd(0x30); //基本指令集Delay_1ms();Write_Cmd(0x02); // 地址归位Delay_1ms();Write_Cmd(0x0c); //整体显示打开,游标关闭Delay_1ms();Write_Cmd(0x01); //清除显示Delay_1ms();Write_Cmd(0x06); //游标右移Delay_1ms();Write_Cmd(0x80); //设定显示的起始地址}/******************************************* 函数名称:Disp_HZ功能:控制液晶显示汉字参数:addr--显示位置的首地址pt--指向显示数据的指针num--显示字符个数返回值:无********************************************/ void Disp_HZ(uchar addr,const uchar * pt,uchar num) {uchar i;Write_Cmd(addr);for(i = 0;i < num;i++)Write_Data(*(pt++));}/******************************************* 函数名称:Disp_WEI功能:控制液晶显示汉字参数:addr--显示位置的首地址pt--指向显示数据的指针num--显示字符个数返回值:无********************************************/ void Disp_WEI(uchar addr,int c,char num){uchar i;Write_Cmd(addr);for(i = 0;i < num;i++)Write_Data(c);}/***************************主函数*************************/void main( void ){ /*下面六行程序关闭所有的IO口*/P1DIR = 0XFF;P1OUT = 0XFF;P2DIR = 0XFF;P2OUT = 0XFF;P3DIR = 0XFF;P3OUT = 0XFF;P4DIR = 0XFF;P4OUT = 0XFF;P5DIR = 0XFF;P5OUT = 0XFF;P6DIR = 0XFF;P6OUT = 0XFF;WDTCTL = WDTPW + WDTHOLD; //关狗P6DIR |= BIT2;P6OUT |= BIT2; //关闭电平转换Ini_Lcd(); //初始化液晶ADC12CTL0=SHT0_2+ADC12ON; //设置采样时间+ADC12内核开ADC12CTL1=SHP; //使用采样定时器ADC12IE=0X01; //开启中断ADC12CTL0 |=ENC; //转换使能P6SEL |=0X01;Disp_HZ(0x80,hang1,16);Disp_HZ(0x90,hang2,16);Disp_HZ(0x88,hang3,16);Disp_HZ(0x98,hang4,16);Init_Keypad();_EINT();while(1){ADC12CTL0 |=ADC12SC; //启动转换//while ((ADC12IFG & 0x01)==0);_NOP();Key_Event();if(key_Flag==1){key_Flag=0;switch(key_val){case 0:P2OUT=0XFE;Disp_HZ(0x9a,hang5,4);Write_Cmd(0x9c);Write_Data(0+0x30);Write_Data(2+0x30);Write_Data(0x2e);Write_Data(3+0x30);e=2.3; break;case 1:P2OUT=0XFD;Disp_HZ(0x9a,hang6,4);Write_Cmd(0x9c);Write_Data(0+0x30);Write_Data(6+0x30);Write_Data(0x2e);Write_Data(9+0x30);e=6.9;break;case 2:P2OUT=0XFB;Disp_HZ(0x9a,hang7,4);Write_Cmd(0x9c);Write_Data(0+0x30);Write_Data(2+0x30);Write_Data(0x2e);Write_Data(0+0x30);e=2.0;break;case 3:P2OUT=0XF7;Disp_HZ(0x9a,hang8,4);Write_Cmd(0x9c);Write_Data(0+0x30);Write_Data(1+0x30);Write_Data(0x2e);Write_Data(5+0x30);e=1.5;break;case 4:P2OUT=0XEF;Disp_HZ(0x9a,hang9,4);Write_Cmd(0x9c);Write_Data(1+0x30);Write_Data(4+0x30);Write_Data(0x2e);Write_Data(0+0x30);e=14.0;break;case 5:P2OUT=0XDF;Disp_HZ(0x9a,hang10,4);Write_Cmd(0x9c);Write_Data(0+0x30);Write_Data(9+0x30);Write_Data(0x2e);Write_Data(0+0x30);e=9.0;break;case 6:P2OUT=0XBF;Disp_HZ(0x9a,hang11,4);Write_Cmd(0x9c);Write_Data(0+0x30);Write_Data(6+0x30); Write_Data(0x2e);Write_Data(0+0x30);e=6.0;break;case 7:P2OUT=0X7F;Disp_HZ(0x9a,hang12,4);Write_Cmd(0x9c);Write_Data(2+0x30);Write_Data(0+0x30); Write_Data(0x2e);Write_Data(0+0x30);e=20.0;break;case 8:P2OUT =~0XFE;Disp_HZ(0x9a,hang13,4);Write_Cmd(0x9c);Write_Data(3+0x30);Write_Data(5+0x30); Write_Data(0x2e);Write_Data(0+0x30);e=30.0;break;case 9:P2OUT =~0XFD;Disp_HZ(0x9a,hang14,4);Write_Cmd(0x9c);Write_Data(8+0x30);Write_Data(0+0x30); Write_Data(0x2e);Write_Data(0+0x30);e=80.0;break;case 10:P2OUT =~0XFB;Disp_HZ(0x9a,hang15,4);Write_Cmd(0x9c);Write_Data(7+0x30);Write_Data(0+0x30); Write_Data(0x2e);Write_Data(0+0x30);e=70.0;break;case 11:P2OUT =~0XF7;Disp_HZ(0x9a,hang16,4);Write_Cmd(0x9c);Write_Data(1+0x30);Write_Data(5+0x30); Write_Data(0x2e);Write_Data(0+0x30);e=15.0;break;case 12:P2OUT =~0XEF;Disp_HZ(0x9a,hang17,4);Write_Cmd(0x9c);Write_Data(0+0x30);Write_Data(3+0x30); Write_Data(0x2e);Write_Data(5+0x30);e=3.5;break;case 13:P2OUT =~0XDF;Disp_HZ(0x9a,hang18,4);Write_Cmd(0x9c);Write_Data(0+0x30);Write_Data(4+0x30);Write_Data(0x2e);Write_Data(5+0x30);e=4.5;break;case 14:P2OUT =~0XBF;Disp_HZ(0x9a,hang19,4);Write_Cmd(0x9c);Write_Data(4+0x30);Write_Data(0+0x30);Write_Data(0x2e);Write_Data(5+0x30);e=40.0;break;case 15:P2OUT =~0X7F;//Disp_HZ(0x9a,hang21,4);Write_Cmd(0x9a);Write_Data(0x20);Write_Data(0x20);Write_Data(0x20);Write_Data(0x20);Write_Data(0+0x30);Write_Data(0+0x30);Write_Data(0x2e);Write_Data(0+0x30);e=0;break;default:break ;}}}}#pragma vector=ADC_VECTOR__interrupt void ADC12_ISR(void){ int a,b,c,d,temp;long int g,y;temp=ADC12MEM0;temp=temp/100;g=121*temp;y=g*e;if(g>400){a=g/1000;b=g%1000/100;c=g%1000%100/10;d=g%1000%100%10;}else{a=b=c=d=0;y=0;}Write_Cmd(0x93);Write_Data(a+0x30);Write_Data(b+0x30);Write_Data(c+0x30);Write_Data(d+0x30);Delay_Nms(200);Write_Cmd(0x8b);Write_Data(y/100000+0x30);Write_Data(y%100000/10000+0x30);Write_Data(y%100000%10000/1000+0x30);Write_Data(0x2e);Write_Data(y%100000%10000%1000/100+0x30);Write_Data(y%100000%10000%1000%100/10+0x30);_BIC_SR_IRQ(CPUOFF);}。
无刷电机MSP430的控制设计电路

无刷电机MSP430的控制设计电路MSP430概述MSP430是德州公司新开发的一类具有16位总线的带HLASH 的单片机,由于其性价比和集成度高,受到广大技术开发人员的青睐。
它采用16位的总线,外设和内存统一编址,寻址范围可达64K,还可以外扩展存储器。
具有统一的中断管理,具有丰富的片上外围模块,片内有精密硬件乘法器、两个16位定时器、一个14路的12位的模数转换器、一个看门狗、6路P口、两路USART 通信端口、一个比较器、一个DCO内部振荡器和两个外部时钟,支持8M的时钟。
由于为HLASH型,则可以在线对单片机进行调试和下载,且JTAG口直接和FET(FLASHEMULATIONTOOL)的相连,不须另外的仿真工具,方便实用,而且,可以在超低功耗模式下工作,对环境和人体的辐射小测量结果为100mw左右的功耗(电流为14mA左右),可靠性能好,加强电干扰运行不受影响,适应工业级的运行环境ll,适合与做手柄之类的自动控制的设备.MSP430系列单片机的主要优点就是低功耗,所以在选择MSP430系列单片机设计系统时,除了要考虑外围电路的低功耗以外,还要根据系统要求选择合适的MSP430单片机,但是我们原则是够用就可以,不提倡资源的浪费。
MSP430F149特性①低电压、超低功耗。
工作电压3.6V~1.8V ,正常工作模式280μA@1MHz,2.2V,待机模式1.6μA,RAM数据保存的掉电模式下0.1μA。
五级节电模式。
②快速苏醒,从待机模式下恢复工作,只需要不到6μS时间。
③16位精简指令集MCU,命令周期125nS。
④12位ADC,具有内部参考电压源,并且具有采样、保持、自动扫描等功能。
具有12位的模数转换器可以得到很高的精度,并且省去了使用专门的模数转换器给设计电路板带来的麻烦。
⑤2个16位计数器。
具有捕获、门限功能。
⑥具有片内比较器。
⑦支持ISP(在线系统编程),方便开发和项目升级。
⑧支持序列号,熔丝位烧写。
MSP430F149开发板简介

开发板简介
实物图:
特点:
1、USB接口,支持USB供电、USB下载、USB通信(和PC机通信)外接供电,跑马灯;
2、可以通过USB接口和PC机做串口通信实验;
3、八个LED流水灯,方便程序的调试;
4、所有引脚由双排排针引出,并有引脚标注,2.54mm标准间距,扩展方便;
5、带有NRF905无线模块接口,可做无线数传实验;
6、板上留有标准14针JTAG仿真调试接口和复位按键;
7、板上预留三路3.3V和5V的取电接口,方便为外围设备供电;
8、板上可外接电源从电,也可以USB取电;
9、板上配有四个铜柱,增强电路板的耐用性和可靠性;
10、带有最小系统板,方便更换芯片;
11,1602液晶接口;
12,12864液晶接口;
13,DS18B20接口;
14,红外接收头,一体化接收头;
15,485模块,可做485通实实验;
16,RS232模块,可做RS232通信;
17,无线模块接口,可做CC1100,NRF24L01,NRF905无线通信;18,板载8M晶振,可以插拨,可以随意更换晶振;
19,板载AD模块,可做AD模数转换实验;
引脚图:。
msp430f149技术资料

MSP430是德州公司新开发的一类具有16位总线的带FLASH的单片机,由于其性价比和集成度高,受到广大技术开发人员的青睐.它采用16位的总线,外设和内存统一编址,寻址范围可达64K,还可以外扩展存储器。
具有统一的中断管理,具有丰富的片上外围模块,片内有精密硬件乘法器、两个16位定时器、一个14路的12位的模数转换器、一个看门狗、6路P口、两路USART通信端口、一个比较器、一个DCO内部振荡器和两个外部时钟,支持8M的时钟。
由于为FLASH型,则可以在线对单片机进行调试和下载,且JTAG口直接和FET(FLASH EMULATION TOOL)的相连,不须另外的仿真工具,方便实用,而且,可以在超低功耗模式下工作,对环境和人体的辐射小,测量结果为100mw左右的功耗(电流为14mA左右),可靠性能好,加强电干扰运行不受影响,适应工业级的运行环境,适合与做手柄之类的自动控制的设备.我们相信MSP430单片机将会在工程技术应用中得以广泛应用,而且,它是通向DSP系列的桥梁,随着自动控制的高速化和低功耗化,MSP430系列将会得到越来越多人的喜爱。
第三章MSP430F149 资源的应用介绍及开发第一节中断介绍及存储器段介绍中断在MSP430中得以广泛的应用,它可以快速进入中断程序,之后返回中断前的状态,其时序为:PC执行程序中断允许置位SR中的GIE置位 EINT(中断开)中断到,中断标志位(IFG)置位从中断向量表中读取中断程序的入口地址,进入中断程序执行中断程序中断允许位复位 RETI中断返回回到原来地址。
具体应用将会在应用程序中的到应用。
有关中断源和中断优先级及中断允许位、中断标志位在参考资料1上有详细介绍。
MSP430单片机的片上存储器共为64K,表示为图:第三节 P 口MSP430F149有6个8位的P口,其中P1、P2口占两个中断向量,共可以接16 个中断源,还可以直接利用 P口的输入输出寄存器,直接对外进行通信。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
上 电 及 按 键 复位 电 路
VCC C3 1 0U RST VCC DD+ GND
USB电 源 接 口 和 单排 插 针 接 口
J1 1 2 3 4 J2 R1 4 70 USB-PORT
SW -PB SJ17
R2 1 0K
+12 V GND -1 2V
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
DG5
VCC
1
DG6
DG7
RP1 1 00
4位 共 阴 数 码 显示 管
2 3 4 5 6 7 8 9
JP2 HE ADE R 8 X2 A1 5 A1 4 A1 3 A1 2 A1 1 A1 0 A9 A8 1 3 5 7 9 11 13 15 2 4 6 8 10 12 14 16 DG1 DG2 DG3 DG4 DG5 DG6 DG7 DG8
+
VCC
+
C1 00 1 0U
C1 00 1 0U
WW 1 0K
5
1
T
1
GND
T
液晶显示器接口电路
JP5 HE ADE R 8 X2 VCC A3 A4 A5 P37 P36 A9 P13 1 3 5 7 9 11 13 15 2 4 6 8 10 12 14 16 L IGHT L CD_ A0 L CD_ A1 L CD_ A2 L CD_ RD L CD_ W R CS_L CD RST _L CD R1 6 1 5K VCC J9 GND 1 2 3 18 19 20 VSS VDD Va dj VE E L IGHT + L IGHT D/I R/W E CS1 CS2 RST D0 D1 D2 D3 D4 D5 D6 D7 L CD1 28 64 3 L CD_ RD R1 8 1 0K CS_L CD 2 SN74 HC00 D 4 5 L CD_ A2 5 U1 1B 6 9 10 SN74 HC04 D U5 C 6 CS_L CD2 U1 1C 8 3 U5 B 4 L CD_ CL K R1 00 1K +5V DGND R1 01 1 0K +5V J1 00 L CD1 60 2 VCC Va dj GND L IGHT + L IGHT R/W DAT A CL K D0 D1 D2 D3 D4 D5 D6 D7 2 3 DGND 1 15 16 L CD_ A1 5 L CD_ A0 4 L CD_ CL K6
HE ADE R 8 X2 VCC
独 立 键 盘 电 路
R4 2K R5 2K R6 2K R7 2K
蜂 鸣 器
VCC
DG8 DG1 DG2 DG3 DG4 SW -PB SW -PB SW -PB SW -PB SJ18 SJ19 SJ20 SJ21
R8 1 0K
Q1 8 55 0
R9 C5 0 . 01 U 47
EA =1 时,先访问内部后访问外部程序存储器 不接跳线帽时 EA =1 ,否则EA =0 EA =0 时,只访问外部程序存储器
2
24个跑马灯和4位数码显示管电路
A DB1 DB2 B DB3 C DB4 D DB5 E DB6 F DB7 G DB8 DP DB9 A DB1 0 B C D E DB1 4 F DB1 5 G DP DB1 6 DB1 7 A B C DB2 0 D DB2 1 E DB2 2 F DB2 3 G DB2 4 DP DB1 1 DB1 2 DB1 3 DB1 8 DB1 9
J1 01 +12 V GND -1 2V 1 2 3 CON3
J8 CON1
HE ADE R 1 0X2 VCC R1 1 1 0K DAC_ W R GND DAC_ D3 DAC_ D2 DAC_ D1 DAC_ D0 DAC_ CS U9 1 2 3 4 5 6 7 8 9 10 CS W R1 AGND D3 D2 D1 D0 Vre f Rfb DGND DAC0 83 2 VCC IL E W R2 XFE R D4 D5 D6 D7 Io ut2 Io ut1 20 19 18 17 16 15 14 13 12 11 VCC DAC_ W R DAC_ CS DAC_ D4 DAC_ D5 DAC_ D6 DAC_ D7 3
B1
BUZ Z E R
3
ADC0804电路
JP3 P14 P37 P36 P32 D0 D1 D2 D3 D4 D5 D6 D7 1 3 5 7 9 11 13 15 17 19 21 23 2 4 6 8 10 12 14 16 18 20 22 24 ADC_ CS ADC_ RD ADC_ W R ADC_ INT R ADC_ D0 ADC_ D1 ADC_ D2 ADC_ D3 ADC_ D4 ADC_ D5 ADC_ D6 ADC_ D7
VCC
J3 CON2 R3 1 0K EA
X2 C1 3 0p f C2 3 0p f X1
Y1 1 1. 0 59 2M
1 2
1
外扩数据存储器和程序存储器电路
程 序 存 储 器 及数 据 存 储 器 、 仿 真 存 储 器 扩展 模 块
J6 CON3
1 2 3
扩展外部F LA S H 存储器,地址为0 0 0 0 H ----7 F F F H
W1 1 0K
R1 0 1 0K C6 1 50 PF
CL KR CL KIN
4
DAC0832电路
JP4 A1 0 P36 D0 D1 D2 D3 D4 D5 D6 D7 1 3 5 7 9 11 13 15 17 19 2 4 6 8 10 12 14 16 18 20 DAC_ CS DAC_ W R DAC_ D0 DAC_ D1 DAC_ D2 DAC_ D3 DAC_ D4 DAC_ D5 DAC_ D6 DAC_ D7
VCC U3 A1 4 A1 2 A7 A6 A5 A4 A3 A2 A1 A0 D0 D1 D2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 A1 4 A1 2 A7 A6 A5 A4 A3 A2 A1 A0 D0 D1 D2 GND AT 2 8C2 56 VCC WE A1 3 A8 A9 A1 1 OE A1 0 CE D7 D6 D5 D4 D3 28 27 26 25 24 23 22 21 20 19 18 17 16 15
HE ADE R 1 2X 2
U8 VCC ADC_ CS ADC_ RD ADC_ W R CL KIN ADC_ INT R 1 2 3 4 5 6 7 8 9 10 CS RD WR CL KIN INT R Vi n (+) Vi n (-) AGND Vre f/ 2 DGND
ห้องสมุดไป่ตู้
ADC0 80 4 VCC CL KR DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 20 19 18 17 16 15 14 13 12 11 VCC CL KR ADC_ D0 ADC_ D1 ADC_ D2 ADC_ D3 ADC_ D4 ADC_ D5 ADC_ D6 ADC_ D7
LCM_ D 0 LCM_ D 1 LCM_ D 2 LCM_ D 3 LCM_ D 4 LCM_ D 5 LCM_ D 6 LCM_ D 7
L IGHT
R1 7
8 K2 GND
JP6 HE ADE R 8 X2 D0 D1 D2 D3 D4 D5 D6 D7 1 3 5 7 9 11 13 15 2 4 6 8 10 12 14 16 L CM _D0 L CM _D1 L CM _D2 L CM _D3 L CM _D4 L CM _D5 L CM _D6 L CM _D7
1 2 3 4 5
DB2 5 LED CON5
JP9 P1. 0 P1. 1 P1. 2 P1. 3 P1. 4 P1. 5 P1. 6 P1. 7
HE ADE R 8 X2 1 3 5 7 9 11 13 15 2 4 6 8 10 12 14 16 P10 P11 P12 P13 P14 P15 P16 P17 J4 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 CON2 0 P10 P11 P12 P13 P14 P15 P16 P17 RST P30 P31 P32 P33 P34 P35 P36 P37 X2 X1 GND 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 U1 P1. 0 P1. 1 P1. 2 P1. 3 P1. 4 P1. 5 (MOSI) P1. 6 (MISO) P1. 7 (SCK) RE SE T P3. 0 (RXD) P3. 1 (T XD) P3. 2 (INT 0) P3. 3 (INT 1) P3. 4 (T 0) P3. 5 (T 1) P3. 6 (W R) P3. 7 (RD) XT AL 2 XT AL 1 GND AT 8 9S52 VCC P0. 0 P0. 1 P0. 2 P0. 3 P0. 4 P0. 5 P0. 6 P0. 7 E A/VPP AL E /PROG PSE N P2. 7 P2. 6 P2. 5 P2. 4 P2. 3 P2. 2 P2. 1 P2. 0 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 VCC D0 D1 D2 D3 D4 D5 D6 D7 EA AL E PSE N A1 5 A1 4 A1 3 A1 2 A1 1 A1 0 A9 A8 J5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 CON2 0