The MSP430 microcontroller family offers ultra-low power mixed signal, 16-bit architecture that is perfect for wireless low-power industrial and portable medical applications. This book begins with an overview of embedded systems and microcontrollers followed by a comprehensive in-depth look at the MSP430. The coverage included a tour of the microcontroller's architecture and functionality along with a review of the development environment. Start using the MSP430 armed with a complete understanding of the microcontroller and what you need to get the microcontroller up and running!
- Details C and assembly language for the MSP430
- Companion Web site contains a development kit
- Full coverage is given to the MSP430 instruction set, and sigma-delta analog-digital converters and timers
Inhaltsverzeichnis
1;Front Cover;1 2;MSP430 Microcontroller Basics;4 3;Copyright Page;5 4;Table of Contents;8 5;Preface;12 6;Chapter 1. Embedded Electronic Systems and Microcontrollers;18 6.1;1.1 What (and Where) Are Embedded Systems?;18 6.2;1.2 Approaches to Embedded Systems;19 6.3;1.3 Small Microcontrollers;22 6.4;1.4 Anatomy of a Typical Small Microcontroller;25 6.5;1.5 Memory;28 6.6;1.6 Software;32 6.7;1.7 Where Does the MSP430 Fit?;33 7;Chapter 2. The Texas Instruments MSP430;38 7.1;2.1 The Outside ViewPin-Out;38 7.2;2.2 The Inside ViewFunctional Block Diagram;41 7.3;2.3 Memory;42 7.4;2.4 Central Processing Unit;47 7.5;2.5 Memory-Mapped Input and Output;49 7.6;2.6 Clock Generator;50 7.7;2.7 Exceptions: Interrupts and Resets;53 7.8;2.8 Where to Find Further Information;54 8;Chapter 3. Development;60 8.1;3.1 Development Environment;61 8.2;3.2 The C Programming Language;63 8.3;3.3 Assembly Language;72 8.4;3.4 Access to the Microcontroller for Programming and Debugging;74 8.5;3.5 Demonstration Boards;76 8.6;3.6 Hardware;81 8.7;3.7 Equipment;82 9;Chapter 4. A Simple Tour of the MSP430;84 9.1;4.1 First Program on a Conventional Desktop Computer;85 9.2;4.2 Light LEDs in C;87 9.3;4.3 Light LEDs in Assembly Language;89 9.4;4.4 Read Input from a Switch;97 9.5;4.5 Automatic Control: Flashing Light by Software Delay;108 9.6;4.6 Automatic Control: Use of Subroutines;116 9.7;4.7 Automatic Control: Flashing a Light by Polling Timer_A;122 9.8;4.8 Header Files and Issues Brushed under the Carpet;131 10;Chapter 5. Architecture of the MSP430 Processor;136 10.1;5.1 Central Processing Unit;136 10.2;5.2 Addressing Modes;142 10.3;5.3 Constant Generator and Emulated Instructions;148 10.4;5.4 Instruction Set;149 10.5;5.5 Examples;163 10.6;5.6 Reflections on the CPU and Instruction Set;170 10.7;5.7 Resets;174 10.8;5.8 Clock System;180 11;Chapter 6. Functions, Interrupts, and Low-Power Modes;194 11.1;6.1 Functions and Subroutines;195 11.2;6.2 What Happens when a Subroutine Is Called?;195 11.3;6.3 Storage f
or Local Variables;196 11.4;6.4 Passing Parameters to a Subroutine and Returning a Result;200 11.5;6.5 Mixing C and Assembly Language;202 11.6;6.6 Interrupts;203 11.7;6.7 What Happens when an Interrupt Is Requested?;205 11.8;6.8 Interrupt Service Routines;207 11.9;6.9 Issues Associated with Interrupts;213 11.10;6.10 Low-Power Modes of Operation;215 12;Chapter 7. Digital Input, Output, and Displays;224 12.1;7.1 Digital Input and Output: Parallel Ports;225 12.2;7.2 Digital Inputs;233 12.3;7.3 Switch Debounce;242 12.4;7.4 Digital Outputs;255 12.5;7.5 Interface between 3V and 5V Systems;260 12.6;7.6 Driving Heavier Loads;264 12.7;7.7 Liquid Crystal Displays;269 12.8;7.8 Driving an LCD from an MSP430x4xx;273 12.9;7.9 Simple Applications of the LCD;281 13;Chapter 8. Timers;292 13.1;8.1 Watchdog Timer;293 13.2;8.2 Basic Timer1;298 13.3;8.3 Timer_A;304 13.4;8.4 Measurement in the Capture Mode;317 13.5;8.5 Output in the Continuous Mode;335 13.6;8.6 Output in the Up Mode: Edge-Aligned Pulse-Width Modulation;347 13.7;8.7 Output in the Up/Down Mode: Centered Pulse-Width Modulation;366 13.8;8.8 Operation of Timer_A in the Sampling Mode;369 13.9;8.9 Timer_B;370 13.10;8.10 What Timer Where?;373 13.11;8.11 Setting the Real-Time Clock: State Machines;374 14;Chapter 9. Mixed-Signal Systems: Analog Input and Output;386 14.1;9.1 Comparator_A;388 14.2;9.2 Analog-to-Digital Conversion: General Issues;410 14.3;9.3 Analog-to-Digital Conversion: Successive Approximation;419 14.4;9.4 The ADC10 Successive-Approximation ADC;424 14.5;9.5 Basic Operation of the ADC10;429 14.6;9.6 More Advanced Operation of the ADC10;441 14.7;9.7 The ADC12 Successive-Approximation ADC;449 14.8;9.8 Analog-to-Digital Conversion: SigmaDelta;455 14.9;9.9 The SD16_A SigmaDelta ADC;463 14.10;9.10 Operation of SD16_A;476 14.11;9.11 Signal Conditioning and Operational Amplifiers;492 14.12;9.12 Digital-to-Analog Conversion;502 15;Chapter 10. Communication;510 15.1;10.1 Communication Peripherals in the MSP430;512 15.2;10.2
Serial Peripheral Interface;514 15.3;10.3 SPI with the USI;521 15.4;10.4 SPI with the USCI;530 15.5;10.5 A Thermometer Using SPI in Mode 3 with the F2013 as Master;537 15.6;10.6 A Thermometer Using SPI in Mode 0 with the FG4618 as Master;543 15.7;10.7 Inter-integrated Circuit Bus;551 15.8;10.8 A Simple IC Master with the USCI_B0 on a FG4618;559 15.9;10.9 A Simple IC Slave with the USI on a F2013;566 15.10;10.10 State Machines for IC Communication;576 15.11;10.11 A Thermometer Using IC with the F2013 as Master;584 15.12;10.12 Asynchronous Serial Communication;591 15.13;10.13 Asynchronous Communication with the USCI_A;598 15.14;10.14 A Software UART Using Timer_A;607 15.15;10.15 Other Types of Communication;616 16;Chapter 11. The Future: MSP430X;618 16.1;11.1 Architecture of the MSP430X;618 16.2;11.2 Instruction Set of the MSP430X;624 16.3;11.3 Where Next?;631 16.4;11.4 Conclusion;634 17;Appendix A: Kickstarting the MSP430;636 17.1;A.1 Introduction to EW430;636 17.2;A.2 Developing a Project in C;638 17.3;A.3 Debugging with the Simulator;644 17.4;A.4 Debugging with the Emulator;647 17.5;A.5 Developing a Project in Assembly Language;650 17.6;A.6 Tips for Using EW430;653 17.7;A.7 Tips for Specific Development Kits;657 18;Appendix B: Further Reading;662 18.1;Books and Articles;662 18.2;Newsletters, Magazines, and Journals;668 19;Index;672