1 / 140

The TI University Programme

The TI University Programme. 基于 TI MSP430 微控制器的 智能仪表课程设计 —— 上海交通大学施耐德实验室. www.ti.com Shanghai Jiaotong university. 课程目的: 培养学生调试模拟电路的能力 加强学生掌握数字电路的设计 引导学生运用 MSP430 进行电子作品的实现. 课程内容: 基于 MSP430 自动量程切换交直流电压表设计 基于 MSP430 温度采集和控制的设计 基于 MSP430 超声波距离测量的设计 基于 MSP430 简易多功能电子秤的设计 …….

alban
Download Presentation

The TI University Programme

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The TIUniversity Programme 基于TI MSP430微控制器的 智能仪表课程设计 ——上海交通大学施耐德实验室 www.ti.com Shanghai Jiaotong university

  2. 课程目的:培养学生调试模拟电路的能力加强学生掌握数字电路的设计引导学生运用MSP430进行电子作品的实现课程目的:培养学生调试模拟电路的能力加强学生掌握数字电路的设计引导学生运用MSP430进行电子作品的实现

  3. 课程内容:基于MSP430自动量程切换交直流电压表设计基于MSP430温度采集和控制的设计基于MSP430超声波距离测量的设计基于MSP430简易多功能电子秤的设计 ……课程内容:基于MSP430自动量程切换交直流电压表设计基于MSP430温度采集和控制的设计基于MSP430超声波距离测量的设计基于MSP430简易多功能电子秤的设计 …… 鼓励学生进行创新的设计和制作 希望有更多个性化的作品!

  4. 课程设计内容的简单介绍 1.自动量程切换的交直流电压表 同学可以自行选择制作电压表的量程: (1)30mV, 300mV, 3V (2)50mV, 500mV, 5V 直流电压测量的基本要求: 第一档位:增益 X100倍 第二档位:增益X10倍 第三档位:增益X1倍

  5. 可能的设计方案:(1)利用多路开关设计3个增益运算放大器(2)利用数字电位计控制反馈增益(3)使用压控增益放大器VCA810(4)基于可编程增益放大器PGA可能的设计方案:(1)利用多路开关设计3个增益运算放大器(2)利用数字电位计控制反馈增益(3)使用压控增益放大器VCA810(4)基于可编程增益放大器PGA

  6. 作品的基本要求:(1)能完成在不同量程下自动切换(2)能测量交流信号的有效值(3)能测量交流信号的频率(范围10Hz~5kHz)(4)能测量芯片温度或者测量室温显示在LCD上(5)能实现交直流切换,尽可能降低芯片的功耗(6)最后测试单片机不能连接电脑作品的基本要求:(1)能完成在不同量程下自动切换(2)能测量交流信号的有效值(3)能测量交流信号的频率(范围10Hz~5kHz)(4)能测量芯片温度或者测量室温显示在LCD上(5)能实现交直流切换,尽可能降低芯片的功耗(6)最后测试单片机不能连接电脑

  7. 部分学生的作品

  8. 部分学生的作品 www.ti.com Shanghai Jiaotong university

  9. 2.温度采集与控制平台的设计温度测量的传感器可以有 DS18B20数字温度传感器 PT100电阻温度传感器 ECT-103热敏电阻2.温度采集与控制平台的设计温度测量的传感器可以有 DS18B20数字温度传感器 PT100电阻温度传感器 ECT-103热敏电阻

  10. 几种传感器的特点: www.ti.com Shanghai Jiaotong university

  11. 总体设计方案之一:PT100 Pt100传感器 Pt100传感器 信号调理 信号调理 CPU 显示 图1 系统框图 PT100的阻值随着环境温度的变化而成正比例线性变化,在恒流激励的条件下,其两端的电压也成正比例线性变化。再通过信号调理电路对其输出的电压模拟量进行放大和滤波。中央处理器对输入的模拟量进行采样并通过软件滤波,然后将结果送至显示部分进行显示,显示时间间隔可通过键盘设置。

  12. 系统组成原理图

  13. 部分学生的作品 www.ti.com Shanghai Jiaotong university

  14. 部分学生的作品 www.ti.com Shanghai Jiaotong university

  15. 3.超声波距离的测量 使用超声波传感器为:TCT40-16FS 最大检测距离3米,适合液位和物位的检测,TCT40-16T是超声波的发射探头,其共振频率为40Khz。TCT40-16T产生的超声波强度与电压大小正相关

  16. 超声波发射电路的设计 需要电平转换的驱动电路CD4049

  17. 超声波接收电路的设计 接收电路的核心CX2016A是红外载波接收芯片

  18. 部分学生的作品

  19. 4.简易电子秤的设计 要求学生制作一个750个量程或者1kg量程的简易电子秤。 使用的器材是电阻应变压力传感器,仪表放大器和片外ADC芯片。

  20. 可能的设计方案: 推荐的选型: 仪表放大器:INA333 ADC转换器:ADS1114 MSP430:G2553或F5529 LCD:12864或CMOS屏 按键:矩阵键盘

  21. 可能的设计方案: 前级放大电路设计图

  22. 可能的设计方案: INA333典型应用电路

  23. 可能的设计方案: ADS1114典型应用电路

  24. 需要完成的功能: 1.能分辨出1g的重量 4.自动计算总价格 2.有自动去皮的功能 5.重量稳定后自动变暗 3.能键盘输入价格 6.具有超重的保护和报警

  25. 部分学生的作品的测试数据拟合

  26. 部分学生的作品 摄于 2012TI 电子设计竞赛

  27. 课程设计报告要求: (1)简述课题任务和设计要求 (2)元器件选型的分析和说明 (3)设计方案的原理图和PCB图绘制 (4)整体设计系统的流程图 (5)软件设计的功能模块 (6)作品的检测数据结果及数据分析 (7)改进和拓展方案 (8)程序清单

  28. 下面进入MSP430的介绍

  29. Agenda • Introduction to Value Line • Code Composer Studio • CPUX and Basic Clock Module • Interrupt and GPIO • TimerA and WDT+ • Low-Power Optimization • ADC10 and Comparator_A+ • Serial Communications • Grace • Capacitive Touch Solution

  30. MSP430 Released Devices

  31. World’s Lowest Power MCU • Ultra-Low Power Active Mode • 7 Low Power Modes • Instant Wakeup • All MSP430 devices are Ultra-Low Power • Intelligent Analog & Digital Peripherals • Peripherals operate in low power modes • Minimize physical footprint and Bill of Materials • Featuring FRAM, USB, RF, Capacitive Touch I/O, Metrology Engines, LCD, ADC, DAC & MORE • Find the right MCU for you • 400+ devices • Up 256kB Flash, 18kB RAM, 25+ package options • Devices starting at $0.25 with Value Line • Various levels of performance & integration • Low cost and simple point of entry • Complete kits starting @ $4.30 • GUI-based coding & debugging tools available • MSP430Ware Software and Resource Package • -Incl. code examples, datasheets, user guides & more! MSP430 MCUsAn Introduction Ultra-Low Power Integration Easy to Get Started Extensive Portfolio, Low Cost Options

  32. MSP430-Enabled Applications Utility Metering Portable Medical Electricity Meters Gas Meters Flow Meters Smart Meters Blood Glucose Meters Thermometers Heart-Rate Monitors Implantable Devices Thousands of applications are enabled by MSP430 MCUs Differentiation is possible with MSP430 MCU’s Ultra-Low Power performance, high analog & digital peripheral integration, and easy-to-use tool chain. Wireless Applications Sensors & Security Remote Sensors Communication Controllers RFID Smoke Detector Motion Detector Vibration Detector Smart Sensors Energy Harvesting Consumer Electronics Personal Health & Fitness Renewable Energy Battery-less devices Solar, thermal, vibration, etc Portable Electronics Remote Controls Personal Care PC peripherals Sports Watches Pedometers Calorimeters Dive watches

  33. Value Line: 16-bit performance, 8-bit price ADC ADC ADC ADC ADC ADC ADC ADC ADC ADC ADC ADC UART UART UART UART UART UART UART Cap Touch I/O MSP430G25X3 16KB ADC10 MSP430G24X3 SC SC SC SC SC SC SC SC SC SC SC SC 8KB Comparator MSP430G24X2 SPI/I2C MSP430G23X3 4KB MSP430G23X2 MSP430G22X2 Flash Size 2KB MSP430G22X3 MSP430G22X1* MSP430G21X2 1KB MSP430G21X1* MSP430G21X3 .5 KB MSP430G2001* 32-pin QFN 24 GPIO 16-pin QFN 10 GPIO 28-pin TSSOP 24 GPIO 20-pin TSSOP/PDIP 16 GPIO 14-pin TSSOP/PDIP 10 GPIO * 8-pin SOIC in development

  34. Value Line Peripherals

  35. Value Line Peripherals • General Purpose I/O • Independently programmable • Any combination of input, output, and interrupt (edge selectable) is possible • Read/write access to port-control registers is supported by all instructions • Each I/O has an individually programmable pull-up/pull-down resistor • Some parts/pins are touch-sense enabled (PinOsc) • 16-bit Timer_A3 • 3 capture/compare registers • Extensive interrupt capabilities • WDT+ Watchdog Timer • Also available as an interval timer • Brownout Reset • Provides correct reset signal during power up and down • Power consumption included in baseline current draw

  36. Value Line Peripherals • Serial Communication • USI with I2C and SPI support • USCI with I2C, SPI and UART support • Comparator_A+ • Inverting and non-inverting inputs • Selectable RC output filter • Output to Timer_A2 capture input • Interrupt capability • 8 Channel/10-bit 200 ksps SAR ADC • 8 external channels (device dependent) • Voltage and Internal temperature sensors • Programmable reference • Direct transfer controller send results to conversion memory without CPU intervention • Interrupt capable • Some parts have a slope converter

  37. LaunchPad Development Board USB EmulatorConnection Embedded Emulation 6-pin eZ430 Connector Crystal Pads Chip Pinouts Part and Socket Power Connector P1.3 Button LEDs and Jumpers P1.0 & P1.6 Reset Button

  38. Agenda • Introduction to Value Line • Code Composer Studio • CPUX and Basic Clock Module • Interrupt and GPIO • TimerA and WDT+ • Low-Power Optimization • ADC10 and Comparator_A+ • Serial Communications • Grace • Capacitive Touch Solution

  39. What is Code Composer Studio? • Integrated development environment for TI embedded processors • Includes debugger, compiler, editor, simulator, OS… • The IDE is built on the Eclipse open source software framework • Extended by TI to support device capabilities • CCSv5 is based on “off the shelf” Eclipse (version 3.7 in CCS 5.1) • Future CCS versions will use unmodified versions of Eclipse • TI contributes changes directly to the open source community • Drop in Eclipse plug-ins from other vendors or take TI tools and drop them into an existing Eclipse environment • Users can take advantage of all the latest improvements in Eclipse • Integrate additional tools • OS application development tools (Linux, Android…) • Code analysis, source control… • Linux support soon • Low cost! $445 or $495

  40. Common Tasks • Creating New Projects • Very simple to create a new project for a device using a template • Build options • Many users have difficulty using the build options dialog and find it overwhelming • Updates to options are delivered via compiler releases and not dependent on CCS updates • Sharing projects • Easy for users to share projects, including working with version control (portable projects) • Setting up linked resources has been simplified

  41. Workspaces and Projects Workspace Project 1 Project 2 Project 3 Settings and preferences Project Source files Header files Library files Build and tool settings Source files Code and Data Project Source files Header Files Library files Build and tool settings Project Source files Header Files Library files Build and tool settings Link Link Link Link Header files Declarations/Defines Library files Code and Data A workspace contains your settings and preferences, as well as links to your projects. Deleting projects from the workspace deletes the links, not the files A project contains your build and tool settings, as well as links to your input files. Deleting files from the workspace deletes the links, not the files

  42. Project Wizard • Single page wizard for majority of users • Next button will show up if a template requires additional settings • Debugger setup included • If a specific device is selected, then user can also choose their connection, ccxml file will be created • Simple by default • Compiler version, endianness… are under advanced settings

  43. Various IDE options Free Integrated Development Environments (IDE) available • Code Composer Studio • Eclipse-based IDE (Compiler, debugger, linker, etc) for all TI embedded processors • Unrestricted version available for $495 • Free versions are available! • Free 16kB code-limited version available for download • Free, full-featured, 120-day trial version available • IAR Embedded Workbench • Strong third-party IDE offering with project management tools and editor. Includes config files for all MSP430 devices. • Free versions are available! • Free 4/8/16kB code-limited Kickstart version available for download • Free, full-featured, 30-day trial version available • MSPGCC • Free, Open source, GCC tool chain for MSP430 • includes the GNU C compiler (GCC), the assembler and linker (binutils), the debugger (GDB) • Tools can be used on Windows, Linux, BSD and most other flavors of Unix. • Learn more @ http://mspgcc.sourceforge.net/ Other MSP430 IDE options are available! Learn more @ www.ti.com/msp430tools

  44. Lab1: Code Composer Studio • Lab1: • Create a new workspace • Create Lab1 Project • Add in temperature sense demo • Compile it and run

  45. Step 1: Create CCS workspace Put the Lab files onto your desktop Launch CCS v5 Core Edition Select a “Workspace” location 45

  46. Step 2: Create a CCS Project File > New > CCS Project Project Name: Lab1 Device>Family: MSP430 Variant: MSP430G2452 Project templates and examples : Empty Project 46

  47. Step 3: Add a File to the CCS Project Project > Add Files Navigate to Lab source folder And select : Temperature_Sense_Demo.c 47

  48. CCS Window – C/C++ Perspective Overview Independent Debug and C/C++ Project Perspectives 1-click project Debug • Project Outline • Shortcut to project parts • Project View • List of all Projects • Problems View • Information, Warnings, Errors • Console • Build Information • Code Window • Real-time breakpoints, Syntax highlighting 48

  49. CCS Window – Debug Perspective Overview Independent Debug and C/C++ Project Perspectives 1-click project Debug • Highly configurablewindow layout • User preferences • Plugin support • Target control • Start • Stop • Halt • Stepping • Stack Trace • Real-time, in-system MSP430 information • Register access • Flash, RAM, Info segment access • Disassembly view Program Size Info • Code Window • Real-time breakpoints, Syntax highlighting 49

  50. Step 4: Build & Debug a CCS Project Click the “BUG” to build the code & launch the debugger 50

More Related