getting started with msp430

28 1.9K 0
getting started with msp430

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

July 1999 Mixed-Signal Products User’s Guide SLAU028 IMPORTANT NOTICE Texas Instruments and its subsidiaries (TI) reserve the right to make changes to their products or to discontinue any product or service without notice, and advise customers to obtain the latest version of relevant information to verify, before placing orders, that information being relied on is current and complete. All products are sold subject to the terms and conditions of sale supplied at the time of order acknowledgement, including those pertaining to warranty, patent infringement, and limitation of liability. TI warrants performance of its semiconductor products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are utilized to the extent TI deems necessary to support this warranty. Specific testing of all parameters of each device is not necessarily performed, except those mandated by government requirements. CERTAIN APPLICATIONS USING SEMICONDUCTOR PRODUCTS MAY INVOLVE POTENTIAL RISKS OF DEATH, PERSONAL INJURY, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE (“CRITICAL APPLICATIONS”). TI SEMICONDUCTOR PRODUCTS ARE NOT DESIGNED, AUTHORIZED, OR WARRANTED TO BE SUITABLE FOR USE IN LIFE-SUPPORT DEVICES OR SYSTEMS OR OTHER CRITICAL APPLICATIONS. INCLUSION OF TI PRODUCTS IN SUCH APPLICATIONS IS UNDERSTOOD TO BE FULLY AT THE CUSTOMER’S RISK. In order to minimize risks associated with the customer’s applications, adequate design and operating safeguards must be provided by the customer to minimize inherent or procedural hazards. TI assumes no liability for applications assistance or customer product design. TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or other intellectual property right of TI covering or relating to any combination, machine, or process in which such semiconductor products or services might be or are used. TI’s publication of information regarding any third party’s products or services does not constitute TI’s approval, warranty or endorsement thereof. Copyright  1999, Texas Instruments Incorporated Information About Cautions and Warnings iii Read This First Preface Read This First About This Manual This document describes the procedures for how to get started using the MSP430 controller, hardware, and simulator. It looks at code and explains running out of RAM, debugging with HyperTerminal, and programming the MSP430 EPROM. The manual assumes that you have set up the Windows operating environ- ment and that you are familiar with the basic terminology and procedures for using Microsoft Windows. To set up Windows or review basic Windows infor- mation, see your Windows documentation. How to Use This Manual This document contains the following chapters: Chapter 1 Getting Started With the MSP430 Controller Chapter 2 Getting Started With the Hardware Chapter 3 Using the Simulator Chapter 4 The MSP430 Code Chapter 5 Running Out of RAM and Debugging with HyperTerminal Chapter 6 Programming the MSP430 EPROM Information About Cautions and Warnings This book may contain cautions and warnings. This is an example of a caution statement. A caution statement describes a situation that could potentially damage your software or equipment. This is an example of a warning statement. A warning statement describes a situation that could potentially cause harm to you . Related Documentation From Texas Instruments iv The information in a caution or a warning is provided for your protection. Please read each caution and warning carefully. Related Documentation From Texas Instruments MSP430 Family Architecture Guide and Module Library, 1996, SLAUE10B MSP430 Application Report, 1998, SLAAE10C Data Sheet MSP430x11x, 1999, SLAS196A Data Sheet MSP430x31x, 1999, SLAS165C Data Sheet MSP430x32x, 1999, SLAS219 Data Sheet MSP430x33x, 1998, SLAS163 MSP430 Family STK/EVK Manual, (releasing) 1999, SLAS191 MSP430 Simulation Manual, (releasing) 1999, SLAA055 MSP430 LCD–Editor Manual , (releasing) 1999, SLAU027 MSP430 Family Software User’s Guide 1994, SLAUE11 MSP430 Family Assembly Language Tools User’s Guide , 1994, SLAUE12 MSP430 Family Programming Adapter Manual , (releasing) 1999, SLAU026 Running Title—Attribute Reference v Chapter Title—Attribute Reference Contents 1 Getting Started With the MSP430 Controller 1-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1 Getting Started 1-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Getting Started With the Hardware 2-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 The LCD 2-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 The EPROM versus OTP Devices 2-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Connecting the Hardware 2-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Using the Simulator 3-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 The MSP430 Code 4-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Running Out of RAM and Debugging with HyperTerminal 5-1. . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Programming the MSP430 ROM 6-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1 Programming on the STK/EVK 6-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.1 Programming a Blank OTP or EPROM 6-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.2 Resetting the STK Monitor Code to a Specified Program 6-2. . . . . . . . . . . . . . . . . 6.1.3 Resetting the EVK Monitor Code to a Specified Program 6-4. . . . . . . . . . . . . . . . . 6.2 Programming on Another Target Board 6-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running Title—Attribute Reference vi Acknowledgement Many thanks to Richard Baker, Mark Buccini, Brian Merritt, John Morgan and Dale Wellborn for their support with this user’s guide. 1-1 Getting Started With the MSP430 Controller Getting Started With the MSP430 Controller This user’s guide is intended as an easy-to-use guide for the MSP430 family. The designer should use this manual with the references cited throughout the document. This is not intended to be a standalone document for the MSP430 family. The documentation for the MSP430 family is written for use with any MSP430 family members. The manuals contain sections and pinouts for future growth of the product line. Refer to the datasheet that corresponds to the MSP430 family member being used to be sure of the correct pinout, number of ADC channels, number of LCD segments, and peripheral set. This manual will show how to assemble source files from within the assembler. These files will then be run on the simulator to demonstrate the correct operation; then the files will be downloaded to the target hardware and run. This manual refers to HyperTerminal and monitor programs. The HyperTerminal program was written by Hilgraeve and is included with Microsoft Windows. The monitor program, RS-232 software written by Texas Instruments, allows the HyperTerminal program to communicate and download files to the MSP430 parts. Topic Page 1.1 Getting Started 1–2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 1 Getting Started 1-2 1.1 Getting Started If you are already familiar with embedded systems and evaluation boards, fol- low these steps; otherwise begin with Chapter 2. 1) If you have an EVK, solder the LCD in place (refer to the LCD section for the orientation for soldering) and place the labeled UVEPROM in the sock- et. An STK comes with the OTP part already soldered on and the LCD installed. 2) Plug one end of the ribbon cable into the board and the other end into the COM port of the computer. 3) Install the software by running setup.exe on the Development Tools Disk 1 and following the instructions. 4) Start the simulator by double clicking on the Simulation Environment icon. 5) Follow the steps outlined in the Simulation Environment and LCD–Editor Manual in Chapter 3 that explain how to open, configure, and build a proj- ect file. To enable the LCD simulation environment click on Options/LCD setup, then be sure that the filename c:\adt430\dt430\examples\demo.lcd is in the window, unless another file is desired. Click on ok then go to the Window/LCD button and click on LCD. 6) After you have completed debugging the program using the simulator, be sure to go to Options/Project/Assembler (See the Options Menu in the Simulation Environment and LCD-Editor Manual ) and be sure that the Generate Text Object file box is checked. Generate a *.txt file by using the Project/Rebuild All button. 7) The program may then be either tested using HyperTerminal to download and run out of RAM or programmed directly in the EPROM of the part using the MSP430 programing adapter and executed. For instructions on using HyperTerminal, refer to the Starter Kit/Evaluation Kit Manual . Once the OTP (one time programmable) has had the program downloaded to the ROM, it may not be programmed again. 8) There are three ways to program the MSP430 EPROM parts. 1) To program the MSP430 EPROM, click on the Programming Adapter icon for the EVK or follow the instructions given in the Starter Kit/Evaluation Kit Manual for the STK in the Chapter The Identification Bit Pattern AA55h . Programming Adapter instructions are located in the MSP430 Family Programming Adapter Manual . 2) Using the serial port. Refer to STK/EVK Manual 3) Using third party vendor tools Getting Started 1-3 Getting Started With the MSP430 Controller Note: The programmer can use third party vendor tools to debug and program the MSP430 parts. Refer to the TI MSP430 website for a complete list of these vendors and links to their website. This website also contains software and application reports that are downloadable at http://www.ti.com/sc/msp430 1-4 [...]... installing this software Note: Only the EVK comes with the LCD-editor software Once the software has been installed, double click on the Simulation Environment icon To begin to use the simulator, choose a project Refer to the MSP430 Simulation Environment and LCD-Editor Manual Getting Started chapter for more detailed instructions on using the simulator The MSP430 LCD editor allows users to create custom... 2–2 2.3 Connecting the Hardware 2–2 Getting Started With the Hardware 2-1 The LCD 2.1 The LCD If no LCD is needed for the application, this step may be omitted The LCD will not be installed when you receive your EVK board so that the board can be used with another vendor’s LCD The user must solder the LCD in place Solder the LCD so that it hangs... the MSP430 website or the MSP430 Family Application Report Book All code should contain at a minimum: - A memory mapping section A setup or initialization section The main body of code An interrupt vector table The STK/EVK boards are memory mapped differently between the family of parts and the simulator Refer to a datasheet for the program memory map for a specific MSP430 device An example for the MSP430x325... shown below MSP430C323 FFFFh FFE0h FFDFh Int Vector MSP430P/E325 FFFFh FFE0h FFDFh Int Vector MSP430C325 FFFFh FFE0h FFDFh Int Vector 8 kB EPROM 16 kB OPT E000h C000h C000h 02FFh 0200h 01FFh 0100h 00FFh 0010h 000Fh 0000h 256B RAM 16b Per 8b Per SFR 03FFh 0200h 01FFh 0100h 00FFh 0010h 000Fh 0000h 16 kB EPROM 512B RAM 16b Per 8b Per SFR 03FFh 0200h 01FFh 0100h 00FFh 0010h 000Fh 0000h The MSP430 Code...Chapter 2 Getting Started With the Hardware Refer to the Starter Kit/Evaluation Kit Manual appendix, Difference Between STK and EVK The included table shows what the differences are between the kits Topic Page 2.1 The LCD... supplied with the EVK/STK kits Enable the LCD simulation environment by going to Options/LCD setup Be sure that the file name c:\adt430\dt430\examples\demo.lcd is in the box (unless there is another *.lcd file required that matches the LCD of choice) After clicking ok, go to the Window/LCD button and click LCD An LCD window appears on the desktop Using the Simulator 3-1 3-2 Chapter 4 The MSP430 Code MSP430. .. have the correct version of HyperTerminal HyperTerminal that comes with Windows ’98 is suspect Download Windows ’95 HyperTerminal.exe and HyperTerminal.dll files and retry this procedure Running Out of RAM and Debugging with HyperTerminal 5-1 After communication between the STK/EVK and computer has been established, double click on the MSP430 Terminal icon Use the Transfer/Send Text File to transfer... position in TCCTL SSEL0 equ 80h ;bit position in TCCTL 4-2 An additional register definition file can be found on the MSP430 website This file is called STD_DEF.asm and can be included in your code by using the include statement The address in the source code must be correct, depending on what MSP430 family member you are using ;––––––––––––––––––––––––––––––––––––– ; Mainloop ;–––––––––––––––––––––––––––––––––––––... Loop ; Users routine with interrupts here ; Again An example of the interrupt vector table is shown below In this example an interrupt routine is called for the basic timer ;––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– ; Interrupt vectors ;––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– sect ”I_Vectors”,I_vectors–31 ; From MSP430P325 Family... handler word RESET ; P0.0 word RESET ; NMI, Osc fault word RESET ; POR, ext Reset, Watchdog sect”Int_Code”,User_End–22h word #0aa55h ; if aa55h then User_Start end ; The MSP430 Code 4-3 4-4 Chapter 5 Running Out of RAM and Debugging with HyperTerminal Once a program works error free on the simulator, it is downloaded to the RAM via HyperTerminal To download a file, create a *.txt file To create *.txt . support with this user’s guide. 1-1 Getting Started With the MSP430 Controller Getting Started With the MSP430 Controller This user’s guide is intended as an easy-to-use guide for the MSP430. 1 Getting Started With the MSP430 Controller Chapter 2 Getting Started With the Hardware Chapter 3 Using the Simulator Chapter 4 The MSP430 Code Chapter 5 Running Out of RAM and Debugging with. located in the MSP430 Family Programming Adapter Manual . 2) Using the serial port. Refer to STK/EVK Manual 3) Using third party vendor tools Getting Started 1-3 Getting Started With the MSP430 Controller Note: The

Ngày đăng: 16/10/2014, 09:23

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan