Texas Instruments MSP430x4xx - Manuals
Texas Instruments MSP430x4xx – Manual in PDF format online.
Manuals:
Manual Texas Instruments MSP430x4xx
Summary
Related Documentation From Texas Instruments iii Preface Read This First About This Manual This manual discusses modules and peripherals of the MSP430x4xx family ofdevices. Each discussion presents the module or peripheral in a generalsense. Not all features and functions of all modules or periphera...
Glossary iv Glossary ACLK Auxiliary Clock See Basic Clock Module ADC Analog-to-Digital Converter BOR Brown-Out Reset See System Resets, Interrupts, and Operating Modes BSL Bootstrap Loader See www.ti.com/msp430 for application reports CPU Central Processing Unit See RISC 16-Bit CPU DAC Digital-to-An...
Register Bit Conventions v Register Bit Conventions Each register is shown with a key indicating the accessibility of the eachindividual bit, and the initial condition: Register Bit Accessibility and Initial Condition Key Bit Accessibility rw Read/write r Read only r0 Read as 0 r1 Read as 1 w Write ...
Contents vii Contents 1 Introduction 1-1 1.1 Architecture 1-2 1.2 Flexible Clock System 1-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Embedded Emulation 1-3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....
Contents viii 3.3.5 Indirect Register Mode 3-14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.6 Indirect Autoincrement Mode 3-15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.7 Immediate Mode 3-16 . . . . . . . . ....
Contents ix 7 Hardware Multiplier 7-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1 Hardware Multiplier Introduction 7-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2 Har...
Contents x 11 Basic Timer1 11-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.1 Basic Timer1 Introduction 11-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...
Contents xi 15 USART Peripheral Interface, SPI Mode 15-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.1 USART Introduction: SPI Mode 15-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.2 USART Operation: SPI Mode...
1-1 Introduction Introduction This chapter describes the architecture of the MSP430. Topic Page 1.1 Architecture 1-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Flexible Clock System 1-2 . . . . . . . . . . . . . . . . . . . . . . . . . . ....
Architecture 1-2 Introduction 1.1 Architecture The MSP430 incorporates a 16-bit RISC CPU, peripherals, and a flexible clocksystem that interconnect using a von-Neumann common memory addressbus (MAB) and memory data bus (MDB). Partnering a modern CPU withmodular memory-mapped analog and digital perip...
Embedded Emulation 1-3 Introduction Figure 1−1. MSP430 Architecture ACLK Bus Conv. Peripheral MAB 16-Bit MDB 16-Bit MCLK SMCLK Clock System Peripheral Peripheral Peripheral Peripheral Peripheral Peripheral Watchdog RAM Flash/ RISC CPU 16-Bit JT AG/Debug ACLK SMCLK ROM MDB 8-Bit JTAG 1.3 Embedded Emu...
Address Space 1-4 Introduction 1.4 Address Space The MSP430 von-Neumann architecture has one address space shared withspecial function registers (SFRs), peripherals, RAM, and Flash/ROM memoryas shown in Figure 1−2. See the device-specific data sheets for specificmemory maps. Code access are always p...
Address Space 1-5 Introduction 1.4.3 Peripheral Modules Peripheral modules are mapped into the address space. The address spacefrom 0100 to 01FFh is reserved for 16-bit peripheral modules. These modulesshould be accessed with word instructions. If byte instructions are used, onlyeven addresses are p...
2-1 System Resets, Interrupts, and Operating Modes System Resets, Interrupts, and Operating Modes This chapter describes the MSP430x4xx system resets, interrupts, andoperating modes. Topic Page 2.1 System Reset and Initialization 2-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...
System Reset and Initialization 2-3 System Resets, Interrupts, and Operating Modes 2.1.1 Brownout Reset (BOR) All MSP430x4xx devices have a brownout reset circuit. The brownout resetcircuit detects low supply voltages such as when a supply voltage is appliedto or removed from the V CC terminal. The ...
System Reset and Initialization 2-4 System Resets, Interrupts, and Operating Modes 2.1.2 Device Initial Conditions After System Reset After a POR, the initial MSP430 conditions are: - The RST/NMI pin is configured in the reset mode. - I/O pins are switched to input mode as described in the Digital I...
System Reset and Initialization 2-5 System Resets, Interrupts, and Operating Modes 2.2 Interrupts The interrupt priorities are fixed and defined by the arrangement of themodules in the connection chain as shown in Figure 2−3. The nearer a moduleis to the CPU/NMIRS, the higher the priority. Interrupt...
System Reset and Initialization 2-6 System Resets, Interrupts, and Operating Modes 2.2.1 (Non)-Maskable Interrupts (NMI) (Non)-maskable NMI interrupts are not masked by the general interrupt enablebit (GIE), but are enabled by individual interrupt enable bits (ACCVIE, NMIIE,OFIE). When a NMI interru...
System Reset and Initialization 2-8 System Resets, Interrupts, and Operating Modes Oscillator Fault The oscillator fault signal warns of a possible error condition with the crystaloscillator. The oscillator fault can be enabled to generate an NMI interrupt bysetting the OFIE bit. The OFIFG flag can ...
System Reset and Initialization 2-9 System Resets, Interrupts, and Operating Modes Example of an NMI Interrupt Handler The NMI interrupt is a multiple-source interrupt. An NMI interrupt automaticallyresets the NMIIE, OFIE and ACCVIE interrupt-enable bits. The user NMIservice routine resets the inter...
System Reset and Initialization 2-10 System Resets, Interrupts, and Operating Modes Each individual peripheral interrupt is discussed in the associated peripheralmodule chapter in this manual. 2.2.3 Interrupt Processing When an interrupt is requested from a peripheral and the peripheral interruptena...
System Reset and Initialization 2-11 System Resets, Interrupts, and Operating Modes Return From Interrupt The interrupt handling routine terminates with the instruction: RETI (return from an interrupt service routine) The return from the interrupt takes 5 cycles to execute the following actionsand i...
System Reset and Initialization 2-12 System Resets, Interrupts, and Operating Modes 2.2.4 Interrupt Vectors The interrupt vectors and the power-up starting address are located in theaddress range 0FFFFh − 0FFE0h as described in Table 2−1. A vector isprogrammed by the user with the 16-bit address of ...
Operating Modes 2-13 System Resets, Interrupts, and Operating Modes 2.3 Operating Modes The MSP430 family is designed for ultralow-power applications and usesdifferent operating modes shown in Figure 2−9. The operating modes take into account three different needs: - Ultralow-power - Speed and data ...
Operating Modes 2-14 System Resets, Interrupts, and Operating Modes Figure 2−9. MSP430x4xx Operating Modes For Basic Clock System Active Mode CPU Is Active Peripheral Modules Are Active LPM0 CPU Off, FLL+ On, MCLK On, ACLK On CPUOFF = 1 SCG0 = 0SCG1 = 0 CPUOFF = 1 SCG0 = 1SCG1 = 0 LPM2 CPU Off, FLL+...
Operating Modes 2-15 System Resets, Interrupts, and Operating Modes 2.3.1 Entering and Exiting Low-Power Modes An enabled interrupt event wakes the MSP430 from any of the low-poweroperating modes. The program flow is: - Enter interrupt service routine: J The PC and SR are stored on the stack J The C...
Principles for Low - Power Applications 2-16 System Resets, Interrupts, and Operating Modes 2.4 Principles for Low - Power Applications Often, the most important factor for reducing power consumption is using theMSP430’s clock system to maximize the time in LPM3. LPM3 powerconsumption is less than 2...
3-1 RISC 16-Bit CPU This chapter describes the MSP430 CPU, addressing modes, and instructionset. Topic Page 3.1 CPU Introduction 3-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 CPU Registers 3-4 . . . . . . . . . . . . . . . . . . . . . . . . . . ....
CPU Introduction 3-3 RISC 16-Bit CPU Figure 3−1. CPU Block Diagram 0 15 MDB − Memory Data Bus Memory Address Bus − MAB 16 Zero, ZCarry, COverflow, VNegative, N 16−bit ALU dst src R8 General Purpose R9 General Purpose R10 General Purpose R11 General Purpose R12 General Purpose R13 General Purpose R14...
CPU Registers 3-4 RISC 16-Bit CPU 3.2 CPU Registers The CPU incorporates sixteen 16-bit registers. R0, R1, R2 and R3 havededicated functions. R4 to R15 are working registers for general use. 3.2.1 Program Counter (PC) The 16-bit program counter (PC/R0) points to the next instruction to beexecuted. E...
CPU Registers 3-5 RISC 16-Bit CPU 3.2.2 Stack Pointer (SP) The stack pointer (SP/R1) is used by the CPU to store the return addressesof subroutine calls and interrupts. It uses a predecrement, postincrementscheme. In addition, the SP can be used by software with all instructions andaddressing modes....
CPU Registers 3-6 RISC 16-Bit CPU 3.2.3 Status Register (SR) The status register (SR/R2), used as a source or destination register, can beused in the register mode only addressed with word instructions. The remain-ing combinations of addressing modes are used to support the constant gen-erator. Figu...
CPU Registers 3-7 RISC 16-Bit CPU 3.2.4 Constant Generator Registers CG1 and CG2 Six commonly-used constants are generated with the constant generatorregisters R2 and R3, without requiring an additional 16-bit word of programcode. The constants are selected with the source-register addressing modes(...
CPU Registers 3-8 RISC 16-Bit CPU 3.2.5 General−Purpose Registers R4 - R15 The twelve registers, R4−R15, are general-purpose registers. All of theseregisters can be used as data registers, address pointers, or index values andcan be accessed with byte or word instructions as shown in Figure 3−7. Fig...
Addressing Modes 3-9 RISC 16-Bit CPU 3.3 Addressing Modes Seven addressing modes for the source operand and four addressing modesfor the destination operand can address the complete address space with noexceptions. The bit numbers in Table 3−3 describe the contents of the As(source) and Ad (destinat...
Addressing Modes 3-10 RISC 16-Bit CPU 3.3.1 Register Mode The register mode is described in Table 3−4. Table 3−4. Register Mode Description Assembler Code Content of ROM MOV R10,R11 MOV R10,R11 Length: One or two words Operation: Move the content of R10 to R11. R10 is not affected. Comment: Valid fo...
Addressing Modes 3-11 RISC 16-Bit CPU 3.3.2 Indexed Mode The indexed mode is described in Table 3−5. Table 3−5. Indexed Mode Description Assembler Code Content of ROM MOV 2(R5),6(R6) MOV X(R5),Y(R6) X = 2 Y = 6 Length: Two or three words Operation: Move the contents of the source address (contents o...
Addressing Modes 3-12 RISC 16-Bit CPU 3.3.3 Symbolic Mode The symbolic mode is described in Table 3−6. Table 3−6. Symbolic Mode Description Assembler Code Content of ROM MOV EDE,TONI MOV X(PC),Y(PC) X = EDE − PC Y = TONI − PC Length: Two or three words Operation: Move the contents of the source addr...
Addressing Modes 3-13 RISC 16-Bit CPU 3.3.4 Absolute Mode The absolute mode is described in Table 3−7. Table 3−7. Absolute Mode Description Assembler Code Content of ROM MOV &EDE,&TONI MOV X(0),Y(0) X = EDE Y = TONI Length: Two or three words Operation: Move the contents of the source addres...
Addressing Modes 3-14 RISC 16-Bit CPU 3.3.5 Indirect Register Mode The indirect register mode is described in Table 3−8. Table 3−8. Indirect Mode Description Assembler Code Content of ROM MOV @R10,0(R11) MOV @R10,0(R11) Length: One or two words Operation: Move the contents of the source address (con...
Addressing Modes 3-15 RISC 16-Bit CPU 3.3.6 Indirect Autoincrement Mode The indirect autoincrement mode is described in Table 3−9. Table 3−9. Indirect Autoincrement Mode Description Assembler Code Content of ROM MOV @R10+,0(R11) MOV @R10+,0(R11) Length: One or two words Operation: Move the contents ...
Addressing Modes 3-16 RISC 16-Bit CPU 3.3.7 Immediate Mode The immediate mode is described in Table 3−10. Table 3−10. Immediate Mode Description Assembler Code Content of ROM MOV #45h,TONI MOV @PC+,X(PC) 45 X = TONI − PC Length: Two or three wordsIt is one word less if a constant of CG1 or CG2 can b...
Instruction Set 3-17 RISC 16-Bit CPU 3.4 Instruction Set The complete MSP430 instruction set consists of 27 core instructions and 24emulated instructions. The core instructions are instructions that have uniqueop-codes decoded by the CPU. The emulated instructions are instructions thatmake code easi...
Instruction Set 3-18 RISC 16-Bit CPU 3.4.1 Double-Operand (Format I) Instructions Figure 3−9 illustrates the double-operand instruction format. Figure 3−9. Double Operand Instruction Format B/W D-Reg 15 0 Op-code Ad S-Reg 8 7 14 13 12 11 10 9 6 5 4 3 2 1 As Table 3−11 lists and describes the double ...
Instruction Set 3-19 RISC 16-Bit CPU 3.4.2 Single-Operand (Format II) Instructions Figure 3−10 illustrates the single-operand instruction format. Figure 3−10. Single Operand Instruction Format B/W D/S-Reg 15 0 Op-code 8 7 14 13 12 11 10 9 6 5 4 3 2 1 Ad Table 3−12 lists and describes the single oper...
Instruction Set 3-20 RISC 16-Bit CPU 3.4.3 Jumps Figure 3−11 shows the conditional-jump instruction format. Figure 3−11. Jump Instruction Format C 10-Bit PC Offset 15 0 Op-code 8 7 14 13 12 11 10 9 6 5 4 3 2 1 Table 3−13 lists and describes the jump instructions. Table 3−13. Jump Instructions Mnemon...
Instruction Set 3-33 RISC 16−Bit CPU * CLRZ Clear zero bit Syntax CLRZ Operation 0 → Z or(.NOT.src .AND. dst −> dst) Emulation BIC #2,SR Description The constant 02h is inverted (0FFFDh) and logically ANDed with thedestination operand. The result is placed into the destination. The clear zerobit ...
Instruction Set 3-37 RISC 16−Bit CPU * DEC[.W] Decrement destination * DEC.B Decrement destination Syntax DEC dst or DEC.W dst DEC.B dst Operation dst − 1 −> dst Emulation SUB #1,dst Emulation SUB.B #1,dst Description The destination operand is decremented by one. The original contents arelost. S...
Instruction Set 3-48 RISC 16−Bit CPU JMP Jump unconditionally Syntax JMP label Operation PC + 2 × offset −> PC Description The 10-bit signed offset contained in the instruction LSBs is added to theprogram counter. Status Bits Status bits are not affected. Hint: This one-word instruction replaces ...
Instruction Set 3-57 RISC 16−Bit CPU RETI Return from interrupt Syntax RETI Operation TOS → SR SP + 2 → SP TOS → PC SP + 2 → SP Description The status register is restored to the value at the beginning of the interruptservice routine by replacing the present SR contents with the TOS contents.The sta...
Instruction Set 3-58 RISC 16−Bit CPU * RLA[.W] Rotate left arithmetically * RLA.B Rotate left arithmetically Syntax RLA dst or RLA.W dst RLA.B dst Operation C <− MSB <− MSB−1 .... LSB+1 <− LSB <− 0 Emulation ADD dst,dst ADD.B dst,dst Description The destination operand is shifted left on...
Instruction Set 3-59 RISC 16−Bit CPU * RLC[.W] Rotate left through carry * RLC.B Rotate left through carry Syntax RLC dst or RLC.W dst RLC.B dst Operation C <− MSB <− MSB−1 .... LSB+1 <− LSB <− C Emulation ADDC dst,dst Description The destination operand is shifted left one position as s...
Instruction Set 3-60 RISC 16−Bit CPU RRA[.W] Rotate right arithmetically RRA.B Rotate right arithmetically Syntax RRA dst or RRA.W dst RRA.B dst Operation MSB −> MSB, MSB −> MSB−1, ... LSB+1 −> LSB, LSB −> C Description The destination operand is shifted right one position as shown in Fi...
Instruction Set 3-61 RISC 16−Bit CPU RRC[.W] Rotate right through carry RRC.B Rotate right through carry Syntax RRC dst or RRC.W dst RRC dst Operation C −> MSB −> MSB−1 .... LSB+1 −> LSB −> C Description The destination operand is shifted right one position as shown in Figure 3−17.The ca...
Instruction Set 3-64 RISC 16−Bit CPU * SETN Set negative bit Syntax SETN Operation 1 −> N Emulation BIS #4,SR Description The negative bit (N) is set. Status Bits N: SetZ: Not affectedC: Not affectedV: Not affected Mode Bits OSCOFF, CPUOFF, and GIE are not affected.
Instruction Set 3-65 RISC 16−Bit CPU * SETZ Set zero bit Syntax SETZ Operation 1 −> Z Emulation BIS #2,SR Description The zero bit (Z) is set. Status Bits N: Not affectedZ: SetC: Not affectedV: Not affected Mode Bits OSCOFF, CPUOFF, and GIE are not affected.
Instruction Set 3-68 RISC 16−Bit CPU SWPB Swap bytes Syntax SWPB dst Operation Bits 15 to 8 <−> bits 7 to 0 Description The destination operand high and low bytes are exchanged as shown in Figure 3−18. Status Bits Status bits are not affected. Mode Bits OSCOFF, CPUOFF, and GIE are not affected...
Instruction Set 3-69 RISC 16−Bit CPU SXT Extend Sign Syntax SXT dst Operation Bit 7 −> Bit 8 ......... Bit 15 Description The sign of the low byte is extended into the high byte as shown in Figure 3−19. Status Bits N: Set if result is negative, reset if positiveZ: Set if result is zero, reset oth...
Instruction Set 3-72 RISC 16−Bit CPU 3.4.4 Instruction Cycles and Lengths The number of CPU clock cycles required for an instruction depends on theinstruction format and the addressing modes used - not the instruction itself.The number of clock cycles refers to the MCLK. Interrupt and Reset Cycles T...
Instruction Set 3-73 RISC 16−Bit CPU Format-I (Double Operand) Instruction Cycles and Lengths Table 3−16 lists the length and CPU cycles for all addressing modes of format-Iinstructions. Table 3−16. Format I Instruction Cycles and Lengths Addressing Mode No. of Length of Src Dst Cycles Instruction E...
Instruction Set 3-74 RISC 16−Bit CPU 3.4.5 Instruction Set Description The instruction map is shown in Figure 3−20 and the complete instruction setis summarized in Table 3−17. Figure 3−20. Core Instruction Map 0xxx4xxx8xxx Cxxx 1xxx 14xx18xx 1Cxx 20xx24xx28xx 2Cxx 30xx34xx38xx 3Cxx 4xxx5xxx6xxx7xxx8...
4-1 FLL+ Clock Module The FLL+ clock module provides the clocks for MSP430x4xx devices. Thischapter discusses the FLL+ clock module. The FLL+ clock module isimplemented in all MSP430x4xx devices. Topic Page 4.1 FLL+ Clock Module Introduction 4-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . ...
4-2 FLL+ Clock Module 4.1 FLL+ Clock Module Introduction The frequency-locked loop (FLL+) clock module supports low system cost andultralow-power consumption. Using three internal clock signals, the user canselect the best balance of performance and low power consumption. The FLL+features digital fr...
FLL+ Clock Module Operation 4-5 FLL+ Clock Module 4.2 FLL+ Clock Module Operation After a PUC, MCLK and SMCLK are sourced from DCOCLK at 32 times theACLK frequency. When a 32,768-Hz crystal is used for ACLK, MCLK andSMCLK will stabilize to 1.048576 MHz. Status register control bits SCG0, SCG1, OSCOF...
FLL+ Clock Module Operation 4-6 FLL+ Clock Module 4.2.2 LFXT1 Oscillator The LFXT1 oscillator supports ultralow-current consumption using a32,768-Hz watch crystal in LF mode (XTS_FLL = 0). A watch crystal connectsto XIN and XOUT without any external components. The LFXT1 oscillator supports high-spe...
FLL+ Clock Module Operation 4-7 FLL+ Clock Module 4.2.4 Digitally-Controlled Oscillator (DCO) The DCO is an integrated ring oscillator with RC-type characteristics. TheDCO frequency is stabilized by the FLL to a multiple of ACLK as defined byN, the lowest 7 bits of the SCFQCTL register. The DCOPLUS ...
FLL+ Clock Module Operation 4-8 FLL+ Clock Module 4.2.6 DCO Modulator The modulator mixes two adjacent DCO frequencies to produce anintermediate effective frequency and spread the clock energy, reducingelectromagnetic interference (EMI) . The modulator mixes the two adjacent frequencies across 32 DC...
Buffered Clock Output 4-10 FLL+ Clock Module 4.2.10 FLL+ Fail-Safe Operation The FLL+ module incorporates an oscillator-fault fail-safe feature. This featuredetects an oscillator fault for LFXT1, DCO and XT2 as shown in Figure 4−4.The available fault conditions are: - Low-frequency oscillator fault ...
FLL+ Clock Module Registers 4-11 FLL+ Clock Module 4.3 FLL+ Clock Module Registers The FLL+ registers are listed in Table 4−2. Table 4−2. FLL+ Registers Register Short Form Register Type Address Initial State System clock control SCFQCTL Read/write 052h 01Fh with PUC System clock frequency integrato...
FLL+ Clock Module Registers 4-12 FLL+ Clock Module SCFQCTL, System Clock Control Register 7 6 5 4 3 2 1 0 SCFQ_M N rw−0 rw−0 rw−0 rw−1 rw−1 rw−1 rw−1 rw−1 SCFQ_M Bit 7 Modulation. This enables or disables modulation0 Modulation enabled 1 Modulation disabled N Bits6-0 Multiplier. These bits set the m...
FLL+ Clock Module Registers 4-13 FLL+ Clock Module SCFI1, System Clock Frequency Integrator Register 1 7 6 5 4 3 2 1 0 DCOx MODx (MSBs) rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 DCOx Bits7-3 These bits select the DCO tap and are modified automatically by the FLL+. MODx Bit 2 Most significant modulator...
FLL+ Clock Module Registers 4-15 FLL+ Clock Module FLL_CTL1, FLL+ Control Register 1 7 6 5 4 3 2 1 0 Unused SMCLK OFF † XT2OFF † SELMx † SELS † FLL_DIVx r0 r0 rw−(1) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) † Not present in MSP430x41x, MSP430x42x devices. Unused Bit 7 SMCLKOFF Bit 6 SMCLK off. This bit tu...
FLL+ Clock Module Registers 4-16 FLL+ Clock Module IE1, Interrupt Enable Register 1 7 6 5 4 3 2 1 0 OFIE rw−0 Bits7-2 These bits may be used by other modules. See device-specific datasheet. OFIE Bit 1 Oscillator fault interrupt enable. This bit enables the OFIFG interrupt.Because other bits in IE1 m...
5-1 Flash Memory Controller This chapter describes the operation of the MSP430 flash memory controller. Topic Page 5.1 Flash Memory Introduction 5-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Flash Memory Segmentation 5-3 . . . . . . . . . . . . . . . . . . . . . . ....
Flash Memory Introduction 5-2 Flash Memory Controller 5.1 Flash Memory Introduction The MSP430 flash memory is bit-, byte-, and word-addressable andprogrammable. The flash memory module has an integrated controller thatcontrols programming and erase operations. The controller has threeregisters, a t...
Flash Memory Segmentation 5-3 Flash Memory Controller 5.2 Flash Memory Segmentation MSP430 flash memory is partitioned into segments. Single bits, bytes, orwords can be written to flash memory, but the segment is the smallest size offlash memory that can be erased. The flash memory is partitioned in...
Flash Memory Operation 5-4 Flash Memory Controller 5.3 Flash Memory Operation The default mode of the flash memory is read mode. In read mode, the flashmemory is not being erased or written, the flash timing generator and voltagegenerator are off, and the memory operates identically to ROM. MSP430 f...
Flash Memory Operation 5-5 Flash Memory Controller 5.3.2 Erasing Flash Memory The erased level of a flash memory bit is 1. Each bit can be programmed from1 to 0 individually but to reprogram from 0 to 1 requires an erase cycle. Thesmallest amount of flash that can be erased is a segment. There are t...
Flash Memory Operation 5-6 Flash Memory Controller Initiating an Erase from Within Flash Memory Any erase cycle can be initiated from within flash memory or from RAM. Whena flash segment erase operation is initiated from within flash memory, all timingis controlled by the flash controller, and the C...
Flash Memory Operation 5-7 Flash Memory Controller Initiating an Erase from RAM Any erase cycle may be initiated from RAM. In this case, the CPU is not heldand can continue to execute code from RAM. The BUSY bit must be polled todetermine the end of the erase cycle before the CPU can access any flas...
Flash Memory Operation 5-8 Flash Memory Controller 5.3.3 Writing Flash Memory The write modes, selected by the WRT and BLKWRT bits, are listed inTable 5−1. Interrupts are automatically disabled during a flash write andre-enabled after the write. Any interrupt that occurred during the write will have...
Flash Memory Operation 5-9 Flash Memory Controller In byte/word mode, the internally-generated programming voltage is appliedto the complete 64-byte block, each time a byte or word is written, for 32 of the35 f FTG cycles. With each byte or word write, the amount of time the block is subjected to th...
Flash Memory Operation 5-10 Flash Memory Controller Initiating a Byte/Word Write from RAM The flow to initiate a byte/word write from RAM is shown in Figure 5−9. Figure 5−9. Initiating a Byte/Word Write from RAM yes BUSY = 1 yes BUSY = 1 Disable watchdog Setup flash controller and set WRT=1 Write by...
Flash Memory Operation 5-11 Flash Memory Controller Block Write The block write can be used to accelerate the flash write process when manysequential bytes or words need to be programmed. The flash programmingvoltage remains on for the duration of writing the 64-byte block. Thecumulative programming...
Flash Memory Operation 5-12 Flash Memory Controller Block Write Flow and Example A block write flow is shown in Figure 5−8 and the following example. Figure 5−11. Block Write Flow yes BUSY = 1 Disable watchdog Setup flash controller Set BLKWRT=WRT=1 Write byte or word no Block Border? yes WAIT=0? ye...
Flash Memory Operation 5-14 Flash Memory Controller 5.3.4 Flash Memory Access During Write or Erase When any write or any erase operation is initiated from RAM and whileBUSY=1, the CPU may not read or write to or from any flash location.Otherwise, an access violation occurs, ACCVIFG is set, and the ...
Flash Memory Operation 5-15 Flash Memory Controller 5.3.5 Stopping a Write or Erase Cycle Any write or erase operation can be stopped before its normal completion bysetting the emergency exit bit EMEX. Setting the EMEX bit stops the activeoperation immediately and stops the flash controller. All fla...
Flash Memory Operation 5-16 Flash Memory Controller Programming Flash Memory via JTAG MSP430 devices can be programmed via the JTAG port. The JTAG interfacerequires four signals (5 signals on 20- and 28-pin devices), ground andoptionally V CC and RST/NMI. The JTAG port is protected with a fuse. Blow...
Flash Memory Registers 5-17 Flash Memory Controller 5.4 Flash Memory Registers The flash memory registers are listed in Table 5−4. Table 5−4. Flash Memory Registers Register Short Form Register Type Address Initial State Flash memory control register 1 FCTL1 Read/write 0128h 09600h with PUC Flash me...
Flash Memory Registers 5-18 Flash Memory Controller FCTL1, Flash Memory Control Register 15 14 13 12 11 10 9 8 FRKEY, Read as 096h FWKEY, Must be written as 0A5h 7 6 5 4 3 2 1 0 BLKWRT WRT Reserved Reserved Reserved MERAS ERASE Reserved rw−0 rw−0 r0 r0 r0 rw−0 rw−0 r0 FRKEY/FWKEY Bits15-8 FCTLx pass...
Flash Memory Registers 5-19 Flash Memory Controller FCTL2, Flash Memory Control Register 15 14 13 12 11 10 9 8 FWKEYx, Read as 096h Must be written as 0A5h 7 6 5 4 3 2 1 0 FSSELx FNx rw−0 rw−1 rw-0 rw-0 rw-0 rw−0 rw-1 rw−0 FWKEYx Bits15-8 FCTLx password. Always read as 096h. Must be written as 0A5h ...
Flash Memory Registers 5-20 Flash Memory Controller FCTL3, Flash Memory Control Register FCTL3 15 14 13 12 11 10 9 8 FWKEYx, Read as 096h Must be written as 0A5h 7 6 5 4 3 2 1 0 Reserved Reserved EMEX LOCK WAIT ACCVIFG KEYV BUSY r0 r0 rw-0 rw-1 r-1 rw−0 rw-(0) r(w)−0 FWKEYx Bits15-8 FCTLx password. ...
Flash Memory Registers 5-21 Flash Memory Controller IE1, Interrupt Enable Register 1 7 6 5 4 3 2 1 0 ACCVIE rw−0 Bits7-6,4-0 These bits may be used by other modules. See device-specific datasheet. ACCVIE Bit 5 Flash memory access violation interrupt enable. This bit enables theACCVIFG interrupt. Bec...
6-1 Supply Voltage Supervisor This chapter describes the operation of the SVS. The SVS is implemented inall MSP430x4x devices. Topic Page 6.1 SVS Introduction 6−2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 SVS Operation 6−4 . . . . . . . . . . . . ....
SVS Introduction 6-3 Supply Voltage Supervisor Figure 6−1. SVS Block Diagram + − 1.25V Brownout Reset VCC Set SVSFG tReset ~ 50us Reset SVSCTL Bits 0001 0010 0011 1111 1101 1100 G D S SVSOUT G D S VLD SVSON PORON SVSOP SVSFG ~ 50us SVS_POR SVSIN AV CC AV CC
SVS Operation 6-4 Supply Voltage Supervisor 6.2 SVS Operation The SVS detects if the AV CC voltage drops below a selectable level. It can be configured to provide a POR or set a flag, when a low-voltage condition occurs.The SVS is disabled after a brownout reset to conserve current consumption. 6.2....
SVS Operation 6-5 Supply Voltage Supervisor 6.2.3 Changing the VLDx Bits When the VLDx bits are changed, two settling delays are implemented toallows the SVS circuitry to settle. During each delay, the SVS will not setSVSFG. The delays, t d(SVSon) and t settle, are shown in Figure 6−2. The t d(SVSon...
SVS Operation 6-6 Supply Voltage Supervisor 6.2.4 SVS Operating Range Each SVS level has hysteresis to reduce sensitivity to small supply voltagechanges when AV CC is close to the threshold. The SVS operation and SVS/Brownout interoperation are shown in Figure 6−3. Figure 6−3. Operating Levels for S...
SVS Registers 6-7 Supply Voltage Supervisor 6.3 SVS Registers The SVS registers are listed in Table 6−1. Table 6−1. SVS Registers Register Short Form Register Type Address Initial State SVS Control Register SVSCTL Read/write 056h Reset with BOR SVSCTL, SVS Control Register 7 6 5 4 3 2 1 0 VLDx PORON...
7-1 Hardware Multiplier Hardware Multiplier This chapter describes the hardware multiplier. The hardware multiplier isimplemented in MSP430x44x devices. Topic Page 7.1 Hardware Multiplier Introduction 7-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2 Hardware Multiplier Operation...
Hardware Multiplier Introduction 7-2 Hardware Multiplier 7.1 Hardware Multiplier Introduction The hardware multiplier is a peripheral and is not part of the MSP430 CPU.This means, its activities do not interfere with the CPU activities. The multiplierregisters are peripheral registers that are loade...
Hardware Multiplier Operation 7-3 Hardware Multiplier 7.2 Hardware Multiplier Operation The hardware multiplier supports unsigned multiply, signed multiply, unsignedmultiply accumulate, and signed multiply accumulate operations. The type ofoperation is selected by the address the first operand is wr...
Hardware Multiplier Operation 7-4 Hardware Multiplier 7.2.2 Result Registers The result low register RESLO holds the lower 16-bits of the calculation result.The result high register RESHI contents depend on the multiply operation andare listed in Table 7−2. Table 7−2. RESHI Contents Mode RESHI Conte...
Hardware Multiplier Operation 7-5 Hardware Multiplier 7.2.3 Software Examples Examples for all multiplier modes follow. All 8x8 modes use the absoluteaddress for the registers because the assembler will not allow .B access toword registers when using the labels from the standard definitions file. ; ...
Hardware Multiplier Operation 7-6 Hardware Multiplier 7.2.4 Indirect Addressing of RESLO When using indirect or indirect autoincrement addressing mode to access theresult registers, At least one instruction is needed between loading the secondoperand and accessing one of the result registers: ; Acce...
Hardware Multiplier Registers 7-7 Hardware Multiplier 7.3 Hardware Multiplier Registers The hardware multiplier registers are listed in Table 7−4. Table 7−4. Hardware Multiplier Registers Register Short Form Register Type Address Initial State Operand one - multiply MPY Read/write 0130h Unchanged Op...
8-1 The DMA controller module transfers data from one address to anotherwithout CPU intervention. This chapter describes the operation of the DMAcontroller. The DMA controller is implemented in MSP430FG43x andimplements only one DMA channel. Topic Page 8.1 DMA Introduction 8-2 . . . . . . . . . . . ...
8-3 Figure 8−1. DMA Controller Block Diagram DMA Priority And Control ENNMI DT DMA Channel 2 DMASRSBYTE DMA2SZ DMA2DA DMA2SA DMADSTBYTE DMASRCINCRx DMADSTINCRx 2 2 3 DMADTx DMAEN DT DMA Channel 1 DMASRSBYTE DMA1SZ DMA1DA DMA1SA DMADSTBYTE DMASRCINCRx DMADSTINCRx 2 2 3 DMADTx DMAEN DT DMA Channel 0 D...
8-4 8.2 DMA Operation The DMA controller is configured with user software. The setup and operationof the DMA is discussed in the following sections. 8.2.1 DMA Addressing Modes The DMA controller has four addressing modes. The addressing mode foreach DMA channel is independently configurable. For exa...
8-5 8.2.2 DMA Transfer Modes The DMA controller has six transfer modes selected by the DMADTx bits aslisted in Table 8−1. Each channel is individually configurable for its transfermode. For example, channel 0 may be configured in single transfer mode,while channel 1 is configured for burst-block tra...
8-6 Single Transfer In single transfer mode, each byte/word transfer requires a separate trigger.The single transfer state diagram is shown in Figure 8−3. The DMAxSZ register is used to define the number of transfers to be made.The DMADSTINCRx and DMASRCINCRx bits select if the destinationaddress an...
8-7 Figure 8−3. DMA Single Transfer State Diagram Reset Wait for Trigger Idle Hold CPU, Transfer one word/byte [+Trigger AND DMALEVEL = 0 ] OR [Trigger=1 AND DMALEVEL=1] DMAABORT=0 DMAABORT = 1 2 x MCLK DMAEN = 0 Modify T_SourceAdd Modify T_DestAdd Decrement DMAxSZ [ENNMI = 1 AND NMI event] OR [DMAL...
8-8 Block Transfers In block transfer mode, a transfer of a complete block of data occurs after onetrigger. When DMADTx = 1, the DMAEN bit is cleared after the completion ofthe block transfer and must be set again before another block transfer can betriggered. After a block transfer has been trigger...
8-9 Figure 8−4. DMA Block Transfer State Diagram Reset Wait for Trigger Idle Hold CPU, Transfer one word/byte [+Trigger AND DMALEVEL = 0 ] OR [Trigger=1 AND DMALEVEL=1] DMAABORT=0 DMAABORT = 1 2 x MCLK DMAEN = 0 Modify T_SourceAdd Modify T_DestAdd Decrement DMAxSZ DMAxSZ > 0 [ENNMI = 1 AND NMI ev...
8-10 Burst-Block Transfers In burst-block mode, transfers are block transfers with CPU activityinterleaved. The CPU executes 2 MCLK cycles after every four byte/wordtransfers of the block resulting in 20% CPU execution capacity. After theburst-block, CPU execution resumes at 100% capacity and the DM...
8-11 Figure 8−5. DMA Burst-Block Transfer State Diagram 2 x MCLK Reset Wait for Trigger Idle Hold CPU, Transfer one word/byte Burst State (release CPU for 2xMCLK) [+Trigger AND DMALEVEL = 0 ] OR [Trigger=1 AND DMALEVEL=1] DMAABORT=0 DMAABORT = 1 2 x MCLK DMAEN = 0 Modify T_SourceAdd Modify T_DestAdd...
8-12 8.2.3 Initiating DMA Transfers Each DMA channel is independently configured for its trigger source with theDMAxTSELx bits as described in Table 8−2.The DMAxTSELx bits should bemodified only when the DMACTLx DMAEN bit is 0. Otherwise, unpredictableDMA triggers may occur. When selecting the trigg...
8-13 Table 8−2. DMA Trigger Operation DMAxTSELx Operation 0000 A transfer is triggered when the DMAREQ bit is set. The DMAREQ bit is automatically resetwhen the transfer starts 0001 A transfer is triggered when the TACCR2 CCIFG flag is set. The TACCR2 CCIFG flag isautomatically reset when the transf...
8-14 8.2.4 Stopping DMA Transfers There are two ways to stop DMA transfers in progress: - A single, block, or burst-block transfer may be stopped with an NMIinterrupt, if the ENNMI bit is set in register DMACTL1. - A burst-block transfer may be stopped by clearing the DMAEN bit. 8.2.5 DMA Channel Pr...
8-15 8.2.6 DMA Transfer Cycle Time The DMA controller requires one or two MCLK clock cycles to synchronizebefore each single transfer or complete block or burst-block transfer. Eachbyte/word transfer requires two MCLK cycles after synchronization, and onecycle of wait time after the transfer. Becaus...
8-18 8.3 DMA Registers The DMA registers are listed in Table 8−4. Table 8−4. DMA Registers Register Short Form Register Type Address Initial State DMA control 0 DMACTL0 Read/write 0122h Reset with POR DMA control 1 DMACTL1 Read/write 0124h Reset with POR DMA channel 0 control DMA0CTL Read/write 01E0...
8-19 DMACTL0, DMA Control Register 0 15 14 13 12 11 10 9 8 Reserved DMA2TSELx rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) 7 6 5 4 3 2 1 0 DMA1TSELx DMA0TSELx rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) Reserved Bits15−12 Reserved DMA2TSELx Bits11−8 DMA trigger select. These b...
8-20 DMACTL1, DMA Control Register 1 15 14 13 12 11 10 9 8 0 0 0 0 0 0 0 0 r0 r0 r0 r0 r0 r0 r0 r0 7 6 5 4 3 2 1 0 0 0 0 0 0 DMA ONFETCH ROUND ROBIN ENNMI r0 r0 r0 r0 r0 rw−(0) rw−(0) rw−(0) Reserved Bits15−3 Reserved. Read only. Always read as 0. DMAONFETCH Bit 2 DMA on fetch0 The DMA transfer occu...
8-21 DMAxCTL, DMA Channel x Control Register 15 14 13 12 11 10 9 8 Reserved DMADTx DMADSTINCRx DMASRCINCRx rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) 7 6 5 4 3 2 1 0 DMA DSTBYTE DMA SRCBYTE DMALEVEL DMAEN DMAIFG DMAIE DMA ABORT DMAREQ rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−...
8-22 DMASRCBYTE Bit 6 DMA source byte. This bit selects the source as a byte or word.0 Word 1 Byte DMALEVEL Bit 5 DMA level. This bit selects between edge-sensitive and level-sensitivetriggers.0 Edge sensitive (rising edge) 1 Level sensitive (high level) DMAEN Bit 4 DMA enable0 Disabled 1 Enabled DM...
8-23 DMAxDA, DMA Destination Address Register 15 14 13 12 11 10 9 8 DMAxDAx rw rw rw rw rw rw rw rw 7 6 5 4 3 2 1 0 DMAxDAx rw rw rw rw rw rw rw rw DMAxDAx Bits15−0 DMA destination address. The destination address register points to thedestination address for single transfers or the first address fo...
9-1 Digital I/O Digital I/O This chapter describes the operation of the digital I/O ports. Ports P1-P6 areimplemented in all MSP430x4xx devices. Topic Page 9.1 Digital I/O Introduction 9-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.2 Digital I/O Operation 9-3 ....
Digital I/O Introduction 9-2 Digital I/O 9.1 Digital I/O Introduction MSP430 devices have up to 6 digital I/O ports implemented, P1 - P6. Each porthas eight I/O pins. Every I/O pin is individually configurable for input or outputdirection, and each I/O line can be individually read or written to. Po...
Digital I/O Operation 9-3 Digital I/O 9.2 Digital I/O Operation The digital I/O is configured with user software. The setup and operation of thedigital I/O is discussed in the following sections. 9.2.1 Input Register PxIN Each bit in each PxIN register reflects the value of the input signal at theco...
Digital I/O Operation 9-4 Digital I/O 9.2.4 Function Select Registers PxSEL Port pins are often multiplexed with other peripheral module functions. See thedevice-specific data sheet to determine pin functions. Each PxSEL bit is usedto select the pin function − I/O port or peripheral module function....
Digital I/O Operation 9-5 Digital I/O 9.2.5 P1 and P2 Interrupts Each pin in ports P1 and P2 have interrupt capability, configured with thePxIFG, PxIE, and PxIES registers. All P1 pins source a single interrupt vector,and all P2 pins source a different single interrupt vector. The PxIFG registercan ...
Digital I/O Operation 9-6 Digital I/O Interrupt Edge Select Registers P1IES, P2IES Each PxIES bit selects the interrupt edge for the corresponding I/O pin. Bit = 0: The PxIFGx flag is set with a low-to-high transition Bit = 1: The PxIFGx flag is set with a high-to-low transition Note: Writing to PxI...
Digital I/O Registers 9-7 Digital I/O 9.3 Digital I/O Registers Seven registers are used to configure P1 and P2. Four registers are used toconfigure ports P3 - P6. The digital I/O registers are listed in Table 9−1. Table 9−1. Digital I/O Registers Port Register Short Form Address Register Type Initi...
10-1 Watchdog Timer, Watchdog Timer+ The watchdog timer is a 16-bit timer that can be used as a watchdog or as aninterval timer. This chapter describes the watchdog timer. The watchdog timeris implemented in all MSP430x4xx devices, except those with the enhancedwatchdog timer, WDT+. The WDT+ is impl...
Watchdog Timer Introduction 10-2 Watchdog Timer, Watchdog Timer+ 10.1 Watchdog Timer Introduction The primary function of the watchdog timer (WDT) module is to perform acontrolled system restart after a software problem occurs. If the selected timeinterval expires, a system reset is generated. If th...
Watchdog Timer Introduction 10-3 Watchdog Timer, Watchdog Timer+ Figure 10−1. Watchdog Timer Block Diagram WDTQn Y 1 2 3 4 Q6 Q9 Q13 Q15 16−bit Counter CLK AB 1 1 A EN PUC SMCLK ACLK Clear Password Compare 0 0 0 0 1 1 1 1 WDTCNTCL WDTTMSEL WDTNMI WDTNMIES WDTIS1 WDTSSEL WDTIS0 WDTHOLD EQU EQU Write ...
Watchdog Timer Operation 10-4 Watchdog Timer, Watchdog Timer+ 10.2 Watchdog Timer Operation The WDT module can be configured as either a watchdog or interval timer withthe WDTCTL register. The WDTCTL register also contains control bits toconfigure the RST/NMI pin. WDTCTL is a 16-bit, password-protec...
Watchdog Timer Operation 10-5 Watchdog Timer, Watchdog Timer+ 10.2.4 Watchdog Timer Interrupts The WDT uses two bits in the SFRs for interrupt control. - The WDT interrupt flag, WDTIFG, located in IFG1.0 - The WDT interrupt enable, WDTIE, located in IE1.0 When using the WDT in the watchdog mode, the...
Watchdog Timer Operation 10-6 Watchdog Timer, Watchdog Timer+ 10.2.6 Operation in Low-Power Modes The MSP430 devices have several low-power modes. Different clock signalsare available in different low-power modes. The requirements of the user’sapplication and the type of clocking used determine how ...
Watchdog Timer Registers 10-7 Watchdog Timer, Watchdog Timer+ 10.3 Watchdog Timer Registers The watchdog timer module registers are listed in Table 10−1. Table 10−1. Watchdog Timer Registers Register Short Form Register Type Address Initial State Watchdog timer control register WDTCTL Read/write 012...
Watchdog Timer Registers 10-8 Watchdog Timer, Watchdog Timer+ WDTCTL, Watchdog Timer Register 15 14 13 12 11 10 9 8 Read as 069h WDTPW, must be written as 05Ah 7 6 5 4 3 2 1 0 WDTHOLD WDTNMIES WDTNMI WDTTMSEL WDTCNTCL WDTSSEL WDTISx rw−0 rw−0 rw−0 rw−0 r0(w) rw−0 rw−0 rw−0 WDTPW Bits15-8 Watchdog ti...
Watchdog Timer Registers 10-9 Watchdog Timer, Watchdog Timer+ IE1, Interrupt Enable Register 1 7 6 5 4 3 2 1 0 NMIIE WDTIE rw−0 rw−0 Bits7-5 These bits may be used by other modules. See device-specific datasheet. NMIIE Bit 4 NMI interrupt enable. This bit enables the NMI interrupt. Because other bit...
Watchdog Timer Registers 10-10 Watchdog Timer, Watchdog Timer+ IFG1, Interrupt Flag Register 1 7 6 5 4 3 2 1 0 NMIIFG WDTIFG rw−(0) rw−(0) Bits7-5 These bits may be used by other modules. See device-specific datasheet. NMIIFG Bit 4 NMI interrupt flag. NMIIFG must be reset by software. Because other ...
11-1 Basic Timer1 The Basic Timer1 module is two independent, cascadable 8-bit timers. Thischapter describes the Basic Timer1. Basic Timer1 is implemented in allMSP430x4xx devices. Topic Page 11.1 Basic Timer1 Introduction 11−2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11...
Basic Timer1 Introduction 11-2 Basic Timer1 11.1 Basic Timer1 Introduction The Basic Timer1 supplies LCD timing and low frequency time intervals. TheBasic Timer1 is two independent 8-bit timers that can also be cascaded to formone 16-bit timer function. Some uses for the Basic Timer1 include: - Real...
Basic Timer1 Introduction 11-3 Basic Timer1 Figure 11−1. Basic Timer1 Block Diagram BTCNT2 Set_BTIFG BTCNT1 EN1 CLK1 Q4 Q5 Q6 Q7 BTDIV BTHOLD ACLK EN2 CLK2 Q4 Q5 Q6 Q7 Q3 Q2 Q1 Q0 BTSSEL SMCLK BTIPx BTFRFQx ACLK:256 fLCD 00 01 10 11 11 10 01 00 111 110 101 100 001 011 010 000
Basic Timer1 Introduction 11-4 Basic Timer1 11.2 Basic Timer1 Operation The Basic Timer1 module can be configured as two 8-bit timers or one 16-bittimer with the BTCTL register. The BTCTL register is an 8-bit, read/writeregister. Any read or write access must use byte instructions. The BasicTimer1 c...
Basic Timer1 Introduction 11-6 Basic Timer1 11.3 Basic Timer1 Registers The watchdog timer module registers are listed in Table 11−1. Table 11−1. Basic Timer1 Registers Register Short Form Register Type Address Initial State Basic Timer1 Control BTCTL Read/write 040h Unchanged Basic Timer1 Counter 1...
Basic Timer1 Introduction 11-7 Basic Timer1 BTCTL, Basic Timer1 Control Register 7 6 5 4 3 2 1 0 BTSSEL BTHOLD BTDIV BTFRFQx BTIPx rw rw rw rw rw rw rw rw BTSSEL Bit 7 BTCNT2 clock select. This bit, together with the BTDIV bit, selects theclock source for BTCNT2. See the description for BTDIV. BTHOL...
Basic Timer1 Introduction 11-8 Basic Timer1 BTCNT1, Basic Timer1 Counter 1 7 6 5 4 3 2 1 0 BTCNT1x rw rw rw rw rw rw rw rw BTCNT1x Bits7−0 BTCNT1 register. The BTCNT1 register is the count of BTCNT1. BTCNT2, Basic Timer1 Counter 2 7 6 5 4 3 2 1 0 BTCNT2x rw rw rw rw rw rw rw rw BTCNT2x Bits7−0 BTCNT...
Basic Timer1 Introduction 11-9 Basic Timer1 IE2, Interrupt Enable Register 2 7 6 5 4 3 2 1 0 BTIE rw−0 BTIE Bit 7 Basic Timer1 interrupt enable. This bit enables the BTIFG interrupt Becauseother bits in IE2 may be used for other modules, it is recommended to set orclear this bit using BIS.B or BIC.B...
Timer_A Introduction 12-2 Timer_A 12.1 Timer_A Introduction Timer_A is a 16-bit timer/counter with three or five capture/compare registers.Timer_A can support multiple capture/compares, PWM outputs, and intervaltiming. Timer_A also has extensive interrupt capabilities. Interrupts may begenerated fro...
Timer_A Operation 12-4 Timer_A 12.2 Timer_A Operation The Timer_A module is configured with user software. The setup andoperation of Timer_A is discussed in the following sections. 12.2.1 16-Bit Timer Counter The 16-bit timer/counter register, TAR, increments or decrements (dependingon mode of opera...
Timer_A Operation 12-5 Timer_A 12.2.2 Starting the Timer The timer may be started, or restarted in the following ways: - The timer counts when MCx > 0 and the clock source is active. - When the timer mode is either up or up/down, the timer may be stoppedby writing 0 to TACCR0. The timer may then ...
Timer_A Operation 12-6 Timer_A Up Mode The up mode is used if the timer period must be different from 0FFFFh counts.The timer repeatedly counts up to the value of compare register TACCR0,which defines the period, as shown in Figure 12−2. The number of timercounts in the period is TACCR0+1. When the ...
Timer_A Operation 12-7 Timer_A Continuous Mode In the continuous mode, the timer repeatedly counts up to 0FFFFh and restartsfrom zero as shown in Figure 12−4. The capture/compare register TACCR0works the same way as the other capture/compare registers. Figure 12−4. Continuous Mode 0h 0FFFFh The TAIF...
Timer_A Operation 12-8 Timer_A Use of the Continuous Mode The continuous mode can be used to generate independent time intervals andoutput frequencies. Each time an interval is completed, an interrupt isgenerated. The next time interval is added to the TACCRx register in theinterrupt service routine...
Timer_A Operation 12-10 Timer_A Changing the Period Register TACCR0 When changing TACCR0 while the timer is running, and counting in the downdirection, the timer continues its descent until it reaches zero. The new periodtakes affect after the counter counts down to zero. When the timer is counting ...
Timer_A Operation 12-11 Timer_A 12.2.4 Capture/Compare Blocks Three or five identical capture/compare blocks, TACCRx, are present inTimer_A. Any of the blocks may be used to capture the timer data, or togenerate time intervals. Capture Mode The capture mode is selected when CAP = 1. Capture mode is ...
Timer_A Operation 12-12 Timer_A Figure 12−11. Capture Cycle Second Capture Taken COV = 1 Capture Taken No Capture Taken Read Taken Capture Clear Bit COV in Register TACCTLx Idle Idle Capture Capture Read and No Capture Capture Capture Read Capture Capture Initiated by Software Captures can be initia...
Timer_A Operation 12-13 Timer_A 12.2.5 Output Unit Each capture/compare block contains an output unit. The output unit is usedto generate output signals such as PWM signals. Each output unit has eightoperating modes that generate signals based on the EQU0 and EQUx signals. Output Modes The output mo...
Timer_A Operation 12-14 Timer_A Output Example—Timer in Up Mode The OUTx signal is changed when the timer counts up to the TACCRx value,and rolls from TACCR0 to zero, depending on the output mode. An exampleis shown in Figure 12−12 using TACCR0 and TACCR1. Figure 12−12. Output Example—Timer in Up Mo...
Timer_A Operation 12-15 Timer_A Output Example—Timer in Continuous Mode The OUTx signal is changed when the timer reaches the TACCRx andTACCR0 values, depending on the output mode. An example is shown inFigure 12−13 using TACCR0 and TACCR1. Figure 12−13. Output Example—Timer in Continuous Mode 0h 0F...
Timer_A Operation 12-16 Timer_A Output Example—Timer in Up/Down Mode The OUTx signal changes when the timer equals TACCRx in either countdirection and when the timer equals TACCR0, depending on the output mode.An example is shown in Figure 12−14 using TACCR0 and TACCR2. Figure 12−14. Output Example—...
Timer_A Operation 12-17 Timer_A 12.2.6 Timer_A Interrupts Two interrupt vectors are associated with the 16-bit Timer_A module: - TACCR0 interrupt vector for TACCR0 CCIFG - TAIV interrupt vector for all other CCIFG flags and TAIFG In capture mode any CCIFG flag is set when a timer value is captured i...
Timer_A Registers 12-19 Timer_A 12.3 Timer_A Registers The Timer_A registers are listed in Table 12−3 and Table 12−4. Table 12−3. Timer_A3 Registers Register Short Form Register Type Address Initial State Timer_A controlTimer0_A3 Control TACTL/TA0CTL Read/write 0160h Reset with POR Timer_A counterTi...
Timer_A Registers 12-21 Timer_A TAR, Timer_A Register 15 14 13 12 11 10 9 8 TARx rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) 7 6 5 4 3 2 1 0 TARx rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) TARx Bits15-0 Timer_A register. The TAR register is the count of Timer_A.
Timer_A Registers 12-22 Timer_A TACCTLx, Capture/Compare Control Register 15 14 13 12 11 10 9 8 CMx CCISx SCS SCCI Unused CAP rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) r−(0) r−(0) rw−(0) 7 6 5 4 3 2 1 0 OUTMODx CCIE CCI OUT COV CCIFG rw−(0) rw−(0) rw−(0) rw−(0) r rw−(0) rw−(0) rw−(0) CMx Bit15-14 Capture m...
Timer_B Operation 13-4 Timer_B 13.2 Timer_B Operation The Timer_B module is configured with user software. The setup andoperation of Timer_B is discussed in the following sections. 13.2.1 16-Bit Timer Counter The 16-bit timer/counter register, TBR, increments or decrements (dependingon mode of opera...
Timer_B Operation 13-5 Timer_B 13.2.2 Starting the Timer The timer may be started or restarted in the following ways: - The timer counts when MCx > 0 and the clock source is active. - When the timer mode is either up or up/down, the timer may be stoppedby loading 0 to TBCL0. The timer may then be...
Timer_B Operation 13-6 Timer_B Up Mode The up mode is used if the timer period must be different from TBR (max) counts. The timer repeatedly counts up to the value of compare latch TBCL0, whichdefines the period, as shown in Figure 13−2. The number of timer counts inthe period is TBCL0+1. When the t...
Timer_B Operation 13-7 Timer_B Continuous Mode In continuous mode the timer repeatedly counts up to TBR (max) and restarts from zero as shown in Figure 13−4. The compare latch TBCL0 works the sameway as the other capture/compare registers. Figure 13−4. Continuous Mode 0h TBR(max) The TBIFG interrupt...
Timer_B Operation 13-8 Timer_B Use of the Continuous Mode The continuous mode can be used to generate independent time intervals andoutput frequencies. Each time an interval is completed, an interrupt isgenerated. The next time interval is added to the TBCLx latch in the interruptservice routine. Fi...
Timer_B Operation 13-10 Timer_B Changing the Value of Period Register TBCL0 When changing TBCL0 while the timer is running, and counting in the downdirection, and when the TBCL0 load mode is immediate, the timer continuesits descent until it reaches zero. The new period takes effect after the counte...
Timer_B Operation 13-11 Timer_B 13.2.4 Capture/Compare Blocks Three or seven identical capture/compare blocks, TBCCRx, are present inTimer_B. Any of the blocks may be used to capture the timer data or togenerate time intervals. Capture Mode The capture mode is selected when CAP = 1. Capture mode is ...
Timer_B Operation 13-12 Timer_B Figure 13−11. Capture Cycle Second Capture Taken COV = 1 Capture Taken No Capture Taken Read Taken Capture Clear Bit COV in Register TBCCTLx Idle Idle Capture Capture Read and No Capture Capture Capture Read Capture Capture Initiated by Software Captures can be initia...
Timer_B Operation 13-13 Timer_B Compare Latch TBCLx The TBCCRx compare latch, TBCLx, holds the data for the comparison to thetimer value in compare mode. TBCLx is buffered by TBCCRx. The bufferedcompare latch gives the user control over when a compare period updates.The user cannot directly access T...
Timer_B Operation 13-14 Timer_B 13.2.5 Output Unit Each capture/compare block contains an output unit. The output unit is usedto generate output signals such as PWM signals. Each output unit has eightoperating modes that generate signals based on the EQU0 and EQUx signals.The TBOUTH pin function can...
Timer_B Operation 13-15 Timer_B Output Example—Timer in Up Mode The OUTx signal is changed when the timer counts up to the TBCLx value, androlls from TBCL0 to zero, depending on the output mode. An example is shownin Figure 13−12 using TBCL0 and TBCL1. Figure 13−12. Output Example—Timer in Up Mode 0...
Timer_B Operation 13-16 Timer_B Output Example—Timer in Continuous Mode The OUTx signal is changed when the timer reaches the TBCLx and TBCL0values, depending on the output mode, An example is shown in Figure 13−13using TBCL0 and TBCL1. Figure 13−13. Output Example—Timer in Continuous Mode 0h TBR(ma...
Timer_B Operation 13-17 Timer_B Output Example − Timer in Up/Down Mode The OUTx signal changes when the timer equals TBCLx in either countdirection and when the timer equals TBCL0, depending on the output mode.An example is shown in Figure 13−14 using TBCL0 and TBCL3. Figure 13−14. Output Example—Ti...
Timer_B Operation 13-18 Timer_B 13.2.6 Timer_B Interrupts Two interrupt vectors are associated with the 16-bit Timer_B module: - TBCCR0 interrupt vector for TBCCR0 CCIFG - TBIV interrupt vector for all other CCIFG flags and TBIFG In capture mode, any CCIFG flag is set when a timer value is captured ...
Timer_B Operation 13-19 Timer_B TBIV, Interrupt Handler Examples The following software example shows the recommended use of TBIV and thehandling overhead. The TBIV value is added to the PC to automatically jumpto the appropriate routine. The numbers at the right margin show the necessary CPU clock ...
Timer_B Registers 13-20 Timer_B 13.3 Timer_B Registers The Timer_B registers are listed in Table 13−5. Table 13−5. Timer_B Registers Register Short Form Register Type Address Initial State Timer_B control TBCTL Read/write 0180h Reset with POR Timer_B counter TBR Read/write 0190h Reset with POR Timer...
Timer_B Registers 13-21 Timer_B Timer_B Control Register TBCTL 15 14 13 12 11 10 9 8 Unused TBCLGRPx CNTLx Unused TBSSELx rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) 7 6 5 4 3 2 1 0 IDx MCx Unused TBCLR TBIE TBIFG rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) w−(0) rw−(0) rw−(0) Unused Bit 15 Unuse...
Timer_B Registers 13-22 Timer_B Unused Bit 3 Unused TBCLR Bit 2 Timer_B clear. Setting this bit resets TBR, the TBCLK divider, and the countdirection. The TBCLR bit is automatically reset and is always read as zero. TBIE Bit 1 Timer_B interrupt enable. This bit enables the TBIFG interrupt request.0 ...
Timer_B Registers 13-23 Timer_B TBCCTLx, Capture/Compare Control Register 15 14 13 12 11 10 9 8 CMx CCISx SCS CLLDx CAP rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) r−(0) rw−(0) 7 6 5 4 3 2 1 0 OUTMODx CCIE CCI OUT COV CCIFG rw−(0) rw−(0) rw−(0) rw−(0) r rw−(0) rw−(0) rw−(0) CMx Bit15-14 Capture mode00...
Timer_B Registers 13-25 Timer_B TBIV, Timer_B Interrupt Vector Register 15 14 13 12 11 10 9 8 0 0 0 0 0 0 0 0 r0 r0 r0 r0 r0 r0 r0 r0 7 6 5 4 3 2 1 0 0 0 0 0 TBIVx 0 r0 r0 r0 r0 r−(0) r−(0) r−(0) r0 TBIVx Bits15-0 Timer_B interrupt vector value TBIV Contents Interrupt Source Interrupt Flag Interrupt...
14-1 USART Peripheral Interface, UART Mode The universal synchronous/asynchronous receive/transmit (USART)peripheral interface supports two serial modes with one hardware module.This chapter discusses the operation of the asynchronous UART mode.USART0 is implemented on the MSP430x42x and MSP430x43x ...
USART Introduction: UART Mode 14-3 USART Peripheral Interface, UART Mode Figure 14−1. USART Block Diagram: UART Mode Receiver Shift Register Transmit Shift Register Receiver Buffer UxRXBUF Transmit Buffer UxTXBUF LISTEN MM UCLK Clock Phase and Polarity Receive Status SYNC CKPH CKPL SSEL1 SSEL0 UCLKI...
USART Operation: UART Mode 14-4 USART Peripheral Interface, UART Mode 14.2 USART Operation: UART Mode In UART mode, the USART transmits and receives characters at a bit rateasynchronous to another device. Timing for each character is based on theselected baud rate of the USART. The transmit and rece...
USART Operation: UART Mode 14-5 USART Peripheral Interface, UART Mode 14.2.3 Asynchronous Communication Formats When two devices communicate asynchronously, the idle-line format is usedfor the protocol. When three or more devices communicate, the USARTsupports the idle-line and address-bit multiproc...
USART Operation: UART Mode 14-6 USART Peripheral Interface, UART Mode The URXWIE bit is used to control data reception in the idle-linemultiprocessor format. When the URXWIE bit is set, all non-addresscharacters are assembled but not transferred into the UxRXBUF, andinterrupts are not generated. Whe...
USART Operation: UART Mode 14-7 USART Peripheral Interface, UART Mode Address - Bit Multiprocessor Format When MM = 1, the address-bit multiprocessor format is selected. Eachprocessed character contains an extra bit used as an address indicator shownin Figure 14−4. The first character in a block of ...
USART Operation: UART Mode 14-8 USART Peripheral Interface, UART Mode Automatic Error Detection Glitch suppression prevents the USART from being accidentally started. Anylow-level on URXDx shorter than the deglitch time t τ (approximately 300 ns) will be ignored. See the device-specific datasheet fo...
USART Operation: UART Mode 14-9 USART Peripheral Interface, UART Mode 14.2.4 USART Receive Enable The receive enable bit, URXEx, enables or disables data reception on URXDxas shown in Figure 14−5. Disabling the USART receiver stops the receiveoperation following completion of any character currently...
USART Operation: UART Mode 14-10 USART Peripheral Interface, UART Mode 14.2.5 USART Transmit Enable When UTXEx is set, the UART transmitter is enabled. Transmission is initiatedby writing data to UxTXBUF. The data is then moved to the transmit shiftregister on the next BITCLK after the TX shift regi...
USART Operation: UART Mode 14-11 USART Peripheral Interface, UART Mode 14.2.6 UART Baud Rate Generation The USART baud rate generator is capable of producing standard baud ratesfrom non-standard source frequencies. The baud rate generator uses oneprescaler/divider and a modulator as shown in Figure ...
USART Operation: UART Mode 14-12 USART Peripheral Interface, UART Mode Baud Rate Bit Timing The first stage of the baud rate generator is the 16-bit counter and comparator.At the beginning of each bit transmitted or received, the counter is loaded withINT(N/2) where N is the value stored in the comb...
USART Operation: UART Mode 14-13 USART Peripheral Interface, UART Mode Transmit Bit Timing The timing for each character is the sum of the individual bit timings. Bymodulating each bit, the cumulative bit error is reduced. The individual bit errorcan be calculated by: Error [%] + NJ baud rate BRCLK ƪ...
USART Operation: UART Mode 14-14 USART Peripheral Interface, UART Mode Receive Bit Timing Receive timing consists of two error sources. The first is the bit-to-bit timingerror. The second is the error between a start edge occurring and the startedge being accepted by the USART. Figure 14−9 shows the...
USART Operation: UART Mode 14-15 USART Peripheral Interface, UART Mode For example, the receive errors for the following conditions are calculated: Baud rate = 2400BRCLK = 32,768 Hz (ACLK) UxBR = 13, since the ideal division factor is 13.65 UxMCTL = 6B:m7 = 0, m6 = 1, m5 = 1, m4 = 0, m3 = 1, m2 = 0,...
USART Operation: UART Mode 14-16 USART Peripheral Interface, UART Mode Typical Baud Rates and Errors Standard baud rate frequency data for UxBRx and UxMCTL are listed inTable 14−2 for a 32,768-Hz watch crystal (ACLK) and a typical 1,048,576-HzSMCLK. The receive error is the accumulated time versus t...
USART Operation: UART Mode 14-17 USART Peripheral Interface, UART Mode 14.2.7 USART Interrupts The USART has one interrupt vector for transmission and one interrupt vectorfor reception. USART Transmit Interrupt Operation The UTXIFGx interrupt flag is set by the transmitter to indicate that UxTXBUFis...
USART Operation: UART Mode 14-18 USART Peripheral Interface, UART Mode USART Receive Interrupt Operation The URXIFGx interrupt flag is set each time a character is received and loadedinto UxRXBUF. An interrupt request is generated if URXIEx and GIE are alsoset. URXIFGx and URXIEx are reset by a syst...
USART Operation: UART Mode 14-19 USART Peripheral Interface, UART Mode Receive-Start Edge Detect Operation The URXSE bit enables the receive start-edge detection feature. Therecommended usage of the receive-start edge feature is when BRCLK issourced by the DCO and when the DCO is off because of low-...
USART Operation: UART Mode 14-20 USART Peripheral Interface, UART Mode Receive-Start Edge Detect Conditions When URXSE = 1, glitch suppression prevents the USART from beingaccidentally started. Any low-level on URXDx shorter than the deglitch time t τ (approximately 300 ns) will be ignored by the US...
USART Registers: UART Mode 14-21 USART Peripheral Interface, UART Mode 14.3 USART Registers: UART Mode Table 14−3 lists the registers for all devices implementing a USART module.Table 14−4 applies only to devices with a second USART module, USART1. Table 14−3. USART0 Control and Status Registers Reg...
USART Registers: UART Mode 14-22 USART Peripheral Interface, UART Mode UxCTL, USART Control Register 7 6 5 4 3 2 1 0 PENA PEV SPB CHAR LISTEN SYNC MM SWRST rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−1 PENA Bit 7 Parity enable0 Parity disabled. 1 Parity enabled. Parity bit is generated (UTXDx) and expecte...
USART Registers: UART Mode 14-23 USART Peripheral Interface, UART Mode UxTCTL, USART Transmit Control Register 7 6 5 4 3 2 1 0 Unused CKPL SSELx URXSE TXWAKE Unused TXEPT rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−1 Unused Bit 7 Unused CKPL Bit 6 Clock polarity select0 UCLKI = UCLK 1 UCLKI = inverted UCL...
USART Registers: UART Mode 14-24 USART Peripheral Interface, UART Mode UxRCTL, USART Receive Control Register 7 6 5 4 3 2 1 0 FE PE OE BRK URXEIE URXWIE RXWAKE RXERR rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 FE Bit 7 Framing error flag0 No error 1 Character received with low stop bit PE Bit 6 Parity e...
USART Registers: UART Mode 14-25 USART Peripheral Interface, UART Mode UxBR0, USART Baud Rate Control Register 0 7 6 5 4 3 2 1 0 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 rw rw rw rw rw rw rw rw UxBR1, USART Baud Rate Control Register 1 7 6 5 4 3 2 1 0 2 15 2 14 2 13 2 12 2 11 2 10 2 9 2 8 rw rw rw rw rw rw r...
USART Registers: UART Mode 14-26 USART Peripheral Interface, UART Mode UxRXBUF, USART Receive Buffer Register 7 6 5 4 3 2 1 0 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 r r r r r r r r UxRXBUFx Bits7−0 The receive-data buffer is user accessible and contains the last receivedcharacter from the receive shift reg...
USART Registers: UART Mode 14-27 USART Peripheral Interface, UART Mode ME1, Module Enable Register 1 7 6 5 4 3 2 1 0 UTXE0 URXE0 rw−0 rw−0 UTXE0 Bit 7 USART0 transmit enable. This bit enables the transmitter for USART0.0 Module not enabled 1 Module enabled URXE0 Bit 6 USART0 receive enable. This bit...
USART Registers: UART Mode 14-29 USART Peripheral Interface, UART Mode IFG1, Interrupt Flag Register 1 7 6 5 4 3 2 1 0 UTXIFG0 URXIFG0 rw−1 rw−0 UTXIFG0 † Bit 7 USART0 transmit interrupt flag. UTXIFG0 is set when U0TXBUF is empty.0 No interrupt pending 1 Interrupt pending URXIFG0 † Bit 6 USART0 rece...
15-1 USART Peripheral Interface, SPI Mode USART Peripheral Interface, SPI Mode The universal synchronous/asynchronous receive/transmit (USART)peripheral interface supports two serial modes with one hardware module.This chapter discusses the operation of the synchronous peripheral interfaceor SPI mod...
USART Introduction: SPI Mode 15-3 USART Peripheral Interface, SPI Mode Figure 15−1. USART Block Diagram: SPI Mode Receiver Shift Register Transmit Shift Register Receiver Buffer UxRXBUF Transmit Buffer UxTXBUF LISTEN MM UCLK Clock Phase and Polarity Receive Status SYNC CKPH CKPL SSEL1 SSEL0 UCLKI AC...
USART Operation: SPI Mode 15-5 USART Peripheral Interface, SPI Mode 15.2.2 Master Mode Figure 15−2. USART Master and External Slave Receive Buffer UxRXBUF Receive Shift Register MSB LSB Transmit Buffer UxTXBUF Transmit Shift Register MSB LSB SPI Receive Buffer Data Shift Register (DSR) MSB LSB SOMI ...
USART Operation: SPI Mode 15-6 USART Peripheral Interface, SPI Mode 15.2.3 Slave Mode Figure 15−3. USART Slave and External Master Receive Buffer UxRXBUF Receive Shift Register LSB MSB Transmit Buffer UxTXBUF Transmit Shift Register LSB MSB SPI Receive Buffer Data Shift Register DSR LSB MSB SOMI SOM...
USART Operation: SPI Mode 15-7 USART Peripheral Interface, SPI Mode 15.2.4 SPI Enable The SPI transmit/receive enable bit USPIEx enables or disables the USARTin SPI mode. When USPIEx = 0, the USART stops operation after the currenttransfer completes, or immediately if no operation is active. A PUC o...
USART Operation: SPI Mode 15-8 USART Peripheral Interface, SPI Mode Receive Enable The SPI receive enable state diagrams are shown in Figure 15−6 andFigure 15−7. When USPIEx = 0, UCLK is disabled from shifting data into theRX shift register. Figure 15−6. SPI Master Receive-Enable State Diagram Idle ...
USART Operation: SPI Mode 15-9 USART Peripheral Interface, SPI Mode 15.2.5 Serial Clock Control UCLK is provided by the master on the SPI bus. When MM = 1, BITCLK isprovided by the USART baud rate generator on the UCLK pin as shown inFigure 15−8. When MM = 0, the USART clock is provided on the UCLK ...
USART Operation: SPI Mode 15-10 USART Peripheral Interface, SPI Mode Serial Clock Polarity and Phase The polarity and phase of UCLK are independently configured via the CKPLand CKPH control bits of the USART. Timing for each case is shown inFigure 15−9. Figure 15−9. USART SPI Timing CKPH CKPL Cycle#...
USART Operation: SPI Mode 15-11 USART Peripheral Interface, SPI Mode 15.2.6 SPI Interrupts The USART has one interrupt vector for transmission and one interrupt vectorfor reception. SPI Transmit Interrupt Operation The UTXIFGx interrupt flag is set by the transmitter to indicate that UxTXBUFis ready...
USART Operation: SPI Mode 15-12 USART Peripheral Interface, SPI Mode SPI Receive Interrupt Operation The URXIFGx interrupt flag is set each time a character is received and loadedinto UxRXBUF as shown in Figure 15−11 and Figure 15−12. An interruptrequest is generated if URXIEx and GIE are also set. ...
USART Registers: SPI Mode 15-13 USART Peripheral Interface, SPI Mode 15.3 USART Registers: SPI Mode Table 15−1 lists the registers for all devices implementing a USART module.Table 15−2 applies only to devices with a second USART module, USART1. Table 15−1. USART0 Control and Status Registers Regist...
USART Registers: SPI Mode 15-19 USART Peripheral Interface, SPI Mode ME1, Module Enable Register 1 7 6 5 4 3 2 1 0 USPIE0 rw−0 Bit 7 This bit may be used by other modules. See device-specific datasheet. USPIE0 Bit 6 USART0 SPI enable. This bit enables the SPI mode for USART0.0 Module not enabled 1 M...
16-1 OA OA The OA is a general purpose operational amplifier. This chapter describes theOA. Three OA modules are implemented in the MSP430FG43x devices. Topic Page 16.1 OA Introduction 16-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16.2 OA Operation ...
OA Introduction 16-2 OA 16.1 OA Introduction The OA op amps support front-end analog signal conditioning prior to analog-to-digital conversion. Features of the OA include: - Single supply, low-current operation - Rail-to-rail output - Software selectable Rail-to-Rail input - Programmable settling ti...
OA Introduction 16-3 OA Figure 16−1. OA Block Diagram OAPMx OAPx 0 1 1 OAFBRx A12 ext. (OA0)A13 ext. (OA1)A14 ext. (OA2) OAADC0 4R 4R 2R 2R R R R R OAxOUT R BOTTOM RTOP OAx + − OAFCx={2 − 7} OAFBRx > 0 OAADC1OAFCx=0 OAFCx=1 R BOTTOM OAxTAP OAFCx=6 OAxI0 OA0I1 Int. DAC12_0OUT 00 01 10 11 0 1 OANx=...
OA 16-5 OA 16.2.4 OA Configurations The OA can be configured for different amplifier functions with the OAFCx bits.as listed in Table 16−1. Table 16−1. OA Mode Select OAFCx OA Mode 000 General-purpose opamp 001 Unity gain buffer 010 Reserved 011 Comparator 100 Non-inverting PGA amplifier 101 Reserve...
OA 16-6 OA Non-Inverting PGA Mode In this mode the output of the OAx is connected to R TOP and R BOTTOM is connected to AV SS . The OAxTAP signal is connected to the inverting input of the OAx providing a non-inverting amplifier configuration with a programmablegain of [1+OAxTAP ratio]. The OAxTAP r...
OA 16-7 OA Figure 16−2 shows an example of a two-opamp differential amplifier usingOA0 and OA1. The control register settings and are shown in Table 16−2. Thegain for the amplifier is selected by the OAFBRx bits for OA1 and is shown inTable 16−3. The OAx interconnections are shown in Figure 16−3. Ta...
OA 16-9 OA Figure 16−4 shows an example of a three-opamp differential amplifier usingOA0, OA1 and OA2. The control register settings are shown in Table 16−4.The gain for the amplifier is selected by the OAFBRx bits of OA0 and OA2. TheOAFBRx settings for both OA0 and OA2 must be equal. The gain setti...
OA Registers 16-11 OA 16.3 OA Registers The OA registers are listed in Table 16−6. Table 16−6. Register Short Form Register Type Address Initial State OA0 Control Register 0 OA0CTL0 Read/write 0C0h Reset with POR OA0 Control Register 1 OA0CTL1 Read/write 0C1h Reset with POR OA1 Control Register 0 OA...
OA Registers 16-12 OA OAxCTL0, Opamp Control Register 0 7 6 5 4 3 2 1 0 OANx OAPx OAPMx OAADC1 OAADC0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 OANx Bits7-6 Inverting input select. These bits select the input signal for the OA invertinginput.00 OAxI0 01 OAxI1 10 DAC0 internal 11 DAC1 internal OAPx Bit...
OA Registers 16-13 OA OAxCTL1, Opamp Control Register 1 7 6 5 4 3 2 1 0 OAFBRx OAFCx Reserved OARRIP rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 OAFBRx Bits7-5 OAx feedback resistor select000 Tap 0001 Tap 1010 Tap 2011 Tap 3100 Tap 4101 Tap 5110 Tap 6111 Tap 7 OAFCx Bits4-2 OAx function control. This bi...
Comparator_A Introduction 17-2 Comparator_A 17.1 Comparator_A Introduction The comparator_A module supports precision slope analog-to-digitalconversions, supply voltage supervision, and monitoring of external analogsignals. Features of Comparator_A include: - Inverting and non-inverting terminal inp...
Comparator_A Operation 17-4 Comparator_A 17.2 Comparator_A Operation The comparator_A module is configured with user software. The setup andoperation of comparator_A is discussed in the following sections. 17.2.1 Comparator The comparator compares the analog voltages at the + and – input terminals.I...
Comparator_A Operation 17-5 Comparator_A 17.2.3 Output Filter The output of the comparator can be used with or without internal filtering.When control bit CAF is set, the output is filtered with an on-chip RC-filter. Any comparator output oscillates if the voltage difference across the inputterminal...
Comparator_A Operation 17-6 Comparator_A 17.2.5 Comparator_A, Port Disable Register CAPD The comparator input and output functions are multiplexed with the associatedI/O port pins, which are digital CMOS gates. When analog signals are appliedto digital CMOS gates, parasitic current can flow from V C...
Comparator_A Operation 17-7 Comparator_A 17.2.7 Comparator_A Used to Measure Resistive Elements The Comparator_A can be optimized to precisely measure resistive elementsusing single slope analog-to-digital conversion. For example, temperature canbe converted into digital data using a thermistor, by ...
Comparator_A Operation 17-8 Comparator_A The thermistor measurement is based on a ratiometric conversion principle.The ratio of two capacitor discharge times is calculated as shown inFigure 17−6. Figure 17−6. Timing for Temperature Measurement Systems V C V CC 0.25 × V CC Phase I: Charge Phase II: D...
Comparator_A Registers 17-9 Comparator_A 17.3 Comparator_A Registers The Comparator_A registers are listed in Table 17−1. Table 17−1. Comparator_A Registers Register Short Form Register Type Address Initial State Comparator_A control register 1 CACTL1 Read/write 059h Reset with POR Comparator_A cont...
18-1 LCD Controller LCD Controller The LCD controller drives static, 2-mux, 3-mux, or 4-mux LCDs. This chapterdescribes LCD controller. The LCD controller is implemented on allMSP430x4xx devices, except the MSP430x42x0 devices. Topic Page 18.1 LCD Controller Introduction 18−2 . . . . . . . . . . . ....
LCD Controller Introduction 18-2 LCD Controller 18.1 LCD Controller Introduction The LCD controller directly drives LCD displays by creating the ac segmentand common voltage signals automatically. The MSP430 LCD controller cansupport static, 2-mux, 3-mux, and 4-mux LCDs. The LCD controller features ...
LCD Controller Introduction 18-3 LCD Controller Figure 18−1. LCD Controller Block Diagram Display Memory 20x 8−bits Segment Output Control Mux Analog Voltage Multiplexer Timing Generator R23 R13 R03 COM0 COM2 COM1 R33 COM3 S0 S1 Common Output Control S39 S38 SEG0 SEG1 SEG38 SEG39 Mux Mux Mux LCDP2 L...
LCD Controller Operation 18-4 LCD Controller 18.2 LCD Controller Operation The LCD controller is configured with user software. The setup and operationof LCD controller is discussed in the following sections. 18.2.1 LCD Memory The LCD memory map is shown in Figure 18−2. Each memory bit correspondsto...
LCD Controller Operation 18-5 LCD Controller 18.2.4 LCD Voltage Generation The voltages required for the LCD signals are supplied externally to pins R33,R23, R13, and R03. Using an equally weighted resistor divider ladder betweenthese pins establishes the analog voltages as shown in Table 18−1. Ther...
LCD Controller Operation 18-6 LCD Controller 18.2.6 Static Mode In static mode, each MSP430 segment pin drives one LCD segment and onecommon line, COM0, is used. Figure 18−3 shows some example staticwaveforms. Figure 18−3. Example Static Waveforms f frame COM0 SP1 SP2 Resulting Voltage forSegment a ...
LCD Controller Operation 18-7 LCD Controller Figure 18−4 shows an example static LCD, pin-out, LCD-to-MSP430connections, and the resulting segment mapping. This is only an example.Segment mapping in a user’s application depends on the LCD pin-out and onthe MSP430-to-LCD connections. Figure 18−4. Sta...
LCD Controller Operation 18-8 LCD Controller Static Mode Software Example ; All eight segments of a digit are often located in four ; display memory bytes with the static display method. ;a EQU 001h b EQU 010h c EQU 002h d EQU 020h e EQU 004h f EQU 040h g EQU 008h h EQU 080h ; The register content o...
LCD Controller Operation 18-9 LCD Controller 18.2.7 2-Mux Mode In 2-mux mode, each MSP430 segment pin drives two LCD segments and twocommon lines, COM0 and COM1, are used. Figure 18−5 shows someexample 2-mux waveforms. Figure 18−5. Example 2- Mux Waveforms COM1 COM0 COM0 COM1 SP1 SP2 SP1 SP2 SP3 SP4...
LCD Controller Operation 18-10 LCD Controller Figure 18−6 shows an example 2-mux LCD, pin-out, LCD-to-MSP430connections, and the resulting segment mapping. This is only an example.Segment mapping in a user’s application completely depends on the LCDpin-out and on the MSP430-to-LCD connections. Figur...
LCD Controller Operation 18-11 LCD Controller 2-Mux Mode Software Example ; All eight segments of a digit are often located in two ; display memory bytes with the 2mux display rate ;a EQU 002h b EQU 020h c EQU 008h d EQU 004h e EQU 040h f EQU 001h g EQU 080h h EQU 010h ; The register content of Rx s...
LCD Controller Operation 18-14 LCD Controller 3-Mux Mode Software Example ; The 3mux rate can support nine segments for each ; digit. The nine segments of a digit are located in ; 1 1/2 display memory bytes. ;a EQU 0040h b EQU 0400h c EQU 0200h d EQU 0010h e EQU 0001h f EQU 0002h g EQU 0020h h EQU 0...
LCD Controller Operation 18-16 LCD Controller Figure 18−10 shows an example 4-mux LCD, pin-out, LCD-to-MSP430connections, and the resulting segment mapping. This is only an example.Segment mapping in a user’s application depends on the LCD pin-out and onthe MSP430-to-LCD connections. Figure 18−10. 4...
LCD Controller Operation 18-17 LCD Controller 4-Mux Mode Software Example ; The 4mux rate supports eight segments for each digit. ; All eight segments of a digit can often be located in ; one display memory byte a EQU 080h b EQU 040h c EQU 020h d EQU 001h e EQU 002h f EQU 008h g EQU 004h h EQU 010h ...
LCD Controller Operation 18-18 LCD Controller 18.3 LCD Controller Registers The LCD Controller registers are listed in Table 18−2. Table 18−2. LCD Controller Registers Register Short Form Register Type Address Initial State LCD control register LCDCTL Read/write 090h Reset with PUC LCD memory 1 LCDM...
LCD Controller Operation 18-19 LCD Controller LCDCTL, LCD Control Register 7 6 5 4 3 2 1 0 LCDPx LCDMXx LCDSON Unused LCDON rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 LCDPx Bits7-5 LCD Port Select. These bits select the pin function to be port I/O or LCDfunction for groups of segments pins. These bits ...
19-1 LCD_A Controller LCD_A Controller The LCD_A controller drives static, 2-mux, 3-mux, or 4-mux LCDs. Thischapter describes the LCD_A controller. The LCD_A controller is implementedon the MSP430x42x0 and MSP430F46xx devices. Topic Page 19.1 LCD Controller Introduction 19−2 . . . . . . . . . . . . ...
LCD_A Controller Introduction 19-2 LCD_A Controller 19.1 LCD_A Controller Introduction The LCD_A controller directly drives LCD displays by creating the ac segmentand common voltage signals automatically. The MSP430 LCD controller cansupport static, 2-mux, 3-mux, and 4-mux LCDs. The LCD controller f...
LCD_A Controller Introduction 19-3 LCD_A Controller Figure 19−1. LCD_A Controller Block Diagram VLCDREFx Display Memory 20x 8−bits Segment Output Control Mux Analog Voltage Multiplexer Timing Generator COM0 COM2 COM1 COM3 S0 S1 Common Output Control S39 S38 SEG0 SEG1 SEG38 SEG39 Mux Mux Mux LCDSx LC...
LCD_A Controller Operation 19-4 LCD_A Controller 19.2 LCD_A Controller Operation The LCD_A controller is configured with user software. The setup andoperation of the LCD_A controller is discussed in the following sections. 19.2.1 LCD Memory The LCD memory map is shown in Figure 19−2. Each memory bit...
LCD_A Controller Operation 19-5 LCD_A Controller 19.2.3 LCD_A Voltage And Bias Generation The LCD_A module allows selectable sources for the peak output waveformvoltage, V1 , as well as the fractional LCD biasing voltages V2 − V5. V LCD may be sourced from AV CC , an internal charge pump, or externa...
LCD_A Controller Operation 19-6 LCD_A Controller To source the bias voltages V2 − V4 externally, REXT is set. This also disablesthe internal bias generation. Typically an equally weighted resistor divider isused with resistors ranging from 100 k to 1 M When using an external resistor divider, the V ...
LCD_A Controller Operation 19-7 LCD_A Controller The internal bias generator supports 1/2 bias LCDs when LCD2B = 1, and 1/3bias LCDs when LCD2B = 0 in 2-mux, 3-mux, and 4-mux modes. In staticmode the internal divider is disabled. Some devices share the LCDCAP, R33, and R23 functions. In this case, t...
LCD_A Controller Operation 19-8 LCD_A Controller 19.2.4 LCD Timing Generation The LCD_A controller uses the f LCD signal from the integrated ACLK prescaler to generate the timing for common and segment lines. ACLK is assumed tobe 32768 Hz for generating f LCD . The f LCD frequency is selected with t...
LCD_A Controller Operation 19-9 LCD_A Controller 19.2.6 Static Mode In static mode, each MSP430 segment pin drives one LCD segment and onecommon line, COM0, is used. Figure 19−4 shows some example staticwaveforms. Figure 19−4. Example Static Waveforms f frame COM0 SP1 SP2 Resulting Voltage forSegmen...
LCD_A Controller Operation 19-10 LCD_A Controller Figure 19−5 shows an example static LCD, pin-out, LCD-to-MSP430connections, and the resulting segment mapping. This is only an example.Segment mapping in a user’s application depends on the LCD pin-out and onthe MSP430-to-LCD connections. Figure 19−5...
LCD_A Controller Operation 19-13 LCD_A Controller Figure 19−7 shows an example 2-mux LCD, pin-out, LCD-to-MSP430connections, and the resulting segment mapping. This is only an example.Segment mapping in a user’s application completely depends on the LCDpin-out and on the MSP430-to-LCD connections. F...
LCD_A Controller Operation 19-21 LCD_A Controller 19.3 LCD Controller Registers The LCD Controller registers are listed in Table 19−2. Table 19−2. LCD Controller Registers Register Short Form Register Type Address Initial State LCD_A control register LCDACTL Read/write 090h Reset with PUC LCD memory...
LCD_A Controller Operation 19-22 LCD_A Controller LCDACTL, LCD_A Control Register 7 6 5 4 3 2 1 0 LCDFREQx LCDMXx LCDSON Unused LCDON rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 LCDFREQx Bits7-5 LCD Frequency Select. These bits select the ACLK divider for the LCDfrequency.000 Divide by 32001 Divide by 6...
LCD_A Controller Operation 19-25 LCD_A Controller LCDAVCTL0, LCD_A Voltage Control Register 0 7 6 5 4 3 2 1 0 Unused R03EXT REXT VLCDEXT LCDCPEN VLCDREFx LCD2B rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 Unused Bit 7 Unused R03EXT Bit 6 V5 voltage select. This bit selects the external connection for the...
LCD_A Controller Operation 19-26 LCD_A Controller LCDAVCTL1, LCD_A Voltage Control Register 1 7 6 5 4 3 2 1 0 Unused VLCDx Unused rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 Unused Bits7−5 Unused VLCDx Bits4−1 Charge pump voltage select. LCDCPEN must be 1 for the charge pump tobe enabled. AV CC is used ...
ADC12 Introduction 20-2 ADC12 20.1 ADC12 Introduction The ADC12 module supports fast, 12-bit analog-to-digital conversions. Themodule implements a 12-bit SAR core, sample select control, referencegenerator and a 16 word conversion-and-control buffer. Theconversion-and-control buffer allows up to 16 ...
ADC12 Operation 20-4 ADC12 20.2 ADC12 Operation The ADC12 module is configured with user software. The setup and operationof the ADC12 is discussed in the following sections. 20.2.1 12-Bit ADC Core The ADC core converts an analog input to its 12-bit digital representation andstores the result in con...
ADC12 Operation 20-5 ADC12 20.2.2 ADC12 Inputs and Multiplexer The eight external and four internal analog signals are selected as the channelfor conversion by the analog input multiplexer. The input multiplexer is abreak-before-make type to reduce input-to-input noise injection resulting fromchanne...
ADC12 Operation 20-6 ADC12 20.2.3 Voltage Reference Generator The ADC12 module contains a built-in voltage reference with two selectablevoltage levels, 1.5 V and 2.5 V. Either of these reference voltages may be usedinternally and externally on pin V REF+ . Setting REFON=1 enables the internal refere...
ADC12 Operation 20-7 ADC12 20.2.5 Sample and Conversion Timing An analog-to-digital conversion is initiated with a rising edge of the sampleinput signal SHI. The source for SHI is selected with the SHSx bits andincludes the following: - The ADC12SC bit - The Timer_A Output Unit 1 - The Timer_B Outpu...
ADC12 Operation 20-8 ADC12 Pulse Sample Mode The pulse sample mode is selected when SHP = 1. The SHI signal is used totrigger the sampling timer. The SHT0x and SHT1x bits in ADC12CTL0 controlthe interval of the sampling timer that defines the SAMPCON sample periodt sample. The sampling timer keeps S...
ADC12 Operation 20-9 ADC12 Sample Timing Considerations When SAMPCON = 0 all Ax inputs are high impedance. When SAMPCON =1, the selected Ax input can be modeled as an RC low-pass filter during thesampling time t sample , as shown below in Figure 20−5. An internal MUX-on input resistance R I (max. 2 ...
ADC12 Operation 20-10 ADC12 20.2.6 Conversion Memory There are 16 ADC12MEMx conversion memory registers to store conversionresults. Each ADC12MEMx is configured with an associated ADC12MCTLxcontrol register. The SREFx bits define the voltage reference and the INCHxbits select the input channel. The ...
ADC12 Operation 20-15 ADC12 Using the Multiple Sample and Convert (MSC) Bit To configure the converter to perform successive conversions automaticallyand as quickly as possible, a multiple sample and convert function is available.When MSC = 1, CONSEQx > 0, and the sample timer is used, the first ...
ADC12 Operation 20-16 ADC12 20.2.8 Using the Integrated Temperature Sensor To use the on-chip temperature sensor, the user selects the analog inputchannel INCHx = 1010. Any other configuration is done as if an externalchannel was selected, including reference selection, conversion-memoryselection, e...
ADC12 Operation 20-17 ADC12 20.2.9 ADC12 Grounding and Noise Considerations As with any high-resolution ADC, appropriate printed-circuit-board layout andgrounding techniques should be followed to eliminate ground loops, unwantedparasitic effects, and noise. Ground loops are formed when return curren...
ADC12 Operation 20-18 ADC12 20.2.10 ADC12 Interrupts The ADC12 has 18 interrupt sources: - ADC12IFG0-ADC12IFG15 - ADC12OV, ADC12MEMx overflow - ADC12TOV, ADC12 conversion time overflow The ADC12IFGx bits are set when their corresponding ADC12MEMx memoryregister is loaded with a conversion result. An...
ADC12 Operation 20-19 ADC12 ADC12 Interrupt Handling Software Example The following software example shows the recommended use of ADC12IVand the handling overhead. The ADC12IV value is added to the PC toautomatically jump to the appropriate routine. The numbers at the right margin show the necessary...
ADC12 Registers 20-20 ADC12 20.3 ADC12 Registers The ADC12 registers are listed in Table 20−2 . Table 20−2. ADC12 Registers Register Short Form Register Type Address Initial State ADC12 control register 0 ADC12CTL0 Read/write 01A0h Reset with POR ADC12 control register 1 ADC12CTL1 Read/write 01A2h R...
ADC12 Registers 20-21 ADC12 ADC12CTL0, ADC12 Control Register 0 15 14 13 12 11 10 9 8 SHT1x SHT0x rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) 7 6 5 4 3 2 1 0 MSC REF2_5V REFON ADC12ON ADC12OVIE ADC12 TOVIE ENC ADC12SC rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) Modifiable onl...
ADC12 Registers 20-23 ADC12 ADC12CTL1, ADC12 Control Register 1 15 14 13 12 11 10 9 8 CSTARTADDx SHSx SHP ISSH rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) 7 6 5 4 3 2 1 0 ADC12DIVx ADC12SSELx CONSEQx ADC12 BUSY rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) r−(0) Modifiable only when E...
ADC12 Registers 20-24 ADC12 ADC12SSELx Bits4-3 ADC12 clock source select00 ADC12OSC 01 ACLK 10 MCLK 11 SMCLK CONSEQx Bits2-1 Conversion sequence mode select00 Single-channel, single-conversion 01 Sequence-of-channels 10 Repeat-single-channel 11 Repeat-sequence-of-channels ADC12BUSY Bit 0 ADC12 busy....
ADC12 Registers 20-25 ADC12 ADC12MCTLx, ADC12 Conversion Memory Control Registers 7 6 5 4 3 2 1 0 EOS SREFx INCHx rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) Modifiable only when ENC = 0 EOS Bit 7 End of sequence. Indicates the last conversion in a sequence.0 Not end of sequence 1 End of...
ADC12 Registers 20-26 ADC12 ADC12IE, ADC12 Interrupt Enable Register 15 14 13 12 11 10 9 8 ADC12IE15 ADC12IE14 ADC12IE13 ADC12IE12 ADC12IE11 ADC12IE10 ADC12IE9 ADC12IE8 rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) 7 6 5 4 3 2 1 0 ADC12IE7 ADC12IE6 ADC12IE5 ADC12IE4 ADC12IE3 ADC12IE2 ADC12...
ADC12 Registers 20-27 ADC12 ADC12IV, ADC12 Interrupt Vector Register 15 14 13 12 11 10 9 8 0 0 0 0 0 0 0 0 r0 r0 r0 r0 r0 r0 r0 r0 7 6 5 4 3 2 1 0 0 0 ADC12IVx 0 r0 r0 r−(0) r−(0) r−(0) r−(0) r−(0) r0 ADC12IVx Bits15-0 ADC12 interrupt vector value ADC12IV Contents Interrupt Source Interrupt Flag Int...
SD16 Introduction 21-2 SD16 21.1 SD16 Introduction The SD16 module consists of up to three independent sigma-deltaanalog-to-digital converters and an internal voltage reference. Each channelhas up to 8 fully differential multiplexed inputs including a built-in temperaturesensor. The converters are b...
SD16 Operation 21-4 SD16 21.2 SD16 Operation The SD16 module is configured with user software. The setup and operationof the SD16 is discussed in the following sections. 21.2.1 ADC Core The analog-to-digital conversion is performed by a 1-bit, second-ordersigma-delta modulator. A single-bit comparat...
SD16 Operation 21-5 SD16 21.2.5 Channel Selection Each SD16 channel can convert up to 8 differential pair inputs multiplexed intothe PGA. Up to six input pairs (A0-A5) are available externally on the device.See the device-specific data sheet for analog input pin information. An internaltemperature s...
SD16 Operation 21-6 SD16 21.2.6 Digital Filter The digital filter processes the 1-bit data stream from the modulator using aSINC 3 comb filter. The transfer function is described in the z-Domain by: H ( z ) + ǒ 1 OSR 1 * z * OSR 1 * z * 1 Ǔ 3 and in the frequency domain by: H ǒ f Ǔ + ȧ ȱȲ sinc ǒ OSR...
SD16 Operation 21-7 SD16 Figure 21−3 shows the digital filter step response and conversion points. Forstep changes at the input after start of conversion a settling time must beallowed before a valid conversion result is available. The SD16INTDLYx bitscan provide sufficient filter settling time for ...
SD16 Operation 21-8 SD16 Digital Filter Output The number of bits output by each digital filter is dependent on theoversampling ratio and ranges from 16 to 24 bits. Figure 21−4 shows thedigital filter output bits and their relation to SD16MEMx for each OSR. Forexample, for OSR = 256 and LSBACC = 1, ...
SD16 Operation 21-9 SD16 21.2.7 Conversion Memory Registers: SD16MEMx One SD16MEMx register is associated with each SD16 channel. Conversionresults for each channel are moved to the corresponding SD16MEMx registerwith each decimation step of the digital filter. The SD16IFG bit for a givenchannel is ...
SD16 Operation 21-10 SD16 21.2.8 Conversion Modes The SD16 module can be configured for four modes of operation, listed inTable 21−2. The SD16SNGL and SD16GRP bits for each channel selects theconversion mode. Table 21−2. Conversion Mode Summary SD16SNGL SD16GRP { Mode Operation 1 0 Single channel,Si...
SD16 Operation 21-11 SD16 Figure 21−6. Single Channel Operation Channel 0SD16SNGL = 1SD16GRP = 0 Time Conversion SD16SC Channel 1SD16SNGL = 1SD16GRP = 0 Conversion Channel 2SD16SNGL = 0SD16GRP = 0 Conversion SD16SC SD16SC Conversion Conversion Conversion Set by SW Auto−clear Set by SW Auto−clear Set...
SD16 Operation 21-12 SD16 Group of Channels, Continuous Conversion When SD16SNGL = 0 for a channel in a group, continuous conversion modeis selected. Continuous conversion of that channel will occur synchronouslywhen the master channel SD16SC bit is set. SD16SC bits for all groupedchannels will be a...
SD16 Operation 21-13 SD16 21.2.9 Conversion Operation Using Preload When multiple channels are grouped the SD16PREx registers can be used todelay the conversion time frame for each channel. Using SD16PREx, thedecimation time of the digital filter is increased by the specified number of f M clock cyc...
SD16 Operation 21-14 SD16 Figure 21−9. Start of Conversion using Preload Delayed Conversion 40 SD16OSRx = 32 Start of Conversion Time Conversion 32 Conversion 32 f M cycles: 1st Sample Ch1 SD16PRE0 = 8 SD16PRE1 = 0 Conversion 32 Conversion 32 Conversion 32 Conversion 1st Sample Ch0 When channels are...
SD16 Operation 21-15 SD16 21.2.10 Using the Integrated Temperature Sensor To use the on-chip temperature sensor, the user selects the analog inputchannel SD16INCHx = 110. Any other configuration is done as if an externalchannel was selected, including SD16INTDLYx and SD16GAINx settings. The typical ...
SD16 Operation 21-16 SD16 21.2.11 Interrupt Handling The SD16 has 2 interrupt sources for each ADC channel: - SD16IFG - SD16OVIFG The SD16IFG bits are set when their corresponding SD16MEMx memoryregister is written with a conversion result. An interrupt request is generatedif the corresponding SD16I...
SD16 Operation 21-17 SD16 SD16 Interrupt Handling Software Example The following software example shows the recommended use of SD16IV andthe handling overhead. The SD16IV value is added to the PC to automaticallyjump to the appropriate routine. The numbers at the right margin show the necessary CPU ...
SD16 Registers 21-18 SD16 21.3 SD16 Registers The SD16 registers are listed in Table 21−3: Table 21−3. SD16 Registers Register Short Form Register Type Address Initial State SD16 Control SD16CTL Read/write 0100h Reset with PUC SD16 Interrupt Vector SD16IV Read/write 0110h Reset with PUC SD16 Channel...
SD16 Registers 21-19 SD16 SD16CTL, SD16 Control Register 15 14 13 12 11 10 9 8 Reserved SD16LP r0 r0 r0 r0 r0 r0 r0 rw−0 7 6 5 4 3 2 1 0 SD16DIVx SD16SSELx SD16 VMIDON SD16 REFON SD16OVIE Reserved rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 r0 Reserved Bits15-9 Reserved SD16LP Bit 8 Low power mode. This bit ...
SD16 Registers 21-20 SD16 SD16CCTLx, SD16 Channel x Control Register 15 14 13 12 11 10 9 8 Reserved SD16SNGL SD16OSRx r0 r0 r0 r0 r0 rw−0 rw−0 rw−0 7 6 5 4 3 2 1 0 SD16 LSBTOG SD16 LSBACC SD16 OVIFG SD16DF SD16IE SD16IFG SD16SC SD16GRP rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 r(w)−0 Reserved Bits15-11 Res...
SD16 Registers 21-21 SD16 SD16IFG Bit 2 SD16 interrupt flag. SD16IFG is set when new conversion results areavailable. SD16IFG is automatically reset when the correspondingSD16MEMx register is read, or may be cleared with software.0 No interrupt pending 1 Interrupt pending SD16SC Bit 1 SD16 start con...
SD16 Registers 21-22 SD16 SD16MEMx, SD16 Channel x Conversion Memory Register 15 14 13 12 11 10 9 8 Conversion Results r r r r r r r r 7 6 5 4 3 2 1 0 Conversion Results r r r r r r r r ConversionResult Bits15-0 Conversion Results. The SD16MEMx register holds the upper or lower16-bits of the digital...
SD16 Registers 21-23 SD16 SD16IV, SD16 Interrupt Vector Register 15 14 13 12 11 10 9 8 0 0 0 0 0 0 0 0 r0 r0 r0 r0 r0 r0 r0 r0 7 6 5 4 3 2 1 0 0 0 0 SD16IVx 0 r0 r0 r0 r−0 r−0 r−0 r−0 r0 SD16IVx Bits15-0 SD16 interrupt vector value SD16IV Contents Interrupt Source Interrupt Flag InterruptPriority 00...
SD16_A Operation 22-5 SD16_A 22.2.5 Channel Selection The SD16_A can convert up to 8 differential pair inputs multiplexed into thePGA. Up to five input pairs (A0-A4) are available externally on the device. Aresistive divider to measure the supply voltage is available using the A5multiplexer input. A...
SD16_A Operation 22-6 SD16_A 22.2.7 Digital Filter The digital filter processes the 1-bit data stream from the modulator using aSINC 3 comb filter. The transfer function is described in the z-Domain by: H ( z ) + ǒ 1 OSR 1 * z * OSR 1 * z * 1 Ǔ 3 and in the frequency domain by: H ǒ f Ǔ + ȧ ȱȲ sinc ǒ...
SD16_A Operation 22-7 SD16_A Figure 22−3 shows the digital filter step response and conversion points. Forstep changes at the input after start of conversion a settling time must beallowed before a valid conversion result is available. The SD16INTDLYx bitscan provide sufficient filter settling time ...
SD16_A Operation 22-8 SD16_A Digital Filter Output The number of bits output by the digital filter is dependent on the oversamplingratio and ranges from 15 to 30 bits. Figure 22−4 shows the digital filter outputand their relation to SD16MEM0 for each OSR, LSBACC, and SD16UNIsetting. For example, for...
SD16_A Operation 22-10 SD16_A 22.2.8 Conversion Memory Register: SD16MEM0 The SD16MEM0 register is associated with the SD16_A channel. Conversionresults are moved to the SD16MEM0 register with each decimation step of thedigital filter. The SD16IFG bit is set when new data is written to SD16MEM0.SD16...
SD16_A Operation 22-11 SD16_A 22.2.9 Conversion Modes The SD16_A module can be configured for two modes of operation, listed inTable 22−3. The SD16SNGL bit selects the conversion mode. Table 22−3. Conversion Mode Summary SD16SNGL Mode Operation 1 Single conversion The channel is converted once. 0 Co...
SD16_A Operation 22-12 SD16_A 22.2.10 Using the Integrated Temperature Sensor To use the on-chip temperature sensor, the user selects the analog inputchannel SD16INCHx = 110. Any other configuration is done as if an externalchannel was selected, including SD16INTDLYx and SD16GAINx settings. The typi...
SD16_A Operation 22-13 SD16_A 22.2.11 Interrupt Handling The SD16_A has 2 interrupt sources for its ADC channel: - SD16IFG - SD16OVIFG The SD16IFG bit is set when the SD16MEM0 memory register is written witha conversion result. An interrupt request is generated if the correspondingSD16IE bit and the...
SD16_A Registers 22-14 SD16_A 22.3 SD16_A Registers The SD16_A registers are listed in Table 22−4: Table 22−4. SD16_A Registers Register Short Form Register Type Address Initial State SD16_A Control SD16CTL Read/write 0100h Reset with PUC SD16_A Interrupt Vector SD16IV Read/write 0110h Reset with PU...
SD16_A Registers 22-15 SD16_A SD16CTL, SD16_A Control Register 15 14 13 12 11 10 9 8 Reserved SD16XDIV SD16LP r0 r0 r0 r0 rw−0 rw−0 rw−0 rw−0 7 6 5 4 3 2 1 0 SD16DIVx SD16SSELx SD16 VMIDON SD16 REFON SD16OVIE Reserved rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 r0 Reserved Bits15-12 Reserved SD16XDIV Bits11-...
SD16_A Registers 22-18 SD16_A SD16INCTL0, SD16_A Input Control Register 7 6 5 4 3 2 1 0 SD16INTDLYx SD16GAINx SD16INCHx rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 SD16INTDLYx Bits7-6 Interrupt delay generation after conversion start. These bits select thedelay for the first interrupt after conversion s...
SD16_A Registers 22-19 SD16_A SD16MEM0, SD16_A Conversion Memory Register 15 14 13 12 11 10 9 8 Conversion Results r r r r r r r r 7 6 5 4 3 2 1 0 Conversion Results r r r r r r r r ConversionResult Bits15-0 Conversion Results. The SD16MEMx register holds the upper or lower16-bits of the digital fil...
SD16_A Registers 22-20 SD16_A SD16IV, SD16_A Interrupt Vector Register 15 14 13 12 11 10 9 8 0 0 0 0 0 0 0 0 r0 r0 r0 r0 r0 r0 r0 r0 7 6 5 4 3 2 1 0 0 0 0 SD16IVx 0 r0 r0 r0 r−0 r−0 r−0 r−0 r0 SD16IVx Bits15-0 SD16_A interrupt vector value SD16IV Contents Interrupt Source Interrupt Flag InterruptPri...
DAC12 Introduction 23-2 DAC12 23.1 DAC12 Introduction The DAC12 module is a 12-bit, voltage output DAC. The DAC12 can beconfigured in 8- or 12-bit mode and may be used in conjunction with the DMAcontroller. When multiple DAC12 modules are present, they may be groupedtogether for synchronous update o...
DAC12 Operation 23-5 DAC12 23.2 DAC12 Operation The DAC12 module is configured with user software. The setup and operationof the DAC12 is discussed in the following sections. 23.2.1 DAC12 Core The DAC12 can be configured to operate in 8- or 12-bit mode using theDAC12RES bit. The full-scale output is...
DAC12 Operation 23-6 DAC12 23.2.2 DAC12 Reference On MSP430FG43x devices, the reference for the DAC12 is configured to useeither an external reference voltage or the internal 1.5-V/2.5-V reference fromthe ADC12 module with the DAC12SREFx bits. When DAC12SREFx = {0,1}the V REF+ signal is used as the ...
DAC12 Operation 23-8 DAC12 23.2.5 DAC12 Output Amplifier Offset Calibration The offset voltage of the DAC12 output amplifier can be positive or negative.When the offset is negative, the output amplifier attempts to drive the voltagenegative, but cannot do so. The output voltage remains at zero until...
DAC12 Operation 23-9 DAC12 23.2.6 Grouping Multiple DAC12 Modules Multiple DAC12s can be grouped together with the DAC12GRP bit tosynchronize the update of each DAC12 output. Hardware ensures that allDAC12 modules in a group update simultaneously independent of anyinterrupt or NMI event. On the MSP4...
DAC12 Registers 23-11 DAC12 23.3 DAC12 Registers The DAC12 registers are listed in Table 23−2. Table 23−2. DAC12 Registers Register Short Form Register Type Address Initial State DAC12_0 control DAC12_0CTL Read/write 01C0h Reset with POR DAC12_0 data DAC12_0DAT Read/write 01C8h Reset with POR DAC12_...
DAC12 Registers 23-13 DAC12 DAC12CALON Bit 9 DAC12 calibration on. This bit initiates the DAC12 offset calibration sequenceand is automatically reset when the calibration completes.0 Calibration is not active 1 Initiate calibration/calibration in progress DAC12IR Bit 8 DAC12 input range. This bit se...
DAC12 Registers 23-14 DAC12 DAC12_xDAT, DAC12 Data Register 15 14 13 12 11 10 9 8 0 0 0 0 DAC12 Data r(0) r(0) r(0) r(0) rw−(0) rw−(0) rw−(0) rw−(0) 7 6 5 4 3 2 1 0 DAC12 Data rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) Unused Bits15-12 Unused. These bits are always 0 and do not affect t...
24-1 Scan IF The Scan IF peripheral automatically scans sensors and measures linear orrotational motion. This chapter describes the Scan interface. The Scan IF isimplemented in the MSP430FW42x devices. Topic Page 24.1 Scan IF Introduction 24-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...
Scan IF Introduction 24-2 Scan IF 24.1 Scan IF Introduction The Scan IF module is used to automatically measure linear or rotationalmotion with the lowest possible power consumption. The Scan IF consists ofthree blocks: the analog front end (AFE), the processing state machine (PSM),and the timing st...
Scan IF Introduction 24-3 Scan IF Figure 24−1. Scan IF Block Diagram Timing State Machine (TSM) w/ oscillator Processing State Machine (PSM) Analog Input Multiplexer InterruptRequest RotationData ACLK SMCLK Analog Front−End (AFE) SIFCH1 SIFCH0 SIFCH2 SIFCH3 SIFCI0 SIFCOM SIFVSS SIFCI SIFCI1 SIFCI2 S...
Scan IF Operation 24-4 Scan IF 24.2 Scan IF Operation The Scan IF is configured with user software. The setup and operation of theScan IF is discussed in the following sections. 24.2.1 Scan IF Analog Front End The Scan IF analog front end provides sensor excitation and measurement.The analog front e...
Scan IF Operation 24-5 Scan IF Figure 24−2. Scan IF Analog Front End Block Diagram SIFTESTD SIFTESTS1(tsm) + − 1 0 SIFCH0 SIFCH1 SIFCH2 00 01 10 11 SIFCH3 1 0 SIFCI SIFCISEL SIFCAON SIFCAX SIFCACI3 10 11 01 00 SIFTCH0x 2 SIFTCH1x SIF2OUT SIF3OUT SIFTCH0OUT SIF1OUT SIF0OUT SIFTCH1OUT SIFCAINV SIFRSON...
Scan IF Operation 24-6 Scan IF Excitation The excitation circuitry is used to excite the LC sensors or to power the resistordividers. The excitation circuitry is shown in Figure 24−3 for one LC sensorconnected. When the SIFTEN bit is set and the SIFSH bit is cleared theexcitation circuitry is enable...
Scan IF Operation 24-8 Scan IF Sample-And-Hold The sample-and-hold is used to sample the sensor voltage to be measured.The sample-and-hold circuitry is shown in Figure 24−3. When SIFSH = 1 andSIFTEN = 0 the sample-and-hold circuitry is enabled and the excitationcircuitry and mid-voltage generator ar...
Scan IF Operation 24-9 Scan IF Direct Analog And Digital Inputs By setting the SIFCAX bit, external analog or digital signals can be connecteddirectly to the comparator through the SIFCIx inputs. This allowsmeasurement capabilities for optical encoders and other sensors. Comparator Input Selection A...
Scan IF Operation 24-10 Scan IF When SIFCAX = 1, the SIFCSEL and SIFCI3 bits select between the SIFCIxchannels and the SIFCI input allowing storage of the comparator output forone input signal into the four output bits SIF0OUT - SIF3OUT. This can be usedto observe the envelope function of sensors. T...
Scan IF Operation 24-11 Scan IF Comparator and DAC The analog input signals are converted into digital signals by the comparatorand the programmable 10-bit DAC. The comparator compares the selectedanalog signal to a reference voltage generated by the DAC. If the voltage isabove the reference the com...
Scan IF Operation 24-12 Scan IF For each input there are two DAC registers to set the reference level as listedin Table 24−3. Together with the last stored output of the comparator,SIFxOUT, the two levels can be used as an analog hysteresis as shown inFigure 24−6. The individual settings for the fou...
Scan IF Operation 24-13 Scan IF Internal Signal Connections to Timer1_A5 The outputs of the analog front end are connected to 3 differentcapture/compare registers of Timer1_A5. The output stage of the analog frontend, shown in Figure 24−7. provides two different modes that are selected bythe SIFCS b...
Scan IF Operation 24-15 Scan IF Figure 24−8. Timing State Machine Block Diagram SIFDIV3Bx State Pointer and Control Start Stop SIFTSM0 SIFTSM23 Set_SIFIFG2 SIFTSMx SIFCH0 SIFCH1 SIFLCOFF SIFEX SIFCA SIFCLKON SIFRSON SIFTESTS1 SIFDAC SIFSTOP SIFACLK SIFREPEAT0 SIFREPEAT1 SIFREPEAT2 SIFREPEAT3 SIFREPE...
Scan IF Operation 24-16 Scan IF TSM Operation The TSM state machine automatically starts and re-starts periodically basedon a divided ACLK start signal selected with the SIFDIV2x bits the SIFDIV3Axand SIFDIV3Bx bits when SIFTSMRP = 0. For example, if SIFDIV3A andSIFDIV3B are configured to 270 ACLK c...
Scan IF Operation 24-17 Scan IF TSM State Clock Source Select The TSM clock source is individually configurable for each state. The TSM canbe clocked from ACLK or a high frequency clock selected with the SIFACLKbit. When SIFACLK = 1, ACLK is used for the state, and when SIFACLK = 0,the high frequenc...
Scan IF Operation 24-18 Scan IF TSM Test Cycles For calibration purposes, to detect sensor drift, or to measure signals otherthan the sensor signals, a test cycle may be inserted between TSM cycles bysetting the SIFTESTD bit. The time between the TSM cycles is not altered bythe test cycle insertion ...
Scan IF Operation 24-19 Scan IF TSM Example Figure 24−10 shows an example for a TSM sequence. The TSMx registervalues for the example are shown in Table 24−6. ACLK and SIFCLK are notdrawn to scale. The TSM sequence starts with SIFTSM0 and ends with a setSIFSTOP bit in SIFTSM9. Only the SIFTSM5 to SI...
Scan IF Operation 24-21 Scan IF Figure 24−11. Scan IF Processing State Machine Block Diagram Q0 Q3 Q4 Q5 Q6 Q7 S2 S1 SIFQ6EN SIFQ7EN Q7 . . . Q0 Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 MSP430Memory Range State Table SIFCNT1 +1 −1 SIFCNT1ENM SIFEN SIFCNT1ENP SIFIS1x SIFCNT2 −1 SIFCNT2EN SIFIS2x Q6 Q7 ∆ 1 ∆ 4 ∆ 64 ∆ ...
Scan IF Operation 24-22 Scan IF The current-state and next-state logic are reset while the Scan IF is disabled.One of the bytes stored at addresses SIFPSMV to SIFPSMV + 3 will be loadedfirst depending on the S1 and S2 signals when the Scan IF is enabled. Signals S1 and S2 form a 2-bit offset added t...
Scan IF Operation 24-23 Scan IF PSM Counters The PSM has two 8-bit counters SIFCNT1 and SIFCNT2. SIFCNT1 is updatedwith Q1 and Q2 and SIFCNT2 is updated with Q2. The counters can be readvia the SIFCNT register. If the SIFCNTRST bit is set, each read access willreset the counters, otherwise the count...
Scan IF Operation 24-24 Scan IF Simplest State Machine Figure 24−12 shows the simplest state machine that can be realized with thePSM. The following code shows the corresponding state table and the PSMinitialization. Figure 24−12. Simplest PSM State Diagram S1=1 & S2=0 S1=0 & S2=0 S1=1 &...
Scan IF Operation 24-25 Scan IF If the PSM is in state 01 of the simplest state machine and the PSM has loadedthe corresponding byte at index 01h of the state table: Q7 Q6 Q5 Q4 Q3 Q2 Q1 Q0 0 0 0 0 0 0 0 0 For this example, S1 and S2 are set at the end of the next TSM sequence. Tocalculate the next ...
Scan IF Operation 24-27 Scan IF 24.2.5 Scan IF Interrupts The Scan IF has one interrupt vector for seven interrupt flags listed inTable 24−7. Each interrupt flag has its own interrupt enable bit. When aninterrupt is enabled, and the GIE bit is set, the interrupt flag will generate aninterrupt. The i...
Scan IF Operation 24-28 Scan IF 24.2.6 Using the Scan IF with LC Sensors Systems with LC sensors use a disk that is partially covered with a dampingmaterial to measure rotation. Rotation is measured with LC sensors byexciting the sensors and observing the resulting oscillation. The oscillation iseit...
Scan IF Operation 24-29 Scan IF 24.2.6.1 LC-Sensor Oscillation Test The oscillation test tests if the amplitude of the oscillation after sensorexcitation is above a reference level. The DAC is used to set the referencelevel for the comparator, and the comparator detects if the LC sensoroscillations ...
Scan IF Operation 24-30 Scan IF 24.2.6.2 LC-Sensor Envelope Test The envelop test measures the decay time of the oscillations after sensorexcitation. The oscillation envelope is created by the diodes and RC filters. TheDAC is used to set the reference level for the comparator, and the comparatordete...
Scan IF Operation 24-31 Scan IF Figure 24−17. LC Sensor Connections For The Envelope Test PowerSupplyTerminals SIFCI0 SIFCI SIFCI1 SIFCI2 SIFCI3 470 nF AV CC DV CC DV SS AV SS SIFVSS 470 nF SIFCOM SIFCH1 SIFCH0 SIFCH2 SIFCH3
Scan IF Operation 24-32 Scan IF 24.2.7 Using the Scan IF With Resistive Sensors Systems with GMRs use magnets on an impeller to measure rotation. Thedamping material and magnets modify the electrical behavior of the sensor sothat rotation and direction can be detected. Rotation is measured with resi...
Scan IF Operation 24-33 Scan IF 24.2.8 Quadrature Decoding The Scan IF can be used to decode quadrature-encoded signals. Signals thatare 90 ° out of phase with each other are said to be in quadrature. To Create the signals, two sensors are positioned depending on the slotting, or coatingof the encod...
Scan IF Operation 24-34 Scan IF Figure 24−20. Quadrature Decoding State Diagram 00 10 11 01 00 10 11 01 Correct State Transitions Erroneous State Transitions +1 −1 To transfer the state encoding into counts it is necessary to decide whatfraction of the rotation should be counted and on what state tr...
Scan IF Registers 24-35 Scan IF 24.3 Scan IF Registers The Scan IF registers are listed in Table 24−9. Table 24−9. Scan IF Registers Register Short Form Register Type Address Initial State Scan IF debug register SIFDEBUG Read/write 01B0h Unchanged Scan IF counter 1 and 2 SIFCNT Read/write 01B2h Rese...
Scan IF Registers 24-36 Scan IF SIFDEBUG, Scan IF Debug Register, Write Mode 15 14 13 12 11 10 9 8 Reserved w w w w w w w w 7 6 5 4 3 2 1 0 Reserved SIFDEBUGx w w w w w w w w Reserved Bits15-2 Reserved. Must be written as zero. SIFDEBUGx Bits1-0 SIFDEBUG register mode. Writing these bits selects the...
Scan IF Registers 24-37 Scan IF SIFDEBUG, Scan IF Debug Register, Read Mode After 01h Is Written 15 14 13 12 11 10 9 8 0 0 0 Index Of TSM Register r r r r r r r r 7 6 5 4 3 2 1 0 PSM Bits Q7 − Q0 r r r r r r r r Unused Bits15-13 Unused. After 01h is written to SIFDEBUG, these bits are always read as...
Scan IF Registers 24-38 Scan IF SIFDEBUG, Scan IF Debug Register, Read Mode After 03h Is Written 15 14 13 12 11 10 9 8 0 Active DAC Register 0 0 DAC Data r r r r r r r r 7 6 5 4 3 2 1 0 DAC Data r r r r r r r r Unused Bit 15 Unused. After 03h is written to SIFDEBUG, this bit is always read as zero. ...
Scan IF Registers 24-39 Scan IF SIFCNT, Scan IF Counter Register 15 14 13 12 11 10 9 8 SIFCNT2x r−(0) r−(0) r−(0) r−(0) r−(0) r−(0) r−(0) r−(0) 7 6 5 4 3 2 1 0 SIFCNT1x r−(0) r−(0) r−(0) r−(0) r−(0) r−(0) r−(0) r−(0) SIFCNT2x Bits15-8 SIFCNT2. These bits are the SIFCNT2 counter. SIFCNT2 is reset whe...
Scan IF Registers 24-40 Scan IF SIFCTL1, Scan IF Control Register 1 15 14 13 12 11 10 9 8 SIFIE6 SIFIE5 SIFIE4 SIFIE3 SIFIE2 SIFIE1 SIFIE0 SIFIFG6 rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) 7 6 5 4 3 2 1 0 SIFIFG5 SIFIFG4 SIFIFG3 SIFIFG2 SIFIFG1 SIFIFG0 SIFTESTD SIFEN rw−(0) rw−(0) rw−(...
Scan IF Registers 24-41 Scan IF SIFIFG0 Bit 2 SIF interrupt flag 0. This bit is set by the SIFxOUT conditions selected by theSIFIFGSETx bits. SIFIFG0 must be reset with software.0 No interrupt pending 1 Interrupt pending SIFTESTD Bit 1 Test cycle insertion. Setting this bit inserts a test cycle betw...
Scan IF Registers 24-42 Scan IF SIFCTL2, Scan IF Control Register 2 15 14 13 12 11 10 9 8 SIFDACON SIFCAON SIFCAINV SIFCAX SIFCISEL SIFCACI3 SIFVSS SIFVCC2 rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) 7 6 5 4 3 2 1 0 SIFSH SIFTEN SIFTCH1x SIFTCH0x SIFTCH1 OUT SIFTCH0 OUT rw−(0) rw−(0) rw−...
Scan IF Registers 24-43 Scan IF SIFVCC2 Bit 8 Mid-voltage generator0 AV CC /2 generator is off 1 AV CC /2 generator is on if SIFSH = 0 SIFSH Bit 7 Sample-and-hold enable0 Sample-and-hold is disabled 1 Sample-and-hold is enabled SIFTEN Bit 6 Excitation enable0 Excitation circuitry is disabled 1 Excit...
Scan IF Registers 24-44 Scan IF SIFCTL3, Scan IF Control Register 3 15 14 13 12 11 10 9 8 SIFS2x SIFS1x SIFIS2x SIFIS1x rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) 7 6 5 4 3 2 1 0 SIFCS SIFIFGSETx SIF3OUT SIF2OUT SIF1OUT SIF0OUT rw−(0) rw−(0) rw−(0) rw−(0) r−(0) r−(0) r−(0) r−(0) SIFS2x ...
Scan IF Registers 24-45 Scan IF SIFIFGSETx Bits6-4 SIFIFG0 interrupt flag source. These bits select when the SIFIFG0 flag is set.000 SIFIFG0 is set when SIF0OUT is set.001 SIFIFG0 is set when SIF0OUT is reset.010 SIFIFG0 is set when SIF1OUT is set.011 SIFIFG0 is set when SIF1OUT is reset.100 SIFIFG0...
Scan IF Registers 24-46 Scan IF SIFCTL4, Scan IF Control Register 4 15 14 13 12 11 10 9 8 SIFCNTRST SIFCNT2EN SIFCNT1 ENM SIFCNT1 ENP SIFQ7EN SIFQ6EN SIFDIV3Bx rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) 7 6 5 4 3 2 1 0 SIFDIV3Bx SIFDIV3Ax SIFDIV2x SIFDIV1x rw−(0) rw−(0) rw−(0) rw−(0) rw...
Scan IF Registers 24-48 Scan IF SIFCTL5, Scan IF Control Register 5 15 14 13 12 11 10 9 8 SIFCNT3x rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) 7 6 5 4 3 2 1 0 SIFTSMRP SIFCLFQx SIFFNOM SIFCLKG ON SIFCLKEN rw−(0) rw−(1) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) SIFCNT3x Bits15-8 Internal ...
Scan IF Registers 24-50 Scan IF SIFTSMx, Scan IF Timing State Machine Registers 15 14 13 12 11 10 9 8 SIFREPEATx SIFACLK SIFSTOP SIFDAC rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) 7 6 5 4 3 2 1 0 SIFTESTS1 SIFRSON SIFCLKON SIFCA SIFEX SIFLCEN SIFCHx rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−...
Scan IF Registers 24-51 Scan IF SIFCLKON Bit 5 High-frequency clock on. Setting this bit turns the high-frequency clock sourceon for this state when SIFACLK = 1, even though the high frequency clock isnot used for the TSM. When the high-frequency clock is sourced from theDCO, the DCO is forced on fo...
Scan IF Registers 24-52 Scan IF Processing State Machine Table Entry (MSP430 Memory Location) 7 6 5 4 3 2 1 0 Q7 Q6 Q5 Q4 Q3 Q2 Q1 Q0 Q7 Bit 7 When Q7 = 1, SIFIFG6 will be set. When SIFQ6EN = 1 and SIFQ7EN = 1and Q7 = 1, the PSM proceeds to the next state immediately, regardless ofthe SIFSTOP(tsm) s...
Texas Instruments Manuals
-
Texas Instruments 60X
Manual
-
Texas Instruments TAS5508-5142K7EVM
Manual
-
Texas Instruments SLUU083A
Manual
-
Texas Instruments TSC2007EVM-PDK
Manual
-
Texas Instruments TNETE211
Manual
-
Texas Instruments TI-83 PLUS
Manual
-
Texas Instruments TPS53125EVM-599
Manual
-
Texas Instruments 47
Manual
-
Texas Instruments TI-83
Manual
-
Texas Instruments ADS5102 EVM
Manual
-
Texas Instruments TMS320F2801
Manual
-
Texas Instruments TPA6139A2 EVM
Manual
-
Texas Instruments 2000
Manual
-
Texas Instruments 3000
Manual
-
Texas Instruments UCC38500EVM
Manual
-
Texas Instruments CS-FX300MS PLUS
Manual
-
Texas Instruments SPRAA56
Manual
-
Texas Instruments TNETE100A
Manual
-
Texas Instruments TNETE110A
Manual
-
Texas Instruments TMS320DM646X DMSOC
Manual