MSP430g2553原理图
- 格式:pdf
- 大小:1.08 MB
- 文档页数:5
MSP-EXP430G2LaunchPad Evaluation Kit User's GuideLiterature Number:SLAU318EJuly2010–Revised March2014Contents 1MSP-EXP430G2LaunchPad Overview (4)1.1Overview (4)1.2Features (5)1.3Kit Contents (5)1.4Revisions (6)2Installation (6)2.1Download the Required Software (6)2.2Install the Software (6)2.3Install the Hardware (6)3Getting Started With MSP-EXP430G2LaunchPad (7)3.1Getting Started (7)3.2Demo Application,Internal Temperature Measurement (7)4Develop an Application With the MSP-EXP430G2LaunchPad (8)4.1Developing an Application (8)4.2Program and Debug the Temperature Measurement Demo Application (8)4.3Disconnect Emulator From Target With Jumper J3 (9)4.4Program Connected eZ430Target Boards (10)4.5Connecting a Crystal Oscillator (10)4.6Connecting a BoosterPack (11)4.7Supported Devices (11)4.8MSP-EXP430G2On-Board Emulator (13)5MSP-EXP430G2Hardware (13)5.1Device Pinout (13)5.2Schematics (14)5.3PCB Layout (20)5.4Bill of Materials(BOM) (23)6Suggested Reading (24)7Frequently Asked Questions(FAQ) (24)Revision History (26)2Table of Contents SLAU318E–July2010–Revised March2014Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments IncorporatedList of Figures1MSP-EXP430G2LaunchPad Overview (5)2Insert Device Into Target Socket (8)3Code Composer Studio™v4in Debugging Mode (9)4MSP-EXP430G2LaunchPad With Attached eZ430-RF2500Target Board (10)5Device Pinout (13)6Schematics,MSP-EXP430G2Emulator(1of2),Revision1.4 (14)7Schematics,MSP-EXP430G2Emulator(2of2),Revision1.4 (15)8Schematics,MSP-EXP430G2Target Socket,Revision1.4 (16)9Schematics,MSP-EXP430G2Emulator(1of2),Revision1.5 (17)10Schematics,MSP-EXP430G2Emulator(2of2),Revision1.5 (18)11Schematics,MSP-EXP430G2Target Socket,Revision1.5 (19)12Layout,LaunchPad Top Layer (20)13Layout,LaunchPad Bottom Layer (21)14Layout,LaunchPad Silkscreen (22)List of Tables1Jumper Connection J3Between Emulator and Target (9)2eZ430Debugging Interface (10)3Supported Devices (11)4Features Supported by On-Board Emulator (13)5Bill of Materials (23)3 SLAU318E–July2010–Revised March2014List of Figures Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments IncorporatedUser's GuideSLAU318E–July2010–Revised March2014 MSP-EXP430G2LaunchPad Evaluation KitPreface:Read This FirstIf You Need AssistanceIf you have any feedback or questions,support for the MSP430™devices and the MSP-EXP430G2isprovided by the Texas Instruments Product Information Center(PIC)and the TI E2E Forum(/).Contact information for the PIC can be found on the TI web site at .Additional device-specific information can be found on the MSP430web site at /msp430. Related Documentation from Texas InstrumentsThe primary sources of MSP430information are the device-specific data sheets and user's guidesavailable at the Texas Instruments MSP430web site:/msp430.MSP430device user's guides,application reports,software examples and other MSP430user's guides can be found at the Tech Docs section.The CCS user's guide includes detailed information on setting upa project and using Code Composer Studio™for the MSP430microcontroller(SLAU157).Information specific to the MSP-EXP430G2LaunchPad Evaluation Kit,all the available IDEs,Software Libraries,and examples can be found at the Tools&Software section:/tool/msp-exp430g2.1MSP-EXP430G2LaunchPad Overview1.1OverviewThe MSP-EXP430G2LaunchPad is an inexpensive and simple evaluation kit for the MSP430G2xx Value Line series of microcontrollers.It is an easy way to start developing on the MSP430with on-boardemulation for programming and debugging as well as buttons and LEDs for a simple user interface.Rapid prototyping is simplified by the20-pin BoosterPack headers which support a wide range of available BoosterPack plug-in modules.You can quickly add features like wireless connectivity,graphical displays, environmental sensing,and much more.You can either design your own BoosterPack or choose among many already available from TI and third party developers.The LaunchPad features an integrated DIP target socket that supports up to20pins,allowing MSP430™Value Line devices to be plugged into the LaunchPad board.The MSP-EXP430G2LaunchPad comeswith an MSP430G2553device by default.The MSP430G2553has the most memory available of thecompatible Value Line devices.The MSP430G255316-bit MCU has16KB flash,512bytes RAM,up to16-MHz CPU speed,10-bit ADC, capacitive touch enabled I/Os,universal serial communication interface,and more–plenty to get youstarted in your development.Free software development tools are also available:TI's Eclipse-based Code Composer Studio™IDE(CCS),IAR Embedded Workbench™IDE(IAR),and the community-driven Energia open source codeeditor.More information about the LaunchPad,including documentation and design files,can be found on the tool page at /tool/msp-exp430g2.MSP430,Code Composer Studio are trademarks of Texas Instruments.IAR Embedded Workbench is a trademark of IAR Systems.All other trademarks are the property of their respective owners.4MSP-EXP430G2LaunchPad Evaluation Kit SLAU318E–July2010–Revised March2014Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments Incorporated MSP-EXP430G2LaunchPad Overview 1.2FeaturesMSP-EXP430G2LaunchPad features:•USB debugging and programming interface featuring a driverless installation and application UART serial communication with up to9600Baud•Supports MSP430G2xx2,MSP430G2xx3,and MSP430F20xx devices in PDIP14or PDIP20packages (see Section4.7for a complete list of supported devices)•Two general-purpose digital I/O pins connected to green and red LEDs for visual feedback•Two push button for user feedback and device reset•Easily accessible device pins for debugging purposes or as socket for adding customized extension boards•High-quality20-pin DIP socket for an easy plug-in or removal of the target deviceFigure1.MSP-EXP430G2LaunchPad Overview1.3Kit ContentsThe MSP-EXP430G2evaluation kit includes the following hardware:•LaunchPad emulator socket board(MSP-EXP430G2)•Mini USB-B cable,0.5m•Two MSP430flash devices–MSP430G2553:Low-power16-bit MSP430microcontroller with an8-channel10-bit ADC,on-chip comparator,touch-sense enabled I/Os,universal serial communication interface,16kB flashmemory,and512bytes of RAM(preloaded with a sample program)–MSP430G2452:Low-power16-bit MSP430microcontroller with an8-channel10-bit ADC,on-chip comparator,touch-sense enabled I/Os,universal serial interface,8kB flash memory,and256bytesof SRAM•Two10-pin PCB connectors female•32.768-kHz clock crystal from Micro Crystal()•Quick start guide•Two LaunchPad stickers5 SLAU318E–July2010–Revised March2014MSP-EXP430G2LaunchPad Evaluation Kit Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments IncorporatedInstallation 1.4RevisionsThe first production revision of the LaunchPad in2010was1.3.In2012the LaunchPad board revision changed from1.4to1.5to align with the new release of Value Line devices.The differences in theschematic and the kit contents are:•Layout and Schematic:–Voltage feedback in the emulator changed to increase startup stability(Rev1.3to Rev1.4)–Rearranged jumper J3to support two UART configurations:vertical(SW UART),horizontal(HW UART)–VCC on the connector J4can now be disconnected from the emulator VCC by J3–Pullup resistor R34and capacitor C24on P1.3removed to reduce the current consumption–Presoldered male headers J1and J22InstallationThe MSP-EXP430G2LaunchPad installation consists of three easy steps:1.Download the required software.2.Install the selected IDE.3.Connect the LaunchPad to the PC.Then the LaunchPad is ready to develop applications or to use the pre-programmed demo application.2.1Download the Required SoftwareDifferent development software tools are available for the MSP-EXP430G2LaunchPad developmentboard.IAR Embedded Workbench™KickStart IDE and Code Composer Studio™(CCS)IDE are bothavailable in a free limited version.IAR Embedded Workbench allows4KB of C-code S is limited to a code size of16KB.The software is available at /mspds.There are manyother compilers and integrated development environments(IDEs)available to use with the MSP-EXP430 LaunchPad including Rowley Crossworks and MSPGCC.However,example projects have been created using IAR Embedded Workbench KickStart IDE and Code Composer Studio IDE(CCS).For moreinformation on the supported software and the latest code examples,visit the LaunchPad tool page(/tool/msp-exp430g2).2.2Install the SoftwareDownload one of the integrated development environments(IDEs)(see Section2.1).IAR KickStart and CCS offer the required driver support to work with the MSP-EXP430LaunchPad onboard emulation.Once installed,the IDE should find the MSP-EXP430G2LaunchPad as USB:HID debugging interface.Now all is set for developing MSP430G2xx based application on the LaunchPad.2.3Install the HardwareConnect the MSP-EXP430G2LaunchPad socket board with the enclosed USB cable to a PC.The driver installation starts automatically.If prompted for software,allow Windows to install the softwareautomatically.This is possible only if either IAR KickStart or CCS is already installed.6MSP-EXP430G2LaunchPad Evaluation Kit SLAU318E–July2010–Revised March2014Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments Incorporated Getting Started With MSP-EXP430G2LaunchPad 3Getting Started With MSP-EXP430G2LaunchPad3.1Getting StartedThe first time the MSP-EXP430G2LaunchPad Evaluation Kit is used,a demo application automatically starts as soon as the board is powered from the USB host.To start the demo,connect the MSP-EXP430G2LaunchPad with the included mini USB cable to a free USB port.The demo application starts with an LED toggle to show the device is active.More information about the demo application can befound in Section3.2.3.2Demo Application,Internal Temperature MeasurementThe LaunchPad includes a pre-programmed MSP430G2553device already installed in the target socket.When LaunchPad is connected via USB,the demo starts with an LED toggle sequence.The onboardemulation generates the supply voltage and all the signals necessary to start.Press button P1.3to switch the application to a temperature measurement mode.A reference temperature is taken at the beginning of this mode,and the LEDs of the LaunchPad signal a rise or fall in temperature by varying the brightness of the on-board red or green LED,respectively.The reference temperature can also be recalibrated with another button press on P1.3.The collected temperature data is alsocommunicated via back-channel UART through the USB emulation circuitry back to the PC.The internal temperature sensor data from the MSP430G2553device is sent to the PC to be displayed on the GUI.The pre-loaded demo application and the GUI are found in the Software Examples zip folder.The GUI is opened with LaunchPad_Temp_GUI.exe.This GUI is made with Processing()with the source available for customization.The serial communication port on the PC must be configured with 2400bps,one stop bit,and no flow control to display the values correctly.The demo application uses the on-chip peripherals of the MSP430G2553device such as the10-bit ADC, which samples the internal temperature sensor,and16-bit timers,which drive the PWM to vary brightness of the LEDs and enable software UART for communication with the PC.The MSP430G2553offers a USCI interface that is capable of communicating through UART at up to2MBaud,but to be aligned with all the other MSP430G2xx devices,the demo uses the Timer UART implementation,which can be used on all the other devices.This way the demo can be used with any other MSP430G2xx device with an integrated ADC,without any change in the program.The provided applications can be a great starting point for various custom applications and give a good overview of the various applications of the MSP430G2xx Value Line devices.7 SLAU318E–July2010–Revised March2014MSP-EXP430G2LaunchPad Evaluation Kit Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments Incorporated4Develop an Application With the MSP-EXP430G2LaunchPad4.1Developing an ApplicationThe integrated development environments(IDEs)shown in Section2offer support for the wholeMSP430G2xx Value Line.The MSP-EXP430G2LaunchPad needs only a connection to the USB of the Host PC—there is no external hardware required.The power supply and the Spy-Bi-Wire JTAG signals TEST and RST must be connected with jumper J3to allow the onboard emulation connection to thedevice.Now the preferred device can be plugged into the DIP target socket of the LaunchPad(seeFigure2).Both PDIP14and PDIP20devices of the MSP430G2xx Value Line and the MSP430F20xxfamily can be inserted into the DIP socket aligned to pin1.A complete list of supported devices can be found in Section4.7.Figure2.Insert Device Into Target SocketThe following example for Code Composer Studio shows how to download and debug the demoapplication described in Section3.2.4.2Program and Debug the Temperature Measurement Demo ApplicationThe source code of the demo application can be found in the Software Examples zip folder.Download the project folder and unpack it to a location of your choice.For this demo,Code Composer Studio v4ornewer must be installed.The demo application can be loaded to the CCS workspace by clicking File→Import.Select the location of the extracted project files and import Existing projects into Workspace.Now the MSP-EXP430G2-Launchpad project appears inside the CCS workspace.The project must be marked as the active project to start programming and debugging the device.Connect the LaunchPad with an inserted MSP430G2553device to the host PC and click the Debug button on the CCS Toolbar.The MSP-EXP430G2LaunchPad is initialized and the download of the compileddemo application starts.The CCS view switches to a debugging interface once the download is completed and the application is ready to start.Figure3shows Code Composer Studio v4with the MSP-EXP430G2 LaunchPad demo application in debug view.8MSP-EXP430G2LaunchPad Evaluation Kit SLAU318E–July2010–Revised March2014Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments IncorporatedFigure3.Code Composer Studio™v4in Debugging Mode4.3Disconnect Emulator From Target With Jumper J3The connection between the MSP-EXP430G2emulator and the attached target device can be opened with the jumper array J3.This can be useful to access an attached eZ430target board by disconnecting the Spi-Bi-Wire JTAG lines RST and TEST or if the JTAG lines are used for other application purposes.The jumper array can also be used to measure the power consumption of the LaunchPad application.For this intention,all connections except VCC must be opened,and a multi meter can used on the VCCJumper to measure the current of the MSP-EXP430G2target device and its peripherals.The jumper J5 VCC also must be opened if the LaunchPad board is powered with an external power supply over J6Table1or the eZ430interface J4.NOTE:The assignment of jumper J3has been changed in MSP-EXP430G2revision1.5,see thecomments in Table1to find the assignment for a specific board revision.Table1.Jumper Connection J3Between Emulator and TargetJumper Signal Description1VCC Target socket power supply voltage(power consumption test jumper)(located on5before Rev.1.5)Test mode for JTAG pins or Spy-Bi-Wire test clock input during programming and test(located on1before 2TESTRev.1.5)3RST Reset or Spy-Bi-Wire test data input/output during programming and test(located on2before Rev.1.5)4RXD UART receive data input(direction can be selected by jumper orientation)(located on3before Rev.1.5)5TXD UART transmit data output(direction can be selected by jumper orientation)(located on4before Rev.1.5)Jumpers4and5connect the UART interface of the emulator to the target device pins P1.1and P1.2.The direction of the UART signal lines can be selected by the orientation of the attached jumpers.In horizontal orientation,the jumpers connect TXD to P1.1and RXD to P1.2,as they are used for the software UART communication on the demo application(see Section3.2).In vertical orientation,the jumpers connect the TXD signal to P1.2and the RXD signal to P1.1,as required for the MSP430G2553USCI.9 SLAU318E–July2010–Revised March2014MSP-EXP430G2LaunchPad Evaluation Kit Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments Incorporated4.4Program Connected eZ430Target BoardsThe MSP-EXP430G2LaunchPad can program the eZ430-RF2500T target boards,the eZ430-Chronos watch module,or the eZ430-F2012T/F2013T.To connect one of the ez430targets,connector J4must be populated with a0.050-in(1.27-mm)pitch male header,as shown in Figure4.Figure4.MSP-EXP430G2LaunchPad With Attached eZ430-RF2500Target Board To program the attached target without interfering with the LaunchPad socket board,jumper connections TEST and RST of J3must be open.The interface to the eZ430target board is always connected to the MSP-EXP430G2emulator,so the programming and debugging of a connected LaunchPad target device is possible only if the eZ430target is not connected on the same time.The application UART,on the other hand,is connected directly to the LaunchPad target device,and jumper J3can be closed to monitor the transmission from the LaunchPad target to the attached eZ430.This way both possible connections,from the device to the PC and from the device to the eZ430,can be established without changing the direction of the UART pins.The VCC connection to the eZ430interface is directly connected to the LaunchPad target VCC and can be separated with jumper J3,if the LaunchPad itself should be powered via a connected battery on J4.To supply the eZ430interface with the onboard emulator the jumper J3VCC needs to be closed.Table2shows the pinout of the eZ430debugging interface J4,the first pin is the left pin located on the emulator part of the LaunchPad.Table2.eZ430Debugging InterfacePin Signal Description1TXD UART transmit data output(UART communication from PC or MSP430G2xx to eZ430target board)2VCC Power supply voltage(J3VCC needs to be closed to supply via onboard emulator)3TEST/SBWTCK Test mode for JTAG pins and Spy-Bi-Wire test clock input during programming and test4RST/SBWTDIO Reset,Spy-Bi-Wire test data input/output during programming and test5GND Power supply ground6RXD UART receive data input(UART communication from eZ430target board to PC or MSP430G2xx)4.5Connecting a Crystal OscillatorThe MSP-EXP430G2LaunchPad offers a footprint for a variety of crystal oscillators.The XIN and XOUT signals of the LFXT1oscillator can support low-frequency oscillators like a watch crystals of32768Hz or a standard crystal with a range defined in the associated data sheet.The signal lines XIN and XOUT can also be used as multipurpose I/Os or as a digital frequency input.More information on the possibilities of the low-frequency oscillator and the possible crystal selection can be found in the MSP430x2xx Family User's Guide(SLAU144)or the device-specific data sheet.The oscillator signals are connected to J2to use the signals on an attached application board.In case of signal distortion of the oscillator signals that leads to a fault indication at the basic clock module,resistors R29and R28can be used to disconnect the pin header J2from the oscillating lines.10MSP-EXP430G2LaunchPad Evaluation Kit SLAU318E–July2010–Revised March2014Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments Incorporated4.6Connecting a BoosterPackThe LaunchPad can connect to many BoosterPacks within the ecosystem.The BoosterPack headers J1 and J2along with power supply J6fall on a100-mil(0.1-in)grid to allow for easy and inexpensivedevelopment with a breadboard.The LaunchPad adheres to the20-pin LaunchPad pinout standard.Astandard was created to aid compatibility between LaunchPads and BoosterPacks,across the TIecosystem.The20-pin standard is backward compatible with the40-pin standard used by LaunchPads like the MSP-EXP430F5529LP.This allows a subset of some40-pin BoosterPacks to be used with20-pin LaunchPads.While most BoosterPacks are compliant with the standard,some are not.The LaunchPad is compatible with all20-pin(and40-pin)BoosterPacks that are compliant with the standard.If the reseller or owner of the BoosterPack does not explicitly indicate compatibility with the MSP430G2LaunchPad,you might want to compare the schematic of the candidate BoosterPack with the LaunchPad,to ensure compatibility.Keep in mind that sometimes conflicts can be resolved by changing the G2device pin functionconfiguration in software.More information about compatibility can also be found at/launchpad.4.7Supported DevicesTexas Instruments offers several MSP430devices in a PDIP package that is compatible with LaunchPad.Table3shows the supported devices.Table3.Supported Devices11 SLAU318E–July2010–Revised March2014MSP-EXP430G2LaunchPad Evaluation Kit Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments IncorporatedTable3.Supported Devices(continued)12MSP-EXP430G2LaunchPad Evaluation Kit SLAU318E–July2010–Revised March2014Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments Incorporated MSP-EXP430G2Hardware 4.8MSP-EXP430G2On-Board EmulatorThe MSP-EXP430G2on-board emulator enables programming and debugging of supported MSP430devices(see Section4.7).It offers several features that are enabled by a2-wire JTAG interface calledSpy-Bi-Wire.For a more feature-complete emulator,the MSP-FET430UIF flash emulation tool may bemore appropriate.See Table4for more details on the MSP-EXP430G2LaunchPad on-board emulator.Table4.Features Supported by On-Board EmulatorSupport by LaunchPadFeature(MSP-EXP430G2) Supports MSP430F20xx,F21x2,F22xx,G2x01,G2x11,G2x21,G2x31,G2x53✓Allows fuse blowAdjustable target supply voltageFixed2.8-V target supply voltageFixed3.6-V target supply voltage✓4-wire JTAG2-wire JTAG✓Application UART✓Supported by CCS✓Supported by IAR✓5MSP-EXP430G2Hardware5.1Device PinoutFigure5.Device Pinout13 SLAU318E–July2010–Revised March2014MSP-EXP430G2LaunchPad Evaluation Kit Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments IncorporatedMSP-EXP430G2Hardware 5.2SchematicsFigure6.Schematics,MSP-EXP430G2Emulator(1of2),Revision1.414MSP-EXP430G2LaunchPad Evaluation Kit SLAU318E–July2010–Revised March2014Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments Incorporated MSP-EXP430G2HardwareFigure7.Schematics,MSP-EXP430G2Emulator(2of2),Revision1.415 SLAU318E–July2010–Revised March2014MSP-EXP430G2LaunchPad Evaluation Kit Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments IncorporatedMSP-EXP430G2Hardware Figure8.Schematics,MSP-EXP430G2Target Socket,Revision1.416MSP-EXP430G2LaunchPad Evaluation Kit SLAU318E–July2010–Revised March2014Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments Incorporated MSP-EXP430G2HardwareFigure9.Schematics,MSP-EXP430G2Emulator(1of2),Revision1.517 SLAU318E–July2010–Revised March2014MSP-EXP430G2LaunchPad Evaluation Kit Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments IncorporatedMSP-EXP430G2Hardware Figure10.Schematics,MSP-EXP430G2Emulator(2of2),Revision1.518MSP-EXP430G2LaunchPad Evaluation Kit SLAU318E–July2010–Revised March2014Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments Incorporated MSP-EXP430G2HardwareFigure11.Schematics,MSP-EXP430G2Target Socket,Revision1.519 SLAU318E–July2010–Revised March2014MSP-EXP430G2LaunchPad Evaluation Kit Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments IncorporatedMSP-EXP430G2Hardware 5.3PCB Layoutyout,LaunchPad Top Layer20MSP-EXP430G2LaunchPad Evaluation Kit SLAU318E–July2010–Revised March2014Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments Incorporated MSP-EXP430G2Hardwareyout,LaunchPad Bottom Layer21 SLAU318E–July2010–Revised March2014MSP-EXP430G2LaunchPad Evaluation Kit Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments IncorporatedMSP-EXP430G2Hardware yout,LaunchPad Silkscreen22MSP-EXP430G2LaunchPad Evaluation Kit SLAU318E–July2010–Revised March2014Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments Incorporated MSP-EXP430G2Hardware 5.4Bill of Materials(BOM)Table5.Bill of MaterialsNumberPos.Ref Name Descriptionper Board1C2,C3216pF0402(33pF on Rev1.3)2C9,C10222pF04023C1110nF04024C5,C7,C11,C12,C135100nF04025C4,C6,C831µF,6.3V06046D111N4148MicroMELF7EZ_USB1Mini-USB connector8Q11SMD oscillator12MHz9R1,R2,R3,R16,R17347k0402(R16,R17is not populated)10R8161k50402(6k8in Rev1.3and prior)11R19,R2223k3040212R9130k0402(3k3in Rev1.3and prior)13R12,R21233k040214R4,R5,R6,R7,R235100R040215R14,R15233R040216R18,R202100k040217R13,R24,R2531k5040218R10110k040219R11115k040220U11MSP430F1612IPMR21U41TPD2E001DRLR22U31TUSB3410VF23U21TPS77301DGKR24U51I2C EEPROM128k(AT24C128-10TU-2.7)TP1,TP2,TP3,TP4,25TP5,TP6,TP726C1411nF,SMD060327C21,C2212.5pF,SMD0603(not populated)28C23110µF,10V,SMD080529C20,C241100nF,SMD0603(C24is not populated)30LED0,LED12Green DIODE060331LED21Red DIODE060332R34,R27147k SMD0603(R34is not populated)33R32,R262270R SMD060334R331470R SMD060335R28,R2920R SMD060336IC11DIP20socketClock crystal32kHz(Micro Crystal MS3V-T1R32.768kHz CL:12.5pF±20ppm 37Q2included)38J1,J2,210-pin header,TH,2.54mm male(female header included)39J312X05pin header male40J46pin header male1.28mm41J512x02pin header male42J623-pin header,male,TH43S1,S22Push button23 SLAU318E–July2010–Revised March2014MSP-EXP430G2LaunchPad Evaluation Kit Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments IncorporatedSuggested Reading 6Suggested ReadingThe primary sources of MSP430™information are the device-specific data sheets and the family user's guides.The most up-to-date versions of those documents can be found at the Texas Instruments MSP430 landing page.For more information on CCS and IAR,download the latest version from /mspds andread the included user's guides and documentation in the installation folder.Documents describing the IAR tools(Workbench/C-SPY,the assembler,the C compiler,the linker,and the library)are located incommon\doc and430\doc.All necessary CCS documents can be found in the msp430\doc folder in the CCS installation path.The FET user's guide also includes detailed information on how to set up a project for the MSP430using IAR or CCS,and it is included in most of the IDE releases and on the TI MSP430 side.7Frequently Asked Questions(FAQ)1.Can other programming tools like the MSP-FET430UIF interface the MSP-EXP430G2LaunchPadsocket device?The LaunchPad evaluation kit works with any programming tool that supports the2-wire Spy-Bi-Wireinterface.Both the MSP430USB FET(MSP-FET430UIF)and the Gang Programmer(MSP-GANG430) support these devices,but the connection must be made directly to the dedicated Spy-Bi-Wire ports.See MSP-FET430Flash Emulation Tool User's Guide(SLAU138)for details on using MSP430USBFET and the Gang Programmer for a2-wire Spy-Bi-Wire interface.Do not try to connect the standardJTAG connector to the MSP-EXP430G2pinheads,as this could result in damage to the attachedhardware.2.Does the MSP-EXP430G2support fuse blow?The MSP-EXP430G2LaunchPad evaluation kit onboard debugging interface lacks the JTAG securityfuse-blow capability.To ensure firmware security on devices going to production,the USB FlashEmulation Tool or the Gang Production Programmer,which support the fuse-blow feature,arerecommended.3.What versions of IAR Embedded Workbench and Code Composer Studio are supported?The MSP-EXP430G2LaunchPad hardware is supported by IAR Embedded Workbench KickStartVersion6.00or higher and Code Composer Studio v4or higher.To download the IDE visit/mspds.4.What are the part numbers for the connectors between the LaunchPad emulator board and the othereZ430target boards?Header:MALE CONN HEADER.050"6POS PCB R/A(for example,Digi-Key:S9016E-06-ND)Socket:FEMALE CONN HEADER.050"6POS PCB R/A(for example,Digi-Key:S9010E-06-ND)5.I am not able to select the MSP430Application UART and cannot receive data.Ensure that the Application UART driver is correctly installed.This is done by installing either IAREmbedded Workbench or Code Composer Studio v4.To determine if the driver is correctly installed:a.Plug in the MSP-EXP430G2LaunchPad with the included Mini USB cable.b.Right click My Computer and select Properties.c.Select the Hardware tab and click on Device Manager.d.Under Ports(COM&LPT)should be an entry for"MSP430Application UART(COM xx)".If the entry is there,but no characters are received,reconnect the LaunchPad to the PC and restart the application to reload the drivers.If the Application UART is not listed,install the driver by following theinstructions in Section2.2.If the application UART is installed but not receiving UART data,ensure that the jumpers on J3areconfigured for the proper UART communication.The two UART jumpers are configured vertically for asoftware(SW)UART,and horizontally for a hardware(HW)UART.The application implementation and J3jumpers should match for UART data to be properly transmitted.24MSP-EXP430G2LaunchPad Evaluation Kit SLAU318E–July2010–Revised March2014Submit Documentation FeedbackCopyright©2010–2014,Texas Instruments Incorporated。
数字式直流电压表一、整体说明在电子技术中,往往离不开对电压的测量,作为一种测量电压的仪器——电压表是近代电子技术领域的常用工具之一,在许多领域得到广泛应用。
本设计是基于TI单片机设计的数字式直流电压表,它主要由MSP430G2553、LCD12864和分压电路三部分组成。
分压电路先将输入的电压信号衰减一定的倍数,后通过控制双路选择开关设定测量的量程,分别有0~3V和0~15V两个档,以便实现精确读数;分压处理后的电压信号由MSP430G2553内部的ADC10模块转换成数字信号;再通过LCD12864液晶屏进行串行显示。
经多次测量实验得出误差范围在2%以内。
二、原理图基于MSP430G2553单片机设计的数字式直流电压表的电路图如图1所示。
由于MSP430开发板已具备单片机最小系统结构,只需添加显示电路和分压电路。
LCD12864通过串口方式显示,只需占用单片机2个I/O口;分压电路可以通过开关S1选择量程档位,只占用1个I/O口。
图1 直流电压表电路图三、接口定义MSP430G2553的接口说明如表1所示。
图1中的复位和晶振部分是MSP430开发板固有的部分,故不再说明。
P1.0接液晶屏的SID脚,作为串行的数据口用;P1.1则接液晶屏的SCLK脚,控制串行的同步时钟;P1.4接分压电路的输出端。
LCD12864的接口说明如表2所示。
当PSB脚接低电平时,串口模式被选择。
在该模式下,只用2根线(SID与SCLK)来完成数据传输。
RS接高电平,不使用片选功能。
注意:信号源与单片机之间要共地。
表1 MSP430G2553的接口说明表2 LCD12864的接口说明四、程序流程图(一)主函数主函数的流程框图如图1所示。
主函数主要是调用系统初始化函数和循环开启ADC 转换,这是由于ADC10采用单通道单次转换模式,每次采样后需要重新开启ADC ,才会进行下一次信号采样转换。
另外,信号的采样与处理以及电压值的显示都是通过中断来完成。
基本时钟模块_MSP430G2553G2xxx系列DCO校准数据(校正寄存器)1MHz:CALBC1_1MHZCALDCO_1MHZ8MHz:CALBC1_8MHZCALDCO_8MHZ12MHz:CALBC1_12MHZCALDCO_12MHZ16MHz:CALBC1_16MHZCALDCO_16MHZ例:设置DCO频率为1MHzif(CALBC1_1MHZ==0xFF || CALDCO_1MHZ==0xFF)while(1);//校准数据是否被擦除,若是则CPU挂起。
BCSCTL1 = CALBC1_1MHZ;DCOCTL = CALDCO_1MHZ;基本时钟模块寄存器寄存器缩写形式类型初始状态DCO控制寄存器DCOCTL 读/写0x60(PUC)基本时钟系统控制器1 BCSCTL1 读/写0x87(POR)基本时钟系统控制器2 BCSCTL2 读/写由PUC复位基本时钟系统控制器3 BCSCTL3 读/写0x05(PUC)中断使能寄存器(特殊功能寄存器)IE1 读/写由PUC复位中断标致寄存器(特殊功能寄存器)IFG1 读/写由PUC复位说明:DCO的频率可以通过软件设定DCOx、MODx、RSELx相应位来调整,DCO频率是通过将f DCO和f DCO+1混频得到。
1、DCOCTL:DCO控制寄存器7 6 5 4 3 2 1 0DCOx MODxrw-0 rw-1 rw-1 rw-0 rw-0 rw-0 rw-0 rw-0 DCOx:DCO频率范围选择位,这些位可以用来在由RESLx设置决定的8个离散的频率范围中选择哪一个。
MODx:调制系数选择位,这些位用来决定在32个DCO时钟周期中f DCO+1占多少个,f DCO 占多少个。
注意:当MODx=0时调制器关闭,DCOx=7时,由于此时没有下一个更高的频率范围f DCO+1可用,因此MODx无效不可用。
2、BCSCTL1:基本时钟系统控制寄存器17 6 5 4 3 2 1 0 XT2OFF XTS(1)(2)DIVAx RSELxrw-(1) rw-(0) rw-(0) rw-(0) rw-0 rw-1 rw-1 rw-1 XT2OFF:第二晶振XT2(可选高频晶振)关闭控制位。
MSP430g2553串口通信MSP430的不同型号,其串行通讯工作模式是一样的。
以MSP430G2553为例进行说明。
MSP430G2553是20个引脚的16位单片机。
具有内置的16位定时器、16k 的FLASH 和512B 的RAM ,以及一个通用型模拟比较器以及采用通用串行通信接口的内置通信能力。
此外还具有一个10位的模数(A/D)转换器。
其引脚排布如图1.1所示。
其功能表如表1.1所示。
串行通讯模块主要由三个部分组成:波特率生成部分、发送控制器以及接收控制器。
如图1.2所示。
一、UART 模式在异步模式下,接收器自身实现帧的同步,外部的通讯设备并不使用这一时钟。
波特率的产生是在本地完成的。
异步帧格式由1个起始位、7或8个数据位、校验位(奇/偶/无)、1个地址位、和1或2个停止位。
一般最小帧为9个位,最大为13位。
图1.2 串行通讯模块内部结构图图1.1 MSP430G2553引脚图(一)UART的初始化单片机工作的时钟源来自内部三个时钟或者外部输入时钟,由SSEL1、SSEL0,以决定最终进入模块的时钟信号BRCLK的频率。
所以配置串行通讯的第一步就是选择时钟。
通过选择时钟源和波特率寄存器的数据来确定位周期。
所以波特率的配置是串行通讯中最重要的一部分。
波特率设置用三个寄存器实现:UxBR0(选择控制器0):波特率发生器分频系数低8位。
UxBR1(选择控制器1):波特率发生器分频系数高8位。
UxMCTL 数据传输的格式,以及数据传输的模式是通过配置控制寄存器UCTL来进行设置。
接收控制部分和发送控制部分。
首先需要串行口进行配置、使能以及开启中断。
串口接收数据一般采用中断方式,发送数据采用主动发送。
当接收到一个完整的数据,产生一个信号:URXIFG0=1(类似于51单片机的接收中断标志位),表示接收完整的数据。
当数据正在发送中,UTXIFG0=1,此时不能再发送数据,必须等当前数据发送完毕(UTXIFG0=0)才能进行发送。
数字式频率计一、设计概述在电子技术中,频率是最基本的参数之一,数字频率计具有精度高、使用方便、测量迅速、以及便于实现测量过程自动化等优点,是近代电子技术领域的重要工具之一,在许多领域得到广泛应用。
本系统以超低功耗MSP430G2553单片机为核心处理芯片来测量信号的频率,通过定时器A 采用计数法完成信号频率测量,并将被测频率值通过LCD12864液晶串行显示。
频率可测量范围在1Hz 到999MHz 之间。
如需要,范围可继续扩宽,频率计的误差在1%以内。
二、原理图基于MSP430G2553的频率计设计原理图如图1所示,通过串口方式液晶显示,只需配置单片机三个口线便可以实现对频率的测量。
其中待测频率信号从P1.0口输入,然后可以直接在液晶屏上显示。
三、引脚说明(一)MSP430G2553引脚功能说明由原理图可以看出,430单片机的最小系统用到1脚电源、16脚复位端、20脚接地端、配置P1.0口为待测信号输入端,P1.4为串行数据输出口,P1.5为串行时钟输出口,如表1所示。
图1 基于MSP430G2553频率计设计原理图表1 MSP430G2553引脚功能说明引脚序号引脚名称功能说明备注1 VCC 电源正2 P1.0 频率信号输入端6 P1.4 串行数据输出端7 P1.6 串行时钟输出端16 RST 复位脚20 GND 电源地(二)LCD12864引脚功能说明LCD12864液晶显示屏用到1、2脚,电源接口线,19、20脚背光电源接口线,15脚并行/串行接口选择,5脚串行数据口,6脚串行的同步时钟。
LCD12864引脚功能如表2所示。
表2 LCD12864接口说明引脚序号引脚名称功能说明备注1 VSS 模块的电源地2 VDD 模块的电源正端4 RS(CS) 并行指令/数据选择信号;串行片选信号5 R/W(SID) 并行读写选择信号;串行的数据口6 E(CLK) 并行使能信号;串行的同步时钟15 PSB PSB并/串行接口选择:H-并行,L-串行19 LED_A 背光源正极20 LED_K 背光源负极(0V)四、软件设计流程图系统软件设计包括初始化模块、中断模块和信号频率显示模块。
54MSP430 G2553 学习笔记一,MSP430G2553单片机的各个功能模块(一),IO口模块,1,我们所用的MSP430G2553有两组IO口,P1和P2。
2,IO口的寄存器有:方向选择寄存器PxDIR,输出寄存器PxOUT,输入寄存器PxIN,IO口内部上拉或下拉电阻使能寄存器PxREN, IO口功能选择寄存器PxSEL和PxSEL2,IO口中断使能寄存器PxIE,中断沿选择寄存器PxIES,IO口中断标志寄存器PxIFG。
3,所有的IO都带有中断,其中所有的P1口公用一个中断向量,所有的P2口公用一个中断向量。
所以在使用中断时,当进入中断后,还要判断到底是哪一个IO口产生的中断,判断方法可以是判断各个IO口的电平。
4,中断标志PxIFG需要软件清除,也可以用软件置位,从而用软件触发一个中断。
注意:在设置PxIESx时根据PxINx有可能会引起相应的PxIFGx置位(具体的情况见用户指南),所以在初始化完IO口中断以后,正式使用IO 中断前要先将对应的PxIFGx清零。
程序如下:void IO_interrupt_init() //IO中断初始化函数{P1REN |= BIT4+BIT5+BIT6+BIT7; // pullup 内部上拉电阻使能//使用中断时,使能内部的上拉电阻这样当该脚悬空时,电平不会跳变,防止悬空时电平跳变不停的触发中断 P1OUT = BIT4+BIT5+BIT6+BIT7; // 当引脚上的上拉或下拉电阻使能时,PxOUT选择是上拉还是下来//0:下拉,1:上拉P1IE |= BIT4+BIT5+BIT6+BIT7; // interrupt enabled P13中断使能P1IES |= BIT4+BIT5+BIT6+BIT7; // Hi/lo edge 下降沿中断//P1IES &= ~BIT3; //上升沿触发中断P1IFG &= ~(BIT4+BIT5+BIT6+BIT7); //中断标志位清零}5,PxOUT:如果引脚选择了内部的上拉或下拉电阻使能,则PxOUT设定电阻是上拉还是下拉,0:下拉,1:上拉 6,当IO口不用时,最好不要设为输入,且为浮动状态(这是IO口的默认状态),因为当输入为浮动时,输入电压有可能会在VIL和VIH之间,这样会产生击穿电流。