Texas Instruments MSP430x1xx Instrukcja Użytkownika

Przeglądaj online lub pobierz Instrukcja Użytkownika dla Generatory prądu Texas Instruments MSP430x1xx. Texas Instruments MSP430x1xx User's Manual Instrukcja obsługi

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 432
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów

Podsumowanie treści

Strona 1 - User’s Guide

  2005 Mixed Signal ProductsUser’s GuideSLAU049E

Strona 2

Contentsx10 Watchdog Timer 10-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Strona 3 - 

Instruction Set3-64 RISC 16−Bit CPU* SETN Set negative bitSyntax SETNOperation 1 −> NEmulation BIS #4,SRDescription The negative bit (N) is set.St

Strona 4 - Glossary

Instruction Set3-65 RISC 16−Bit CPU* SETZ Set zero bitSyntax SETZOperation 1 −> ZEmulation BIS #2,SRDescription The zero bit (Z) is set.Status Bit

Strona 5 - Register Bit Conventions

Instruction Set3-66 RISC 16−Bit CPUSUB[.W] Subtract source from destinationSUB.B Subtract source from destinationSyntax SUB src,dst or SUB.W src,dstS

Strona 6

Instruction Set3-67 RISC 16−Bit CPUSUBC[.W]SBB[.W] Subtract source and borrow/.NOT. carry from destinationSUBC.B,SBB.B Subtract source and borrow/

Strona 7 - 

Instruction Set3-68 RISC 16−Bit CPUSWPB Swap bytesSyntax SWPB dstOperation Bits 15 to 8 <−> bits 7 to 0Description The destination operand high

Strona 8

Instruction Set3-69 RISC 16−Bit CPUSXT Extend SignSyntax SXT dstOperation Bit 7 −> Bit 8 ... Bit 15Description The sign of the low byte is e

Strona 9 - Contents

Instruction Set3-70 RISC 16−Bit CPU* TST[.W] Test destination* TST.B Test destinationSyntax TST dst or TST.W dstTST.B dstOperation dst + 0FFFFh + 1dst

Strona 10 - Contents

Instruction Set3-71 RISC 16−Bit CPUXOR[.W] Exclusive OR of source with destinationXOR.B Exclusive OR of source with destinationSyntax XOR src,dst or

Strona 11

Instruction Set3-72 RISC 16−Bit CPU3.4.4 Instruction Cycles and LengthsThe number of CPU clock cycles required for an instruction depends on theinstru

Strona 12

Instruction Set3-73 RISC 16−Bit CPUFormat-I (Double Operand) Instruction Cycles and LengthsTable 3−16 lists the length and CPU cycles for all address

Strona 13 - 

Contentsxi 14 USART Peripheral Interface, SPI Mode 14-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14.1 USA

Strona 14 - 1.2 Flexible Clock System

Instruction Set3-74 RISC 16−Bit CPU3.4.5 Instruction Set DescriptionThe instruction map is shown in Figure 3−20 and the complete instruction setis sum

Strona 15 - 1.3 Embedded Emulation

Instruction Set3-75 RISC 16−Bit CPUTable 3−17.MSP430 Instruction SetMnemonic Description V N Z CADC(.B)†dst Add C to destination dst + C → dst * * *

Strona 17 - 1.4.5 Memory Organization

4-1Basic Clock Module  "# "The basic clock module provides the clocks for MSP430x1xx devices. Thischapter describes the opera

Strona 18 - Introduction

Basic Clock Module Introduction4-2Basic Clock Module4.1 Basic Clock Module IntroductionThe basic clock module supports low system cost and ultralow-po

Strona 19 - 

Basic Clock Module Introduction4-3Basic Clock ModuleFigure 4−1. Basic Clock Block DiagramDivider/1/2/4/8DIVAxMCLKCPUOFFDCOCLKXINXOUTDCORP2.5/RoscLFXT1

Strona 20

Basic Clock Module Operation4-4Basic Clock Module4.2 Basic Clock Module OperationAfter a PUC, MCLK and SMCLK are sourced from DCOCLK at ~800 kHz (seed

Strona 21 - Figure 2−2. POR Timing

Basic Clock Module Operation4-5Basic Clock Module4.2.2 LFXT1 OscillatorThe LFXT1 oscillator supports ultralow-current consumption using a32,768-Hz wat

Strona 22 - Figure 2−3. Brownout Timing

Basic Clock Module Operation4-6Basic Clock Module4.2.3 XT2 OscillatorSome devices have a second crystal oscillator, XT2. XT2 sources XT2CLKand its cha

Strona 23 - Software Initialization

Basic Clock Module Operation4-7Basic Clock ModuleAdjusting the DCO frequencyAfter a PUC, the internal resistor is selected for the DC generator, RSELx

Strona 24 - 2.2 Interrupts

Contentsxii18 ADC10 18-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Strona 25 - Reset/NMI Pin

Basic Clock Module Operation4-8Basic Clock ModuleUsing an External Resistor (ROSC) for the DCOThe DCO temperature coefficient can be reduced by using

Strona 26

Basic Clock Module Operation4-9Basic Clock Module4.2.5 DCO ModulatorThe modulator mixes two DCO frequencies, fDCO and fDCO+1 to produce anintermediate

Strona 27 - Oscillator Fault

Basic Clock Module Operation4-10Basic Clock Module4.2.6 Basic Clock Module Fail-Safe OperationThe basic clock module incorporates an oscillator-fault

Strona 28 - 2.2.2 Maskable Interrupts

Basic Clock Module Operation4-11Basic Clock ModuleOscillator Fault DetectionSignal XT_OscFault triggers the OFIFG flag as shown in Figure 4−10. TheLFX

Strona 29 - Interrupt Acceptance

Basic Clock Module Operation4-12Basic Clock ModuleSourcing MCLK from a CrystalAfter a PUC, the basic clock module uses DCOCLK for MCLK. If required,MC

Strona 30 - Interrupt Nesting

Basic Clock Module Operation4-13Basic Clock Module4.2.7 Synchronization of Clock SignalsWhen switching MCLK or SMCLK from one clock source to the anot

Strona 31 - 2.2.4 Interrupt Vectors

Basic Clock Module Registers 4-14Basic Clock Module4.3 Basic Clock Module Registers The basic clock module registers are listed in Table 4−1:Table 4−1

Strona 32 - 2.3 Operating Modes

Basic Clock Module Registers 4-15Basic Clock ModuleDCOCTL, DCO Control Register76543210DCOx MODxrw−0 rw−1 rw−1 rw−0 rw−0 rw−0 rw−0 rw−0DCOxBits7-5DCO

Strona 33

Basic Clock Module Registers 4-16Basic Clock ModuleBCSCTL2, Basic Clock System Control Register 276543210SELMx DIVMx SELS DIVSx DCORrw−(0) rw−(0) rw−(

Strona 34

Basic Clock Module Registers 4-17Basic Clock ModuleIE1, Interrupt Enable Register 176543210OFIErw−0Bits7-2These bits may be used by other modules. See

Strona 35 - 2.5 Connection of Unused Pins

1-1Introduction This chapter describes the architecture of the MSP430.Topic Page1.1 Architecture 1-2. . . . . . . . . . . . . . . . . . .

Strona 36

4-18Basic Clock Module

Strona 37 -   !

5-1 Flash Memory Controller "  ""This chapter describes the operation of the MSP430 flash memory controller.Topic

Strona 38 - 3.1 CPU Introduction

Flash Memory Introduction5-2 Flash Memory Controller5.1 Flash Memory IntroductionThe MSP430 flash memory is bit-, byte-, and word-addressable andprogr

Strona 39 - Figure 3−1. CPU Block Diagram

Flash Memory Segmentation5-3 Flash Memory Controller5.2 Flash Memory SegmentationMSP430 flash memory is partitioned into segments. Single bits, bytes,

Strona 40 - 3.2 CPU Registers

Flash Memory Operation5-4 Flash Memory Controller5.3 Flash Memory OperationThe default mode of the flash memory is read mode. In read mode, the flashm

Strona 41 - Figure 3−4. Stack Usage

Flash Memory Operation5-5 Flash Memory Controller5.3.2 Erasing Flash MemoryThe erased level of a flash memory bit is 1. Each bit can be programmed fro

Strona 42 - 3.2.3 Status Register (SR)

Flash Memory Operation5-6 Flash Memory ControllerInitiating an Erase from Within Flash MemoryAny erase cycle can be initiated from within flash memory

Strona 43

Flash Memory Operation5-7 Flash Memory ControllerInitiating an Erase from RAMAny erase cycle may be initiated from RAM. In this case, the CPU is not h

Strona 44

Flash Memory Operation5-8 Flash Memory Controller5.3.3 Writing Flash MemoryThe write modes, selected by the WRT and BLKWRT bits, are listed inTable 5−

Strona 45 - 3.3 Addressing Modes

Flash Memory Operation5-9 Flash Memory ControllerIn byte/word mode, the internally-generated programming voltage is appliedto the complete 64-byte blo

Strona 46 - 3.3.1 Register Mode

Architecture1-2Introduction1.1 ArchitectureThe MSP430 incorporates a 16-bit RISC CPU, peripherals, and a flexible clocksystem that interconnect using

Strona 47 - 3.3.2 Indexed Mode

Flash Memory Operation5-10 Flash Memory ControllerInitiating a Byte/Word Write from RAMThe flow to initiate a byte/word write from RAM is shown in Fig

Strona 48 - 3.3.3 Symbolic Mode

Flash Memory Operation5-11 Flash Memory ControllerBlock WriteThe block write can be used to accelerate the flash write process when manysequential byt

Strona 49 - 3.3.4 Absolute Mode

Flash Memory Operation5-12 Flash Memory ControllerBlock Write Flow and ExampleA block write flow is shown in Figure 5−8 and the following example.Figu

Strona 50 - 3.3.5 Indirect Register Mode

Flash Memory Operation5-13 Flash Memory Controller; Write one block starting at 0F000h.; Must be executed from RAM, Assumes Flash is already erased.;

Strona 51

Flash Memory Operation5-14 Flash Memory Controller5.3.4 Flash Memory Access During Write or EraseWhen any write or any erase operation is initiated fr

Strona 52 - 3.3.7 Immediate Mode

Flash Memory Operation5-15 Flash Memory Controller5.3.5 Stopping a Write or Erase CycleAny write or erase operation can be stopped before its normal c

Strona 53 - 3.4 Instruction Set

Flash Memory Operation5-16 Flash Memory ControllerProgramming Flash Memory via JTAGMSP430 devices can be programmed via the JTAG port. The JTAG interf

Strona 54

Flash Memory Registers5-17 Flash Memory Controller5.4 Flash Memory RegistersThe flash memory registers are listed in Table 5−4.Table 5−4.Flash Memory

Strona 55 - B/W D/S-Reg

Flash Memory Registers5-18 Flash Memory ControllerFCTL1, Flash Memory Control Register15 14 13 12 11 10 9 8FRKEY, Read as 096hFWKEY, Must be written a

Strona 56 - Table 3−13.Jump Instructions

Flash Memory Registers5-19 Flash Memory ControllerFCTL2, Flash Memory Control Register15 14 13 12 11 10 9 8FWKEYx, Read as 096hMust be written as 0A5h

Strona 57

Embedded Emulation1-3IntroductionFigure 1−1. MSP430 ArchitectureACLKBusConv.PeripheralMAB 16-BitMDB 16-BitMCLKSMCLKClockSystemPeripheral PeripheralPer

Strona 58

Flash Memory Registers5-20 Flash Memory ControllerFCTL3, Flash Memory Control Register FCTL315 14 13 12 11 10 9 8FWKEYx, Read as 096hMust be written a

Strona 59

Flash Memory Registers5-21 Flash Memory ControllerIE1, Interrupt Enable Register 176543210ACCVIErw−0Bits7-6,4-0These bits may be used by other modules

Strona 60

5-22 Flash Memory Controller

Strona 61

6-1Supply Voltage Supervisor " $" %This chapter describes the operation of the SVS. The SVS is implemented inMSP430x15x

Strona 62

SVS Introduction6-2Supply Voltage Supervisor6.1 SVS IntroductionThe supply voltage supervisor (SVS) is used to monitor the AVCC supplyvoltage or an ex

Strona 63

SVS Introduction6-3Supply Voltage SupervisorFigure 6−1. SVS Block Diagram+− 1.25VBrownoutResetVCCSet SVSFGtReset ~ 50usResetSVSCTL Bits000100100011111

Strona 64

SVS Operation6-4Supply Voltage Supervisor6.2 SVS OperationThe SVS detects if the AVCC voltage drops below a selectable level. It can beconfigured to p

Strona 65

SVS Operation6-5Supply Voltage Supervisor6.2.3 Changing the VLDx BitsWhen the VLDx bits are changed, two settling delays are implemented toallows the

Strona 66

SVS Operation6-6Supply Voltage Supervisor6.2.4 SVS Operating RangeEach SVS level has hysteresis to reduce sensitivity to small supply voltagechanges w

Strona 67 - Clear carry bit

SVS Registers6-7Supply Voltage Supervisor6.3 SVS RegistersThe SVS registers are listed in Table 6−1.Table 6−1.SVS RegistersRegister Short Form Registe

Strona 68 - Clear negative bit

Address Space1-4Introduction1.4 Address SpaceThe MSP430 von-Neumann architecture has one address space shared withspecial function registers (SFRs), p

Strona 69

6-8Supply Voltage Supervisor

Strona 70

7-1Hardware Multiplier &'""This chapter describes the hardware multiplier. The hardware multiplier isimplemented in

Strona 71

Hardware Multiplier Introduction7-2Hardware Multiplier7.1 Hardware Multiplier IntroductionThe hardware multiplier is a peripheral and is not part of t

Strona 72

Hardware Multiplier Operation7-3Hardware Multiplier7.2 Hardware Multiplier OperationThe hardware multiplier supports unsigned multiply, signed multipl

Strona 73 - Decrement destination

Hardware Multiplier Operation7-4Hardware Multiplier7.2.2 Result RegistersThe result low register RESLO holds the lower 16-bits of the calculation resu

Strona 74

Hardware Multiplier Operation7-5Hardware Multiplier7.2.3 Software ExamplesExamples for all multiplier modes follow. All 8x8 modes use the absoluteaddr

Strona 75

Hardware Multiplier Operation7-6Hardware Multiplier7.2.4 Indirect Addressing of RESLOWhen using indirect or indirect autoincrement addressing mode to

Strona 76

Hardware Multiplier Registers7-7Hardware Multiplier7.3 Hardware Multiplier RegistersThe hardware multiplier registers are listed in Table 7−4.Table 7−

Strona 78

8-1 () ""The DMA controller module transfers data from one address to anotherwithout CPU intervention. This chapter describes the

Strona 79

Address Space1-5Introduction1.4.3 Peripheral ModulesPeripheral modules are mapped into the address space. The address spacefrom 0100 to 01FFh is reser

Strona 80

8-28.1 DMA IntroductionThe direct memory access (DMA) controller transfers data from one addressto another, without CPU intervention, across the entir

Strona 81

8-3Figure 8−1. DMA Controller Block DiagramDMA Priority And ControlENNMIDTDMA Channel 2DMASRSBYTEDMA2SZDMA2DADMA2SADMADSTBYTEDMASRCINCRxDMADSTINCRx223

Strona 82 - Jump if greater or equal

8-48.2 DMA OperationThe DMA controller is configured with user software. The setup and operationof the DMA is discussed in the following sections.8.2.

Strona 83 - Jump if less

8-58.2.2 DMA Transfer ModesThe DMA controller has six transfer modes selected by the DMADTx bits aslisted in Table 8−1. Each channel is individually c

Strona 84 - Jump unconditionally

8-6Single TransferIn single transfer mode, each byte/word transfer requires a separate trigger.The single transfer state diagram is shown in Figure 8−

Strona 85 - Jump if negative

8-7Figure 8−3. DMA Single Transfer State DiagramResetWait for TriggerIdleHold CPU,Transfer one word/byte[+Trigger AND DMALEVEL = 0 ]OR[Trigger=1 AND

Strona 86

8-8Block TransfersIn block transfer mode, a transfer of a complete block of data occurs after onetrigger. When DMADTx = 1, the DMAEN bit is cleared af

Strona 87

8-9Figure 8−4. DMA Block Transfer State DiagramResetWait for TriggerIdleHold CPU,Transfer one word/byte[+Trigger AND DMALEVEL = 0 ]OR[Trigger=1 AND D

Strona 88

8-10Burst-Block TransfersIn burst-block mode, transfers are block transfers with CPU activityinterleaved. The CPU executes 2 MCLK cycles after every f

Strona 89 - No operation

8-11Figure 8−5. DMA Burst-Block Transfer State Diagram2 x MCLKResetWait for TriggerIdleHold CPU,Transfer one word/byteBurst State(release CPU for 2xMC

Strona 90

1-6Introduction

Strona 91

8-128.2.3 Initiating DMA TransfersEach DMA channel is independently configured for its trigger source with theDMAxTSELx bits as described in Table 8−2

Strona 92

8-13Table 8−2.DMA Trigger OperationDMAxTSELx Operation0000 A transfer is triggered when the DMAREQ bit is set. The DMAREQ bit is automatically resetwh

Strona 93

8-148.2.4 Stopping DMA TransfersThere are two ways to stop DMA transfers in progress:- A single, block, or burst-block transfer may be stopped with an

Strona 94 - Rotate left arithmetically

8-158.2.6 DMA Transfer Cycle TimeThe DMA controller requires one or two MCLK clock cycles to synchronizebefore each single transfer or complete block

Strona 95 - Rotate left through carry

8-168.2.7 Using DMA with System InterruptsDMA transfers are not interruptible by system interrupts. System interruptsremain pending until the completi

Strona 96

8-178.2.9 Using the I2C Module with the DMA ControllerThe I2C module provides two trigger sources for the DMA controller. The I2Cmodule can trigger a

Strona 97

8-188.3 DMA RegistersThe DMA registers are listed in Table 8−4:Table 8−4.DMA RegistersRegister Short Form Register Type Address Initial StateDMA contr

Strona 98

8-19DMACTL0, DMA Control Register 015 14 13 12 11 10 9 8Reserved DMA2TSELxrw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0)76543210DMA1TSELx DMA

Strona 99

8-20DMACTL1, DMA Control Register 115 14 13 12 11 10 9 80 0 0 0 0 0 0 0r0 r0 r0 r0 r0 r0 r0 r0765432100 0 0 0 0DMAONFETCHROUNDROBINENNMIr0 r0 r0 r0 r0

Strona 100 - RISC 16−Bit CPU

8-21DMAxCTL, DMA Channel x Control Register15 14 13 12 11 10 9 8Reserved DMADTx DMADSTINCRx DMASRCINCRxrw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0

Strona 101 - Instruction Set

2-1System Resets, Interrupts, and Operating Modes This chapter describes the MSP430x1xx system resets, in

Strona 102

8-22DMASRCBYTEBit 6 DMA source byte. This bit selects the source as a byte or word.0 Word1 ByteDMALEVELBit 5 DMA level. This bit selects between edge-

Strona 103

8-23DMAxDA, DMA Destination Address Register15 14 13 12 11 10 9 8DMAxDAxrw rw rw rw rw rw rw rw76543210DMAxDAxrw rw rw rw rw rw rw rwDMAxDAx Bits15−0D

Strona 105

9-1Digital I/O ("*This chapter describes the operation of the digital I/O ports. Ports P1-P2 areimplemented in MSP430x11xx devices. Ports

Strona 106

Digital I/O Introduction9-2Digital I/O9.1 Digital I/O IntroductionMSP430 devices have up to 6 digital I/O ports implemented, P1 - P6. Each porthas eig

Strona 107

Digital I/O Operation9-3Digital I/O9.2 Digital I/O Operation The digital I/O is configured with user software. The setup and operation of thedigital I

Strona 108

Digital I/O Operation9-4Digital I/O9.2.4 Function Select Registers PxSELPort pins are often multiplexed with other peripheral module functions. See th

Strona 109

Digital I/O Operation9-5Digital I/O9.2.5 P1 and P2 InterruptsEach pin in ports P1 and P2 have interrupt capability, configured with thePxIFG, PxIE, an

Strona 110

Digital I/O Operation9-6Digital I/OInterrupt Edge Select Registers P1IES, P2IESEach PxIES bit selects the interrupt edge for the corresponding I/O pin

Strona 111 - → PC − − − −

Digital I/O Registers9-7Digital I/O9.3 Digital I/O Registers Seven registers are used to configure P1 and P2. Four registers are used toconfigure port

Strona 112

IMPORTANT NOTICETexas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications,enhancements, improvemen

Strona 113 - Chapter 4

System Reset and Initialization2-2System Resets, Interrupts, and Operating Modes2.1 System Reset and InitializationThe system reset circuitry shown in

Strona 114

9-8Digital I/O

Strona 115 - Note: XT2 Oscillator

10-1Watchdog Timer + The watchdog timer is a 16-bit timer that can be used as a watchdog or as aninterval timer. This chapter describes t

Strona 116 - Basic Clock Module

Watchdog Timer Introduction10-2Watchdog Timer10.1 Watchdog Timer IntroductionThe primary function of the watchdog timer (WDT) module is to perform aco

Strona 117 - 4.2.2 LFXT1 Oscillator

Watchdog Timer Introduction10-3Watchdog TimerFigure 10−1. Watchdog Timer Block DiagramWDTQnY1234Q6Q9Q13Q1516−bitCounterCLKAB11AENPUCSMCLKACLKClearPass

Strona 118 - Disabling the DCO

Watchdog Timer Operation10-4Watchdog Timer10.2 Watchdog Timer OperationThe WDT module can be configured as either a watchdog or interval timer withthe

Strona 119 - Adjusting the DCO frequency

Watchdog Timer Operation10-5Watchdog Timer10.2.4 Watchdog Timer InterruptsThe WDT uses two bits in the SFRs for interrupt control.- The WDT interrupt

Strona 120 - ) for the DCO

Watchdog Timer Operation10-6Watchdog Timer10.2.5 Operation in Low-Power ModesThe MSP430 devices have several low-power modes. Different clock signalsa

Strona 121 - 4.2.5 DCO Modulator

Watchdog Timer Registers10-7Watchdog Timer10.3 Watchdog Timer RegistersThe watchdog timer module registers are listed in Table 10−1.Table 10−1.Watchdo

Strona 122

Watchdog Timer Registers10-8Watchdog TimerWDTCTL, Watchdog Timer Register15 14 13 12 11 10 9 8Read as 069hWDTPW, must be written as 05Ah76543210WDTHOL

Strona 123 - Oscillator Fault Detection

Watchdog Timer Registers10-9Watchdog TimerIE1, Interrupt Enable Register 176543210NMIIE WDTIErw−0 rw−0Bits7-5These bits may be used by other modules.

Strona 124 - Sourcing MCLK from a Crystal

System Reset and Initialization2-3System Resets, Interrupts, and Operating Modes2.1.1 Power-On Reset (POR)When the VCC rise time is slow, the POR dete

Strona 125

Watchdog Timer Registers10-10Watchdog TimerIFG1, Interrupt Flag Register 176543210NMIIFG WDTIFGrw−(0) rw−(0)Bits7-5These bits may be used by other mod

Strona 126

11-1Timer_A ,)Timer_A is a 16-bit timer/counter with three capture/compare registers. Thischapter describes Timer_A. Timer_A is implemented in al

Strona 127 - DCOCTL, DCO Control Register

Timer_A Introduction11-2Timer_A11.1 Timer_A IntroductionTimer_A is a 16-bit timer/counter with three capture/compare registers.Timer_A can support mul

Strona 128 - SELMx DIVMx SELS DIVSx DCOR

Timer_A Introduction11-3Timer_AFigure 11−1. Timer_A Block DiagramCompararator 2CCI15 0CCISxOUTMODxCaptureModeCMxSyncSCSCOVlogicOutputUnit2DSetQEQU0OUT

Strona 129 - Basic Clock Module Registers

Timer_A Operation11-4Timer_A11.2 Timer_A OperationThe Timer_A module is configured with user software. The setup andoperation of Timer_A is discussed

Strona 130

Timer_A Operation11-5Timer_A11.2.2 Starting the TimerThe timer may be started, or restarted in the following ways:- The timer counts when MCx > 0 a

Strona 131 - Chapter 5

Timer_A Operation11-6Timer_AUp ModeThe up mode is used if the timer period must be different from 0FFFFh counts.The timer repeatedly counts up to the

Strona 132 - 5.1 Flash Memory Introduction

Timer_A Operation11-7Timer_AContinuous ModeIn the continuous mode, the timer repeatedly counts up to 0FFFFh and restartsfrom zero as shown in Figure 1

Strona 133 - 5.2 Flash Memory Segmentation

Timer_A Operation11-8Timer_AUse of the Continuous ModeThe continuous mode can be used to generate independent time intervals andoutput frequencies. Ea

Strona 134 - 5.3 Flash Memory Operation

Timer_A Operation11-9Timer_AUp/Down ModeThe up/down mode is used if the timer period must be different from 0FFFFhcounts, and if symmetrical pulse gen

Strona 135 - Table 5−1.Erase Modes

System Reset and Initialization2-4System Resets, Interrupts, and Operating Modes2.1.2 Brownout Reset (BOR)Some devices have a brownout reset circuit (

Strona 136

Timer_A Operation11-10Timer_AChanging the Period Register TACCR0When changing TACCR0 while the timer is running, and counting in the downdirection, th

Strona 137 - Initiating an Erase from RAM

Timer_A Operation11-11Timer_A11.2.4 Capture/Compare BlocksThree identical capture/compare blocks, TACCRx, are present in Timer_A.Any of the blocks may

Strona 138 - Byte/Word Write

Timer_A Operation11-12Timer_AFigure 11−11.Capture CycleSecondCaptureTakenCOV = 1CaptureTakenNoCaptureTakenReadTakenCaptureClear Bit COVin Register TAC

Strona 139

Timer_A Operation11-13Timer_A11.2.5 Output UnitEach capture/compare block contains an output unit. The output unit is usedto generate output signals s

Strona 140

Timer_A Operation11-14Timer_AOutput Example—Timer in Up ModeThe OUTx signal is changed when the timer counts up to the TACCRx value,and rolls from TAC

Strona 141 - Block Write

Timer_A Operation11-15Timer_AOutput Example—Timer in Continuous ModeThe OUTx signal is changed when the timer reaches the TACCRx andTACCR0 values, dep

Strona 142 - Figure 5−11. Block Write Flow

Timer_A Operation11-16Timer_AOutput Example—Timer in Up/Down ModeThe OUTx signal changes when the timer equals TACCRx in either countdirection and whe

Strona 143

Timer_A Operation11-17Timer_A11.2.6 Timer_A InterruptsTwo interrupt vectors are associated with the 16-bit Timer_A module:- TACCR0 interrupt vector fo

Strona 144

Timer_A Operation11-18Timer_ATAIV Software ExampleThe following software example shows the recommended use of TAIV and thehandling overhead. The TAIV

Strona 145

Timer_A Registers11-19Timer_A11.3 Timer_A RegistersThe Timer_A registers are listed in Table 11−3:Table 11−3.Timer_A RegistersRegister Short Form Regi

Strona 146 - Flash Memory Controller

System Reset and Initialization2-5System Resets, Interrupts, and Operating Modes2.1.3 Device Initial Conditions After System ResetAfter a POR, the ini

Strona 147 - 5.4 Flash Memory Registers

Timer_A Registers11-20Timer_ATACTL, Timer_A Control Register15 14 13 12 11 10 9 8Unused TASSELxrw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0)

Strona 148

Timer_A Registers11-21Timer_ATAR, Timer_A Register15 14 13 12 11 10 9 8TARxrw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0)76543210TARxrw−(0) r

Strona 149

Timer_A Registers11-22Timer_ATACCTLx, Capture/Compare Control Register15 14 13 12 11 10 9 8CMx CCISx SCS SCCI Unused CAPrw−(0) rw−(0) rw−(0) rw−(0) rw

Strona 150

Timer_A Registers11-23Timer_ACCIEBit 4 Capture/compare interrupt enable. This bit enables the interrupt request ofthe corresponding CCIFG flag.0 Inter

Strona 152

12-1Timer_B ,Timer_B is a 16-bit timer/counter with multiple capture/compare registers. Thischapter describes Timer_B. Timer_B3 (three capture/c

Strona 153 - Chapter 6

Timer_B Introduction12-2Timer_B12.1 Timer_B IntroductionTimer_B is a 16-bit timer/counter with three or seven capture/compareregisters. Timer_B can su

Strona 154 - 6.1 SVS Introduction

Timer_B Introduction12-3Timer_BFigure 12−1. Timer_B Block DiagramCCR6Compararator 6CCI15 0OUTMODxCaptureModeCMxSyncCOVlogicOutputUnit6DSetQEQU0OUTOUT6

Strona 155 - Figure 6−1. SVS Block Diagram

Timer_B Operation12-4Timer_B12.2 Timer_B OperationThe Timer_B module is configured with user software. The setup andoperation of Timer_B is discussed

Strona 156 - 6.2 SVS Operation

Timer_B Operation12-5Timer_B12.2.2 Starting the TimerThe timer may be started or restarted in the following ways:- The timer counts when MCx > 0 an

Strona 157 - 6.2.3 Changing the VLDx Bits

System Reset and Initialization2-6System Resets, Interrupts, and Operating Modes2.2 InterruptsThe interrupt priorities are fixed and defined by the ar

Strona 158 - 6.2.4 SVS Operating Range

Timer_B Operation12-6Timer_BUp ModeThe up mode is used if the timer period must be different from TBR(max) counts.The timer repeatedly counts up to th

Strona 159 - 6.3 SVS Registers

Timer_B Operation12-7Timer_BContinuous ModeIn continuous mode the timer repeatedly counts up to TBR(max) and restartsfrom zero as shown in Figure 12−4

Strona 160 - Supply Voltage Supervisor

Timer_B Operation12-8Timer_BUse of the Continuous ModeThe continuous mode can be used to generate independent time intervals andoutput frequencies. Ea

Strona 161 - Chapter 7

Timer_B Operation12-9Timer_BUp/Down ModeThe up/down mode is used if the timer period must be different from TBR(max)counts, and if symmetrical pulse g

Strona 162

Timer_B Operation12-10Timer_BChanging the Value of Period Register TBCL0When changing TBCL0 while the timer is running, and counting in the downdirect

Strona 163 - Table 7−1.OP1 addresses

Timer_B Operation12-11Timer_B12.2.4 Capture/Compare BlocksThree or seven identical capture/compare blocks, TBCCRx, are present inTimer_B. Any of the b

Strona 164 - MACS Underflow and Overflow

Timer_B Operation12-12Timer_BFigure 12−11.Capture CycleSecondCaptureTakenCOV = 1CaptureTakenNoCaptureTakenReadTakenCaptureClear Bit COVin Register TBC

Strona 165 - 7.2.3 Software Examples

Timer_B Operation12-13Timer_BCompare Latch TBCLxThe TBCCRx compare latch, TBCLx, holds the data for the comparison to thetimer value in compare mode.

Strona 166 - 7.2.5 Using Interrupts

Timer_B Operation12-14Timer_B12.2.5 Output UnitEach capture/compare block contains an output unit. The output unit is usedto generate output signals s

Strona 167

Timer_B Operation12-15Timer_BOutput Example—Timer in Up ModeThe OUTx signal is changed when the timer counts up to the TBCLx value, androlls from TBCL

Strona 168 - Hardware Multiplier

System Reset and Initialization2-7System Resets, Interrupts, and Operating Modes2.2.1 (Non)-Maskable Interrupts (NMI)(Non)-maskable NMI interrupts are

Strona 169 - () ""

Timer_B Operation12-16Timer_BOutput Example—Timer in Continuous ModeThe OUTx signal is changed when the timer reaches the TBCLx and TBCL0values, depen

Strona 170 - 8.1 DMA Introduction

Timer_B Operation12-17Timer_BOutput Example − Timer in Up/Down ModeThe OUTx signal changes when the timer equals TBCLx in either countdirection and wh

Strona 171

Timer_B Operation12-18Timer_B12.2.6 Timer_B InterruptsTwo interrupt vectors are associated with the 16-bit Timer_B module:- TBCCR0 interrupt vector fo

Strona 172 - 8.2 DMA Operation

Timer_B Operation12-19Timer_BTBIV, Interrupt Handler ExamplesThe following software example shows the recommended use of TBIV and thehandling overhead

Strona 173 - Table 8−1.DMA Transfer Modes

Timer_B Registers12-20Timer_B12.3 Timer_B RegistersThe Timer_B registers are listed in Table 12−5:Table 12−5.Timer_B RegistersRegister Short Form Regi

Strona 174 - Single Transfer

Timer_B Registers12-21Timer_BTimer_B Control Register TBCTL15 14 13 12 11 10 9 8Unused TBCLGRPx CNTLx Unused TBSSELxrw−(0) rw−(0) rw−(0) rw−(0) rw−(0)

Strona 175

Timer_B Registers12-22Timer_BUnusedBit 3 UnusedTBCLRBit 2 Timer_B clear. Setting this bit resets TBR, the TBCLK divider, and the countdirection. The T

Strona 176 - Block Transfers

Timer_B Registers12-23Timer_BTBCCTLx, Capture/Compare Control Register15 14 13 12 11 10 9 8CMx CCISx SCS CLLDx CAPrw−(0) rw−(0) rw−(0) rw−(0) rw−(0) r

Strona 177

Timer_B Registers12-24Timer_BCCIEBit 4 Capture/compare interrupt enable. This bit enables the interrupt request ofthe corresponding CCIFG flag.0 Inter

Strona 178 - Burst-Block Transfers

Timer_B Registers12-25Timer_BTBIV, Timer_B Interrupt Vector Register15 14 13 12 11 10 9 80 0 0 0 0 0 0 0r0 r0 r0 r0 r0 r0 r0 r0765432100 0 0 0 TBIVx 0

Strona 179

System Reset and Initialization2-8System Resets, Interrupts, and Operating ModesFigure 2−5. Block Diagram of (Non)-Maskable Interrupt SourcesFlash Mod

Strona 181

13-1USART Peripheral Interface, UART Mode !) " - !)The universal synchronous/asynchronous receive/transmit (USART)

Strona 182 - 8.2.5 DMA Channel Priorities

USART Introduction: UART Mode13-2USART Peripheral Interface, UART Mode13.1 USART Introduction: UART ModeIn asynchronous mode, the USART connects the M

Strona 183 - 8.2.6 DMA Transfer Cycle Time

USART Introduction: UART Mode13-3USART Peripheral Interface, UART ModeFigure 13−1. USART Block Diagram: UART ModeReceiver Shift RegisterTransmit Shift

Strona 184

USART Operation: UART Mode13-4USART Peripheral Interface, UART Mode13.2 USART Operation: UART ModeIn UART mode, the USART transmits and receives chara

Strona 185 - 8.2.9 Using the I

USART Operation: UART Mode13-5USART Peripheral Interface, UART Mode13.2.3 Asynchronous Communication FormatsWhen two devices communicate asynchronousl

Strona 186 - 8.3 DMA Registers

USART Operation: UART Mode13-6USART Peripheral Interface, UART ModeThe URXWIE bit is used to control data reception in the idle-linemultiprocessor for

Strona 187

USART Operation: UART Mode13-7USART Peripheral Interface, UART ModeAddress-Bit Multiprocessor FormatWhen MM = 1, the address-bit multiprocessor format

Strona 188

USART Operation: UART Mode13-8USART Peripheral Interface, UART ModeAutomatic Error DetectionGlitch suppression prevents the USART from being accidenta

Strona 189

USART Operation: UART Mode13-9USART Peripheral Interface, UART Mode13.2.4 USART Receive EnableThe receive enable bit, URXEx, enables or disables data

Strona 190

System Reset and Initialization2-9System Resets, Interrupts, and Operating ModesFlash Access ViolationThe flash ACCVIFG flag is set when a flash acces

Strona 191

USART Operation: UART Mode13-10USART Peripheral Interface, UART Mode13.2.5 USART Transmit EnableWhen UTXEx is set, the UART transmitter is enabled. Tr

Strona 192

USART Operation: UART Mode13-11USART Peripheral Interface, UART Mode13.2.6 UART Baud Rate GenerationThe USART baud rate generator is capable of produc

Strona 193 - ("*

USART Operation: UART Mode13-12USART Peripheral Interface, UART ModeBaud Rate Bit TimingThe first stage of the baud rate generator is the 16-bit count

Strona 194 - 9.1 Digital I/O Introduction

USART Operation: UART Mode13-13USART Peripheral Interface, UART ModeTransmit Bit TimingThe timing for each character is the sum of the individual bit

Strona 195 - 9.2 Digital I/O Operation

USART Operation: UART Mode13-14USART Peripheral Interface, UART ModeReceive Bit TimingReceive timing consists of two error sources. The first is the b

Strona 196 - Digital I/O

USART Operation: UART Mode13-15USART Peripheral Interface, UART ModeFor example, the receive errors for the following conditions are calculated:Baud r

Strona 197 - 9.2.5 P1 and P2 Interrupts

USART Operation: UART Mode13-16USART Peripheral Interface, UART ModeTypical Baud Rates and ErrorsStandard baud rate frequency data for UxBRx and UxMCT

Strona 198 - Interrupt Enable P1IE, P2IE

USART Operation: UART Mode13-17USART Peripheral Interface, UART Mode13.2.7 USART InterruptsThe USART has one interrupt vector for transmission and one

Strona 199 - 9.3 Digital I/O Registers

USART Operation: UART Mode13-18USART Peripheral Interface, UART ModeUSART Receive Interrupt OperationThe URXIFGx interrupt flag is set each time a cha

Strona 200

USART Operation: UART Mode13-19USART Peripheral Interface, UART ModeReceive-Start Edge Detect OperationThe URXSE bit enables the receive start-edge de

Strona 201 - + 

System Reset and Initialization2-10System Resets, Interrupts, and Operating ModesExample of an NMI Interrupt HandlerThe NMI interrupt is a multiple-so

Strona 202

USART Operation: UART Mode13-20USART Peripheral Interface, UART ModeReceive-Start Edge Detect ConditionsWhen URXSE = 1, glitch suppression prevents th

Strona 203 - Watchdog Timer

USART Registers: UART Mode13-21USART Peripheral Interface, UART Mode13.3 USART Registers: UART ModeTable 13−3 lists the registers for all devices impl

Strona 204 - 10.2 Watchdog Timer Operation

USART Registers: UART Mode13-22USART Peripheral Interface, UART ModeUxCTL, USART Control Register76543210PENA PEV SPB CHAR LISTEN SYNC MM SWRSTrw−0 rw

Strona 205 - Watchdog Timer Operation

USART Registers: UART Mode13-23USART Peripheral Interface, UART ModeUxTCTL, USART Transmit Control Register76543210Unused CKPL SSELx URXSE TXWAKE Unus

Strona 206 - 10.2.6 Software Examples

USART Registers: UART Mode13-24USART Peripheral Interface, UART ModeUxRCTL, USART Receive Control Register76543210FE PE OE BRK URXEIE URXWIE RXWAKE RX

Strona 207 - 10.3 Watchdog Timer Registers

USART Registers: UART Mode13-25USART Peripheral Interface, UART ModeUxBR0, USART Baud Rate Control Register 0765432102726252423222120rw rw rw rw rw rw

Strona 208

USART Registers: UART Mode13-26USART Peripheral Interface, UART ModeUxRXBUF, USART Receive Buffer Register765432102726252423222120r r r r r r r rUxRXB

Strona 209 - Watchdog Timer Registers

USART Registers: UART Mode13-27USART Peripheral Interface, UART ModeME1, Module Enable Register 176543210UTXE0†URXE0†rw−0 rw−0UTXE0†Bit 7 USART0 trans

Strona 210

USART Registers: UART Mode13-28USART Peripheral Interface, UART ModeIE1, Interrupt Enable Register 176543210UTXIE0†URXIE0†rw−0 rw−0UTXIE0†Bit 7 USART0

Strona 211 - Chapter 11

USART Registers: UART Mode13-29USART Peripheral Interface, UART ModeIFG1, Interrupt Flag Register 176543210UTXIFG0†URXIFG0†rw−1 rw−0UTXIFG0†Bit 7 USAR

Strona 212 - 11.1 Timer_A Introduction

System Reset and Initialization2-11System Resets, Interrupts, and Operating ModesEach individual peripheral interrupt is discussed in the associated p

Strona 213 - Timer_A Introduction

USART Registers: UART Mode13-30USART Peripheral Interface, UART ModeUTXIFG0‡Bit 1 USART0 transmit interrupt flag. UTXIFG0 is set when U0TXBUF is empty

Strona 214 - 11.2 Timer_A Operation

13-31USART Peripheral Interface, UART Mode

Strona 215 - Table 11−1.Timer Modes

14-1USART Peripheral Interface, SPI Mode !)"-The universal synchronous/asynchronous receive/transmit (USART)perip

Strona 216 - Figure 11−2. Up Mode

USART Introduction: SPI Mode14-2USART Peripheral Interface, SPI Mode14.1 USART Introduction: SPI ModeIn synchronous mode, the USART connects the MSP43

Strona 217 - Figure 11−4. Continuous Mode

USART Introduction: SPI Mode14-3USART Peripheral Interface, SPI ModeFigure 14−1. USART Block Diagram: SPI ModeReceiver Shift RegisterTransmit Shift Re

Strona 218 - Use of the Continuous Mode

USART Operation: SPI Mode14-4USART Peripheral Interface, SPI Mode14.2 USART Operation: SPI ModeIn SPI mode, serial data is transmitted and received by

Strona 219 - Figure 11−7. Up/Down Mode

USART Operation: SPI Mode14-5USART Peripheral Interface, SPI Mode14.2.2 Master ModeFigure 14−2. USART Master and External SlaveReceive Buffer UxRXBUFR

Strona 220 - Use of the Up/Down Mode

USART Operation: SPI Mode14-6USART Peripheral Interface, SPI Mode14.2.3 Slave ModeFigure 14−3. USART Slave and External MasterReceive Buffer UxRXBUFRe

Strona 221 - Capture Mode

USART Operation: SPI Mode14-7USART Peripheral Interface, SPI Mode14.2.4 SPI EnableThe SPI transmit/receive enable bit USPIEx enables or disables the U

Strona 222 - Compare Mode

USART Operation: SPI Mode14-8USART Peripheral Interface, SPI ModeReceive EnableThe SPI receive enable state diagrams are shown in Figure 14−6 andFigur

Strona 223 - Table 11−2.Output Modes

Related Documentation From Texas Instrumentsiii PrefaceAbout This ManualThis manual discusses modules and peripherals of the MSP430x1x

Strona 224 - Timer_A Operation

System Reset and Initialization2-12System Resets, Interrupts, and Operating ModesReturn From InterruptThe interrupt handling routine terminates with t

Strona 225

USART Operation: SPI Mode14-9USART Peripheral Interface, SPI Mode14.2.5 Serial Clock ControlUCLK is provided by the master on the SPI bus. When MM = 1

Strona 226

USART Operation: SPI Mode14-10USART Peripheral Interface, SPI ModeSerial Clock Polarity and PhaseThe polarity and phase of UCLK are independently conf

Strona 227 - TACCR0 Interrupt

USART Operation: SPI Mode14-11USART Peripheral Interface, SPI Mode14.2.6 SPI InterruptsThe USART has one interrupt vector for transmission and one int

Strona 228

USART Operation: SPI Mode14-12USART Peripheral Interface, SPI ModeSPI Receive Interrupt OperationThe URXIFGx interrupt flag is set each time a charact

Strona 229 - 11.3 Timer_A Registers

USART Registers: SPI Mode14-13USART Peripheral Interface, SPI Mode14.3 USART Registers: SPI ModeThe USART registers, shown in Table 14−1 and Table 14−

Strona 230

USART Registers: SPI Mode14-14USART Peripheral Interface, SPI ModeUxCTL, USART Control Register76543210Unused Unused I2C†CHAR LISTEN SYNC MM SWRSTrw−0

Strona 231 - TAR, Timer_A Register

USART Registers: SPI Mode14-15USART Peripheral Interface, SPI ModeUxTCTL, USART Transmit Control Register76543210CKPH CKPL SSELx Unused Unused STC TXE

Strona 232

USART Registers: SPI Mode14-16USART Peripheral Interface, SPI ModeUxRCTL, USART Receive Control Register76543210FE Unused OE Unused Unused Unused Unus

Strona 233

USART Registers: SPI Mode14-17USART Peripheral Interface, SPI ModeUxBR0, USART Baud Rate Control Register 0765432102726252423222120rw rw rw rw rw rw r

Strona 234

USART Registers: SPI Mode14-18USART Peripheral Interface, SPI ModeUxRXBUF, USART Receive Buffer Register765432102726252423222120r r r r r r r rUxRXBUF

Strona 235 - Chapter 12

System Reset and Initialization2-13System Resets, Interrupts, and Operating Modes2.2.4 Interrupt VectorsThe interrupt vectors and the power-up startin

Strona 236 - 12.1 Timer_B Introduction

USART Registers: SPI Mode14-19USART Peripheral Interface, SPI ModeME1, Module Enable Register 176543210USPIE0†rw−0Bit 7 This bit may be used by other

Strona 237 - Timer_B Introduction

USART Registers: SPI Mode14-20USART Peripheral Interface, SPI ModeIE1, Interrupt Enable Register 176543210UTXIE0†URXIE0†rw−0 rw−0UTXIE0†Bit 7 USART0 t

Strona 238 - 12.2 Timer_B Operation

USART Registers: SPI Mode14-21USART Peripheral Interface, SPI ModeUTXIE0‡Bit 1 USART0 transmit interrupt enable. This bit enables the UTXIFG0 interrup

Strona 239 - Table 12−1.Timer Modes

USART Registers: SPI Mode14-22USART Peripheral Interface, SPI ModeIFG1, Interrupt Flag Register 176543210UTXIFG0†URXIFG0†rw−1 rw−0UTXIFG0†Bit 7 USART0

Strona 240 - Figure 12−2. Up Mode

14-23USART Peripheral Interface, SPI Mode

Strona 241 - Figure 12−4. Continuous Mode

15-1USART Peripheral Interface, I2C Mode !) " - . The universal synchronous/asynchronous receive/transmit (USART)p

Strona 242

I2C Module Introduction15-2USART Peripheral Interface, I2C Mode15.1 I2C Module IntroductionThe inter-IC control (I2C) module provides an interface bet

Strona 243 - Figure 12−7. Up/Down Mode

I2C Module Introduction15-3USART Peripheral Interface, I2C ModeFigure 15−1. USART Block Diagram: I2C ModeReceive Shift RegisterTransmit Shift Register

Strona 244

I2C Module Operation15-4USART Peripheral Interface, I2C Mode15.2 I2C Module OperationThe I2C module supports any slave or master I2C-compatible device

Strona 245 - 12.2.4 Capture/Compare Blocks

I2C Module Operation15-5USART Peripheral Interface, I2C Mode15.2.1 I2C Module InitializationThe I2C module is part of the USART peripheral. Individual

Strona 246 - Figure 12−11.Capture Cycle

Operating Modes2-14System Resets, Interrupts, and Operating Modes2.3 Operating ModesThe MSP430 family is designed for ultralow-power applications and

Strona 247 - Table 12−2.TBCLx Load Events

I2C Module Operation15-6USART Peripheral Interface, I2C Mode15.2.2 I2C Serial DataOne clock pulse is generated by the master device for each data bitt

Strona 248 - Table 12−4.Output Modes

I2C Module Operation15-7USART Peripheral Interface, I2C Mode15.2.3 I2C Addressing ModesThe I2C module supports 7-bit and 10-bit addressing modes.7-Bit

Strona 249 - Timer_B Operation

I2C Module Operation15-8USART Peripheral Interface, I2C Mode15.2.4 I2C Module Operating ModesThe I2C module operates in master transmitter, master rec

Strona 250

I2C Module Operation15-9USART Peripheral Interface, I2C ModeFigure 15−8. Master Transmitter ModeIDLEGenerate STARTI2CBUSY Is Set4 x I2CPSCI2CBB Is Set

Strona 251

I2C Module Operation15-10USART Peripheral Interface, I2C ModeFigure 15−9. Master Receiver ModeIDLEGenerate START4 x I2CPSCI2CBB Is SetI2CSTT Is Cleare

Strona 252 - 12.2.6 Timer_B Interrupts

I2C Module Operation15-11USART Peripheral Interface, I2C ModeArbitrationIf two or more master transmitters simultaneously start a transmission on theb

Strona 253

I2C Module Operation15-12USART Peripheral Interface, I2C ModeAutomatic Data Byte CountingAutomatic data byte counting is supported in master mode with

Strona 254 - 12.3 Timer_B Registers

I2C Module Operation15-13USART Peripheral Interface, I2C ModeFigure 15−11.Slave TransmitterI2CBB Is ClearedSend DataLow ByteTo Master2nd StartDetected

Strona 255

I2C Module Operation15-14USART Peripheral Interface, I2C ModeFigure 15−12. Slave ReceiverIDLEI2CBB Is Cleared4 x I2CPSCYesReceive DataLow ByteFrom Mas

Strona 256 - TBR, Timer_B Register

I2C Module Operation15-15USART Peripheral Interface, I2C Mode15.2.5 The I2C Data Register I2CDRThe I2CDR register can be accessed as an 8-bit or 16-bi

Strona 257

Operating Modes2-15System Resets, Interrupts, and Operating ModesFigure 2−10. MSP430x1xx Operating Modes For Basic Clock SystemActive ModeCPU Is Activ

Strona 258

I2C Module Operation15-16USART Peripheral Interface, I2C Mode15.2.6 I2C Clock Generation and SynchronizationThe I2C module is operated with the clock

Strona 259

I2C Module Operation15-17USART Peripheral Interface, I2C Mode15.2.7 Using the I2C Module with Low Power ModesThe I2C module can be used with MSP430 lo

Strona 260

I2C Module Operation15-18USART Peripheral Interface, I2C Mode15.2.8 I2C InterruptsThe I2C module has one interrupt vector for eight interrupt flags li

Strona 261 - Chapter 13

I2C Module Operation15-19USART Peripheral Interface, I2C ModeI2CIV, Interrupt Vector GeneratorThe I2C interrupt flags are prioritized and combined to

Strona 262

I2C Module Registers15-20USART Peripheral Interface, I2C Mode15.3 I2C Module RegistersThe I2C module registers are listed in Table 15−4.Table 15−4.I2C

Strona 263 - USART Introduction: UART Mode

I2C Module Registers15-21USART Peripheral Interface, I2C ModeU0CTL, USART0 Control Register-I2C Mode76543210RXDMAEN TXDMAEN I2C XA LISTEN SYNC MST I2C

Strona 264 - Figure 13−2. Character Format

I2C Module Registers15-22USART Peripheral Interface, I2C ModeI2CTCTL, I2C Transmit Control Register76543210I2CWORD I2CRM I2CSSELx I2CTRX I2CSTB I2CSTP

Strona 265 - Figure 13−3. Idle-Line Format

I2C Module Registers15-23USART Peripheral Interface, I2C ModeI2CDCTL, I2C Data Control Register76543210Unused Unused I2CBUSYI2CSCLLOWI2CSBD I2CTXUDF I

Strona 266 - USART Operation: UART Mode

I2C Module Registers15-24USART Peripheral Interface, I2C ModeI2CDRW, I2CDRB, I2C Data Register15 14 13 12 11 10 9 8I2CDRW High Byterw−0 rw−0 rw−0 rw−0

Strona 267

I2C Module Registers15-25USART Peripheral Interface, I2C ModeI2CPSC, I2C Clock Prescaler Register76543210I2CPSCxrw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−

Strona 268 - Automatic Error Detection

Operating Modes2-16System Resets, Interrupts, and Operating Modes2.3.1 Entering and Exiting Low-Power ModesAn enabled interrupt event wakes the MSP430

Strona 269 - 13.2.4 USART Receive Enable

I2C Module Registers15-26USART Peripheral Interface, I2C ModeI2CSCLH, I2C Shift Clock High Register76543210I2CSCLHxrw−0 rw−0 rw−0 rw−0 rw−0 rw−0 rw−0

Strona 270 - 13.2.5 USART Transmit Enable

I2C Module Registers15-27USART Peripheral Interface, I2C ModeI2COA, I2C Own Address Register, 7-Bit Addressing Mode15 14 13 12 11 10 9 80 0 0 0 0 0 0

Strona 271

I2C Module Registers15-28USART Peripheral Interface, I2C ModeI2CSA, I2C Slave Address Register, 7-Bit Addressing Mode15 14 13 12 11 10 9 80 0 0 0 0 0

Strona 272 - Baud Rate Bit Timing

I2C Module Registers15-29USART Peripheral Interface, I2C ModeI2CIE, I2C Interrupt Enable Register76543210STTIE GCIE TXRDYIE RXRDYIE ARDYIE OAIE NACKIE

Strona 273 - Transmit Bit Timing

I2C Module Registers15-30USART Peripheral Interface, I2C ModeI2CIFG, I2C Interrupt Flag Register76543210STTIFG GCIFG TXRDYIFG RXRDYIFG ARDYIFG OAIFG N

Strona 274 - Figure 13−9. Receive Error

I2C Module Registers15-31USART Peripheral Interface, I2C ModeI2CIV, I2C Interrupt Vector Register15 14 13 12 11 10 9 80 0 0 0 0 0 0 0r0 r0 r0 r0 r0 r0

Strona 275

15-32USART Peripheral Interface, I2C Mode

Strona 276 - Typical Baud Rates and Errors

16-1Comparator_A ,)Comparator_A is an analog voltage comparator. This chapter describesComparator_A. Comparator_A is implemented in MSP430x1

Strona 277 - 13.2.7 USART Interrupts

Comparator_A Introduction16-2Comparator_A16.1 Comparator_A IntroductionThe comparator_A module supports precision slope analog-to-digitalconversions,

Strona 278

Comparator_A Introduction16-3Comparator_AFigure 16−1. Comparator_A Block DiagramCAOUT+−CAEX0.5x0.25xSet_CAIFGCA1CCI1B+−0VGDSP2CA0P2CA1CAFCARSELCAONCAR

Strona 279

Principles for Low-Power Applications2-17System Resets, Interrupts, and Operating Modes2.4 Principles for Low-Power ApplicationsOften, the most import

Strona 280

Comparator_A Operation16-4Comparator_A16.2 Comparator_A Operation The comparator_A module is configured with user software. The setup andoperation of

Strona 281

Comparator_A Operation16-5Comparator_A16.2.3 Output FilterThe output of the comparator can be used with or without internal filtering.When control bit

Strona 282 - UxCTL, USART Control Register

Comparator_A Operation16-6Comparator_A16.2.5 Comparator_A, Port Disable Register CAPDThe comparator input and output functions are multiplexed with th

Strona 283

Comparator_A Operation16-7Comparator_A16.2.7 Comparator_A Used to Measure Resistive ElementsThe Comparator_A can be optimized to precisely measure res

Strona 284

Comparator_A Operation16-8Comparator_AThe thermistor measurement is based on a ratiometric conversion principle.The ratio of two capacitor discharge t

Strona 285 - USART Registers: UART Mode

Comparator_A Registers16-9Comparator_A16.3 Comparator_A RegistersThe Comparator_A registers are listed in Table 16−1:Table 16−1.Comparator_A Registers

Strona 286 - UxTXBUFx

Comparator_A Registers16-10Comparator_ACACTL1, Comparator_A Control Register 176543210CAEX CARSEL CAREFx CAON CAIES CAIE CAIFGrw−(0) rw−(0) rw−(0) rw−

Strona 287 - ME2, Module Enable Register 2

Comparator_A Registers16-11Comparator_ACACTL2, Comparator_A, Control Register76543210Unused P2CA1 P2CA0 CAF CAOUTrw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw

Strona 288

16-12Comparator_A

Strona 289

17-1ADC12 )(.The ADC12 module is a high-performance 12-bit analog-to-digital converter.This chapter describes the ADC12. The ADC12 is implemented in

Strona 290

2-18System Resets, Interrupts, and Operating Modes

Strona 291

ADC12 Introduction17-2ADC1217.1 ADC12 IntroductionThe ADC12 module supports fast, 12-bit analog-to-digital conversions. Themodule implements a 12-bit

Strona 292 - Chapter 14

ADC12 Introduction17-3ADC12Figure 17−1. ADC12 Block DiagramSampleandHoldVeREF+12−bit SARVR−−16 x 12MemoryBuffer−−16 x 8MemoryControl−VR+VREF+VeREF−VRE

Strona 293

ADC12 Operation17-4ADC1217.2 ADC12 OperationThe ADC12 module is configured with user software. The setup and operationof the ADC12 is discussed in the

Strona 294 - USART Introduction: SPI Mode

ADC12 Operation17-5ADC1217.2.2 ADC12 Inputs and MultiplexerThe eight external and four internal analog signals are selected as the channelfor conversi

Strona 295

ADC12 Operation17-6ADC1217.2.3 Voltage Reference GeneratorThe ADC12 module contains a built-in voltage reference with two selectablevoltage levels, 1.

Strona 296 - Four-Pin SPI Master Mode

ADC12 Operation17-7ADC1217.2.5 Sample and Conversion TimingAn analog-to-digital conversion is initiated with a rising edge of the sampleinput signal S

Strona 297 - Four-Pin SPI Slave Mode

ADC12 Operation17-8ADC12Pulse Sample ModeThe pulse sample mode is selected when SHP = 1. The SHI signal is used totrigger the sampling timer. The SHT0

Strona 298 - Transmit Enable

ADC12 Operation17-9ADC12Sample Timing ConsiderationsWhen SAMPCON = 0 all Ax inputs are high impedance. When SAMPCON =1, the selected Ax input can be m

Strona 299 - Receive Enable

ADC12 Operation17-10ADC1217.2.6 Conversion MemoryThere are 16 ADC12MEMx conversion memory registers to store conversionresults. Each ADC12MEMx is conf

Strona 300 - 14.2.5 Serial Clock Control

ADC12 Operation17-11ADC12Single-Channel Single-Conversion ModeA single channel is sampled and converted once. The ADC result is written tothe ADC12MEM

Strona 301 - Figure 14−9. USART SPI Timing

3-1RISC 16-Bit CPU   !This chapter describes the MSP430 CPU, addressing modes, and instructionset.Topic Page3.1 CPU Introduction 3-2. .

Strona 302 - 14.2.6 SPI Interrupts

ADC12 Operation17-12ADC12Sequence-of-Channels ModeA sequence of channels is sampled and converted once. The ADC results arewritten to the conversion m

Strona 303 - USART Operation: SPI Mode

ADC12 Operation17-13ADC12Repeat-Single-Channel ModeA single channel is sampled and converted continuously. The ADC results arewritten to the ADC12MEMx

Strona 304

ADC12 Operation17-14ADC12Repeat-Sequence-of-Channels ModeA sequence of channels is sampled and converted repeatedly. The ADCresults are written to the

Strona 305

ADC12 Operation17-15ADC12Using the Multiple Sample and Convert (MSC) BitTo configure the converter to perform successive conversions automaticallyand

Strona 306

ADC12 Operation17-16ADC1217.2.8 Using the Integrated Temperature SensorTo use the on-chip temperature sensor, the user selects the analog inputchannel

Strona 307

ADC12 Operation17-17ADC1217.2.9 ADC12 Grounding and Noise ConsiderationsAs with any high-resolution ADC, appropriate printed-circuit-board layout andg

Strona 308 - USART Registers: SPI Mode

ADC12 Operation17-18ADC1217.2.10 ADC12 InterruptsThe ADC12 has 18 interrupt sources:- ADC12IFG0-ADC12IFG15- ADC12OV, ADC12MEMx overflow- ADC12TOV, ADC

Strona 309

ADC12 Operation17-19ADC12ADC12 Interrupt Handling Software ExampleThe following software example shows the recommended use of ADC12IVand the handling

Strona 310

ADC12 Registers17-20ADC1217.3 ADC12 RegistersThe ADC12 registers are listed in Table 17−2:Table 17−2.ADC12 RegistersRegister Short Form Register Type

Strona 311

ADC12 Registers17-21ADC12ADC12CTL0, ADC12 Control Register 015 14 13 12 11 10 9 8SHT1x SHT0xrw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0)765

Strona 312

CPU Introduction3-2RISC 16-Bit CPU3.1 CPU Introduction The CPU incorporates features specifically designed for modernprogramming techniques such as ca

Strona 313

ADC12 Registers17-22ADC12MSCBit 7 Multiple sample and conversion. Valid only for sequence or repeated modes.0 The sampling timer requires a rising edg

Strona 314

ADC12 Registers17-23ADC12ADC12CTL1, ADC12 Control Register 115 14 13 12 11 10 9 8CSTARTADDx SHSx SHP ISSHrw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−

Strona 315 - Chapter 15

ADC12 Registers17-24ADC12ADC12SSELxBits4-3ADC12 clock source select00 ADC12OSC01 ACLK10 MCLK11 SMCLKCONSEQxBits2-1Conversion sequence mode select00 Si

Strona 316 - C Module Introduction

ADC12 Registers17-25ADC12ADC12MCTLx, ADC12 Conversion Memory Control Registers76543210EOS SREFx INCHxrw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0)

Strona 317 - USART Peripheral Interface, I

ADC12 Registers17-26ADC12ADC12IE, ADC12 Interrupt Enable Register15 14 13 12 11 10 9 8ADC12IE15 ADC12IE14 ADC12IE13 ADC12IE12 ADC12IE11 ADC12IE10 ADC1

Strona 318 - C Module Operation

ADC12 Registers17-27ADC12ADC12IV, ADC12 Interrupt Vector Register15 14 13 12 11 10 9 80 0 0 0 0 0 0 0r0 r0 r0 r0 r0 r0 r0 r0765432100 0 ADC12IVx 0r0 r

Strona 320

18-1ADC10 )(/The ADC10 module is a high-performance 10-bit analog-to-digital converter.This chapter describes the ADC10. The ADC10 is implemented in

Strona 321

ADC10 Introduction18-2ADC1018.1 ADC10 IntroductionThe ADC10 module supports fast, 10-bit analog-to-digital conversions. Themodule implements a 10-bit

Strona 322 - Table 15−1.Master Operation

ADC10 Introduction18-3ADC10Figure 18−1. ADC10 Block Diagram100110000010000100110100010101100111SampleandHold10−bit SAR Divider/1 .. /8ACLKMCLKSMCLKADC

Strona 323

CPU Introduction3-3RISC 16-Bit CPUFigure 3−1. CPU Block Diagram015MDB − Memory Data Bus Memory Address Bus − MAB16Zero, ZCarry, COverflow, VNegative,

Strona 324

ADC10 Operation18-4ADC1018.2 ADC10 OperationThe ADC10 module is configured with user software. The setup and operationof the ADC10 is discussed in the

Strona 325

ADC10 Operation18-5ADC1018.2.2 ADC10 Inputs and MultiplexerThe eight external and four internal analog signals are selected as the channelfor conversi

Strona 326 - Slave Mode

ADC10 Operation18-6ADC1018.2.3 Voltage Reference GeneratorThe ADC10 module contains a built-in voltage reference with two selectablevoltage levels. Se

Strona 327

ADC10 Operation18-7ADC1018.2.5 Sample and Conversion TimingAn analog-to-digital conversion is initiated with a rising edge of sample inputsignal SHI.

Strona 328 - Figure 15−12. Slave Receiver

ADC10 Operation18-8ADC10Sample Timing ConsiderationsWhen SAMPCON = 0 all Ax inputs are high impedance. When SAMPCON =1, the selected Ax input can be m

Strona 329 - Receive Overrun

ADC10 Operation18-9ADC1018.2.6 Conversion ModesThe ADC10 has four operating modes selected by the CONSEQx bits asdiscussed in Table 18−1.Table 18−1.Co

Strona 330

ADC10 Operation18-10ADC10Single-Channel Single-Conversion ModeA single channel selected by INCHx is sampled and converted once. The ADCresult is writt

Strona 331 - C Module with Low Power Modes

ADC10 Operation18-11ADC10Sequence-of-Channels ModeA sequence of channels is sampled and converted once. The sequencebegins with the channel selected b

Strona 332 - Table 15−3.I

ADC10 Operation18-12ADC10Repeat-Single-Channel ModeA single channel selected by INCHx is sampled and converted continuously.Each ADC result is written

Strona 333 - RETI ; Vector 0: No interrupt

ADC10 Operation18-13ADC10Repeat-Sequence-of-Channels ModeA sequence of channels is sampled and converted repeatedly. The sequencebegins with the chann

Strona 334 - C Module Registers

GlossaryivGlossaryACLK Auxiliary Clock See Basic Clock ModuleADC Analog-to-Digital ConverterBOR Brown-Out Reset See System Resets, Interrupts, and Ope

Strona 335

CPU Registers3-4RISC 16-Bit CPU3.2 CPU RegistersThe CPU incorporates sixteen 16-bit registers. R0, R1, R2 and R3 havededicated functions. R4 to R15 ar

Strona 336 - C Transmit Control Register

ADC10 Operation18-14ADC10Using the MSC BitTo configure the converter to perform successive conversions automaticallyand as quickly as possible, a mult

Strona 337 - C Data Control Register

ADC10 Operation18-15ADC1018.2.7 ADC10 Data Transfer ControllerThe ADC10 includes a data transfer controller (DTC) to automatically transferconversion

Strona 338 - I2CNDAT, I

ADC10 Operation18-16ADC10One-Block Transfer ModeThe one-block mode is selected if the ADC10TB is reset. The value n inADC10DTC1 defines the total numb

Strona 339 - C Clock Prescaler Register

ADC10 Operation18-17ADC10Figure 18−10. State Diagram for Data Transfer Control in One-Block Transfer ModeDTC idleDTC resetn=0 (ADC10DTC1)InitializeSta

Strona 340 - C Shift Clock Low Register

ADC10 Operation18-18ADC10Two-Block Transfer ModeThe two-block mode is selected if the ADC10TB bit is set. The value n inADC10DTC1 defines the number o

Strona 341 - I2COA, I

ADC10 Operation18-19ADC10Figure 18−12. State Diagram for Data Transfer Control in Two-Block Transfer ModeDTC idleDTC resetADC10B1 = 0ADC10TB = 1n=0 (A

Strona 342 - I2CSA, I

ADC10 Operation18-20ADC10Continuous TransferA continuous transfer is selected if ADC10CT bit is set. The DTC will not stopafter block one in (one-bloc

Strona 343 - C Interrupt Enable Register

ADC10 Operation18-21ADC1018.2.8 Using the Integrated Temperature SensorTo use the on-chip temperature sensor, the user selects the analog inputchannel

Strona 344 - C Interrupt Flag Register

ADC10 Operation18-22ADC1018.2.9 ADC10 Grounding and Noise ConsiderationsAs with any high-resolution ADC, appropriate printed-circuit-board layout andg

Strona 345 - C Interrupt Vector Register

ADC10 Operation18-23ADC1018.2.10 ADC10 InterruptsOne interrupt and one interrupt vector are associated with the ADC10 asshown in Figure 18−17. When th

Strona 346

CPU Registers3-5RISC 16-Bit CPU3.2.2 Stack Pointer (SP)The stack pointer (SP/R1) is used by the CPU to store the return addressesof subroutine calls a

Strona 347 - ,)

ADC10 Registers18-24ADC1018.3 ADC10 RegistersThe ADC10 registers are listed in Table 18−3.Table 18−3.ADC10 RegistersRegister Short Form Register Type

Strona 348

ADC10 Registers18-25ADC10ADC10CTL0, ADC10 Control Register 015 14 13 12 11 10 9 8SREFx ADC10SHTx ADC10SR REFOUT REFBURSTrw−(0) rw−(0) rw−(0) rw−(0) rw

Strona 349 - Comparator_A

ADC10 Registers18-26ADC10MSCBit 7 Multiple sample and conversion. Valid only for sequence or repeated modes.0 The sampling requires a rising edge of t

Strona 350 - 16.2 Comparator_A Operation

ADC10 Registers18-27ADC10ADC10CTL1, ADC10 Control Register 115 14 13 12 11 10 9 8INCHx SHSx ADC10DF ISSHrw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(

Strona 351 - 16.2.3 Output Filter

ADC10 Registers18-28ADC10ADC10DIVxBits7-5ADC10 clock divider000 /1001 /2010 /3011 /4100 /5101 /6110 /7111 /8ADC10SSELxBits4-3ADC10 clock source select

Strona 352

ADC10 Registers18-29ADC10ADC10MEM, Conversion-Memory Register, Binary Format15 14 13 12 11 10 9 80 0 0 0 0 0 Conversion Resultsr0 r0 r0 r0 r0 r0 r r76

Strona 353

ADC10 Registers18-30ADC10ADC10DTC0, Data Transfer Control Register 076543210Reserved ADC10TB ADC10CT ADC10B1ADC10FETCHr0 r0 r0 r0 rw−(0) rw−(0) rw−(0)

Strona 354

ADC10 Registers18-31ADC10ADC10DTC1, Data Transfer Control Register 176543210DTC Transfersrw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0) rw−(0)DTCTra

Strona 356

19-1DAC12 ().The DAC12 module is a 12-bit, voltage output digital-to-analog converter. Thischapter describes the DAC12. Two DAC12 modules are implem

Strona 357

CPU Registers3-6RISC 16-Bit CPU3.2.3 Status Register (SR)The status register (SR/R2), used as a source or destination register, can beused in the regi

Strona 358

DAC12 Introduction19-2DAC1219.1 DAC12 IntroductionThe DAC12 module is a 12-bit, voltage output DAC. The DAC12 can beconfigured in 8- or 12-bit mode an

Strona 359 - Chapter 17

DAC12 Introduction19-3DAC12Figure 19−1. DAC12 Block DiagramDAC12_0DAC12_0OUT2.5V or 1.5V reference from ADC12DAC12SREFxVR−VR+DAC12_0DATDAC12_0LatchDAC

Strona 360 - 17.1 ADC12 Introduction

DAC12 Operation19-4DAC1219.2 DAC12 OperationThe DAC12 module is configured with user software. The setup and operationof the DAC12 is discussed in the

Strona 361 - ADC12 Introduction

DAC12 Operation19-5DAC1219.2.2 DAC12 ReferenceThe reference for the DAC12 is configured to use either an external referencevoltage or the internal 1.5

Strona 362 - 17.2 ADC12 Operation

DAC12 Operation19-6DAC1219.2.4 DAC12_xDAT Data FormatThe DAC12 supports both straight binary and 2’s compliment data formats.When using straight binar

Strona 363 - Analog Port Selection

DAC12 Operation19-7DAC1219.2.5 DAC12 Output Amplifier Offset CalibrationThe offset voltage of the DAC12 output amplifier can be positive or negative.W

Strona 364 - 17.2.4 Auto Power-Down

DAC12 Operation19-8DAC1219.2.6 Grouping Multiple DAC12 ModulesMultiple DAC12s can be grouped together with the DAC12GRP bit tosynchronize the update o

Strona 365 - Extended Sample Mode

DAC12 Operation19-9DAC1219.2.7 DAC12 InterruptsThe DAC12 interrupt vector is shared with the DMA controller. Software mustcheck the DAC12IFG and DMAIF

Strona 366 - Pulse Sample Mode

DAC12 Registers19-10DAC1219.3 DAC12 RegistersThe DAC12 registers are listed in Table 19−2:Table 19−2.DAC12 RegistersRegister Short Form Register Type

Strona 367 - Sample Timing Considerations

DAC12 Registers19-11DAC12DAC12_xCTL, DAC12 Control Register15 14 13 12 11 10 9 8Reserved DAC12SREFx DAC12RES DAC12LSELxDAC12CALONDAC12IRrw−(0) rw−(0)

Strona 368 - 17.2.7 ADC12 Conversion Modes

CPU Registers3-7RISC 16-Bit CPU3.2.4 Constant Generator Registers CG1 and CG2Six commonly-used constants are generated with the constant generatorregi

Strona 369 - x = pointer to ADC12MCTLx

DAC12 Registers19-12DAC12DAC12AMPxBits7-5DAC12 amplifier setting. These bits select settling time vs. currentconsumption for the DAC12 input and outpu

Strona 370 - Sequence-of-Channels Mode

DAC12 Registers19-13DAC12DAC12_xDAT, DAC12 Data Register15 14 13 12 11 10 9 80 0 0 0 DAC12 Datar(0) r(0) r(0) r(0) rw−(0) rw−(0) rw−(0) rw−(0)76543210

Strona 372

CPU Registers3-8RISC 16-Bit CPU3.2.5 General−Purpose Registers R4 - R15The twelve registers, R4−R15, are general-purpose registers. All of theseregist

Strona 373 - Stopping Conversions

Addressing Modes3-9RISC 16-Bit CPU3.3 Addressing ModesSeven addressing modes for the source operand and four addressing modesfor the destination opera

Strona 374 - ADC12 Operation

Addressing Modes3-10RISC 16-Bit CPU3.3.1 Register ModeThe register mode is described in Table 3−4.Table 3−4.Register Mode DescriptionAssembler Code Co

Strona 375

Addressing Modes3-11RISC 16-Bit CPU3.3.2 Indexed ModeThe indexed mode is described in Table 3−5.Table 3−5.Indexed Mode DescriptionAssembler Code Conte

Strona 376 - 17.2.10 ADC12 Interrupts

Addressing Modes3-12RISC 16-Bit CPU3.3.3 Symbolic ModeThe symbolic mode is described in Table 3−6.Table 3−6.Symbolic Mode DescriptionAssembler Code Co

Strona 377

Addressing Modes3-13RISC 16-Bit CPU3.3.4 Absolute ModeThe absolute mode is described in Table 3−7.Table 3−7.Absolute Mode DescriptionAssembler Code Co

Strona 378 - 17.3 ADC12 Registers

Register Bit Conventionsv Register Bit ConventionsEach register is shown with a key indicating the accessibility of the eachindividual bit, and the

Strona 379

Addressing Modes3-14RISC 16-Bit CPU3.3.5 Indirect Register ModeThe indirect register mode is described in Table 3−8.Table 3−8.Indirect Mode Descriptio

Strona 380

Addressing Modes3-15RISC 16-Bit CPU3.3.6 Indirect Autoincrement ModeThe indirect autoincrement mode is described in Table 3−9.Table 3−9.Indirect Autoi

Strona 381

Addressing Modes3-16RISC 16-Bit CPU3.3.7 Immediate ModeThe immediate mode is described in Table 3−10.Table 3−10.Immediate Mode DescriptionAssembler Co

Strona 382

Instruction Set3-17RISC 16-Bit CPU3.4 Instruction SetThe complete MSP430 instruction set consists of 27 core instructions and 24emulated instructions.

Strona 383 - Modifiable only when ENC = 0

Instruction Set3-18RISC 16-Bit CPU3.4.1 Double-Operand (Format I) InstructionsFigure 3−9 illustrates the double-operand instruction format.Figure 3−9.

Strona 384 - ADC12IFGx

Instruction Set3-19RISC 16-Bit CPU3.4.2 Single-Operand (Format II) InstructionsFigure 3−10 illustrates the single-operand instruction format.Figure 3−

Strona 385 - ADC12 interrupt vector value

Instruction Set3-20RISC 16-Bit CPU3.4.3 JumpsFigure 3−11 shows the conditional-jump instruction format.Figure 3−11. Jump Instruction FormatC 10-Bit PC

Strona 386

Instruction Set3-21 RISC 16−Bit CPUADC[.W] Add carry to destinationADC.B Add carry to destinationSyntax ADC dst or ADC.W dstADC.B dstOper

Strona 387 - Chapter 18

Instruction Set3-22 RISC 16−Bit CPUADD[.W] Add source to destinationADD.B Add source to destinationSyntax ADD src,dst or ADD.W src,dstADD.B src,dstOp

Strona 388 - 18.1 ADC10 Introduction

Instruction Set3-23 RISC 16−Bit CPUADDC[.W] Add source and carry to destinationADDC.B Add source and carry to destinationSyntax ADDC src,dst or ADDC.

Strona 390 - 18.2 ADC10 Operation

Instruction Set3-24 RISC 16−Bit CPUAND[.W] Source AND destinationAND.B Source AND destinationSyntax AND src,dst or AND.W src,dstAND.B src,dstOperation

Strona 391

Instruction Set3-25 RISC 16−Bit CPUBIC[.W] Clear bits in destinationBIC.B Clear bits in destinationSyntax BIC src,dst or BIC.W src,dstBIC.B src,dstOp

Strona 392 - 18.2.4 Auto Power-Down

Instruction Set3-26 RISC 16−Bit CPUBIS[.W] Set bits in destinationBIS.B Set bits in destinationSyntax BIS src,dst or BIS.W src,dstBIS.B src,dstOperati

Strona 393 - Figure 18−3. Sample Timing

Instruction Set3-27 RISC 16−Bit CPUBIT[.W] Test bits in destinationBIT.B Test bits in destinationSyntax BIT src,dst or BIT.W src,dstOperation src .AN

Strona 394

Instruction Set3-28 RISC 16−Bit CPU* BR, BRANCH Branch to ... destinationSyntax BR dstOperation dst −> PCEmulation MOV dst,PCDescription An

Strona 395 - 18.2.6 Conversion Modes

Instruction Set3-29 RISC 16−Bit CPUCALL SubroutineSyntax CALL dstOperation dst −> tmp dst is evaluated and storedSP − 2 −> SPPC −> @S

Strona 396

Instruction Set3-30 RISC 16−Bit CPU* CLR[.W] Clear destination* CLR.B Clear destinationSyntax CLR dst or CLR.W dstCLR.B dstOperation 0 −> dstEmulat

Strona 397

Instruction Set3-31 RISC 16−Bit CPU* CLRC Clear carry bitSyntax CLRCOperation 0 −> CEmulation BIC #1,SRDescription The carry bit (C) is cleared.

Strona 398

Instruction Set3-32 RISC 16−Bit CPU* CLRN Clear negative bitSyntax CLRNOperation 0 → Nor(.NOT.src .AND. dst −> dst)Emulation BIC #4,SRDescription

Strona 399

Instruction Set3-33 RISC 16−Bit CPU* CLRZ Clear zero bitSyntax CLRZOperation 0 → Zor(.NOT.src .AND. dst −> dst)Emulation BIC #2,SRDescription The

Strona 400 - Using the MSC Bit

Contentsvii 1 Introduction 1-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Strona 401 - ADC10 Operation

Instruction Set3-34 RISC 16−Bit CPUCMP[.W] Compare source and destinationCMP.B Compare source and destinationSyntax CMP src,dst or CMP.W src,dstCMP.

Strona 402 - One-Block Transfer Mode

Instruction Set3-35 RISC 16−Bit CPU* DADC[.W] Add carry decimally to destination* DADC.B Add carry decimally to destinationSyntax DADC dst or D

Strona 403

Instruction Set3-36 RISC 16−Bit CPUDADD[.W] Source and carry added decimally to destinationDADD.B Source and carry added decimally to destinationSynt

Strona 404 - Two-Block Transfer Mode

Instruction Set3-37 RISC 16−Bit CPU* DEC[.W] Decrement destination* DEC.B Decrement destinationSyntax DEC dst or DEC.W dstDEC.B dstOperation dst −

Strona 405

Instruction Set3-38 RISC 16−Bit CPU* DECD[.W] Double-decrement destination* DECD.B Double-decrement destinationSyntax DECD dst or DECD.W ds

Strona 406 - DTC Transfer Cycle Time

Instruction Set3-39 RISC 16−Bit CPU* DINT Disable (general) interruptsSyntax DINTOperation 0 → GIEor(0FFF7h .AND. SR → SR / .NOT.src .AND. dst −>

Strona 407

Instruction Set3-40 RISC 16−Bit CPU* EINT Enable (general) interruptsSyntax EINTOperation 1 → GIEor(0008h .OR. SR −> SR / .src .OR. dst −> dst

Strona 408

Instruction Set3-41 RISC 16−Bit CPU* INC[.W] Increment destination* INC.B Increment destinationSyntax INC dst or INC.W dstINC.B dstOperation dst + 1

Strona 409 - 18.2.10 ADC10 Interrupts

Instruction Set3-42 RISC 16−Bit CPU* INCD[.W] Double-increment destination* INCD.B Double-increment destinationSyntax INCD dst or INCD.W dstINCD.B dst

Strona 410 - 18.3 ADC10 Registers

Instruction Set3-43 RISC 16−Bit CPU* INV[.W] Invert destination* INV.B Invert destinationSyntax INV dstINV.B dstOperation .NOT.dst −> dstEmulation

Strona 411

Contentsviii3 RISC 16-Bit CPU 3-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Strona 412

Instruction Set3-44 RISC 16−Bit CPUJC Jump if carry setJHS Jump if higher or sameSyntax JC labelJHS labelOperation If C = 1: PC + 2 × offset −> PCI

Strona 413

Instruction Set3-45 RISC 16−Bit CPUJEQ, JZ Jump if equal, jump if zeroSyntax JEQ label, JZ labelOperation If Z = 1: PC + 2 × offset −> PCIf Z = 0

Strona 414

Instruction Set3-46 RISC 16−Bit CPUJGE Jump if greater or equalSyntax JGE labelOperation If (N .XOR. V) = 0 then jump to label: PC + 2 × offset −>

Strona 415

Instruction Set3-47 RISC 16−Bit CPUJL Jump if lessSyntax JL labelOperation If (N .XOR. V) = 1 then jump to label: PC + 2 × offset −> PCIf (N .XOR

Strona 416

Instruction Set3-48 RISC 16−Bit CPUJMP Jump unconditionallySyntax JMP labelOperation PC + 2 × offset −> PCDescription The 10-bit signed offset con

Strona 417

Instruction Set3-49 RISC 16−Bit CPUJN Jump if negativeSyntax JN labelOperation if N = 1: PC + 2 × offset −> PCif N = 0: execute following instruc

Strona 418

Instruction Set3-50 RISC 16−Bit CPUJNC Jump if carry not setJLO Jump if lowerSyntax JNC labelJLO labelOperation if C = 0: PC + 2 × offset −> PCif C

Strona 419 - Chapter 19

Instruction Set3-51 RISC 16−Bit CPUJNE Jump if not equalJNZ Jump if not zeroSyntax JNE labelJNZ labelOperation If Z = 0: PC + 2 × offset −> PCIf Z

Strona 420 - 19.1 DAC12 Introduction

Instruction Set3-52 RISC 16−Bit CPUMOV[.W] Move source to destinationMOV.B Move source to destinationSyntax MOV src,dst or MOV.W src,d

Strona 421 - DAC12 Introduction

Instruction Set3-53 RISC 16−Bit CPU* NOP No operationSyntax NOPOperation NoneEmulation MOV #0, R3Description No operation is performed. The instruct

Strona 422 - 19.2 DAC12 Operation

Contentsix 6 Supply Voltage Supervisor 6-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Strona 423 - 19.2.2 DAC12 Reference

Instruction Set3-54 RISC 16−Bit CPU* POP[.W] Pop word from stack to destination* POP.B Pop byte from stack to destinationSyntax POP dstPOP.B dstOper

Strona 424 - 19.2.4 DAC12_xDAT Data Format

Instruction Set3-55 RISC 16−Bit CPUPUSH[.W] Push word onto stackPUSH.B Push byte onto stackSyntax PUSH src or PUSH.W srcPUSH.B srcOper

Strona 425 - Figure 19−5. Positive Offset

Instruction Set3-56 RISC 16−Bit CPU* RET Return from subroutineSyntax RETOperation @SP→ PCSP + 2 → SPEmulation MOV @SP+,PCDescription The return addre

Strona 426

Instruction Set3-57 RISC 16−Bit CPURETI Return from interruptSyntax RETIOperation TOS → SRSP + 2 → SPTOS → PCSP + 2 → SPDescription The status regis

Strona 427 - 19.2.7 DAC12 Interrupts

Instruction Set3-58 RISC 16−Bit CPU* RLA[.W] Rotate left arithmetically* RLA.B Rotate left arithmeticallySyntax RLA dst or RLA.W dstRLA.B dstOperatio

Strona 428 - 19.3 DAC12 Registers

Instruction Set3-59 RISC 16−Bit CPU* RLC[.W] Rotate left through carry* RLC.B Rotate left through carrySyntax RLC dst or RLC.W dstRLC.B dstOperation

Strona 429

Instruction Set3-60 RISC 16−Bit CPURRA[.W] Rotate right arithmeticallyRRA.B Rotate right arithmeticallySyntax RRA dst or RRA.W dstRRA.B dstOperation M

Strona 430

Instruction Set3-61 RISC 16−Bit CPURRC[.W] Rotate right through carryRRC.B Rotate right through carrySyntax RRC dst or RRC.W dstRRC dstOperation C −&

Strona 431

Instruction Set3-62 RISC 16−Bit CPU* SBC[.W] Subtract source and borrow/.NOT. carry from destination* SBC.B Subtract source and borrow/.NOT. carry fro

Strona 432

Instruction Set3-63 RISC 16−Bit CPU* SETC Set carry bitSyntax SETCOperation 1 −> CEmulation BIS #1,SRDescription The carry bit (C) is set.Status

Komentarze do niniejszej Instrukcji

Brak uwag