Maxim-integrated DS4830 Optical Microcontroller Bedienungsanleitung

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Hardware Maxim-integrated DS4830 Optical Microcontroller herunter. Maxim Integrated DS4830 Optical Microcontroller User Manual [es] [it] [de] [en] Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 227
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 0
Maxim cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim product. No circuit patent licenses are implied. Maxim reserves
the right to change the circuitry and specifications without notice at any time.
Maxim Integrated 160 Rio Robles, San Jose, CA 95134 USA 1-408-601-1000
© 2012 Maxim Integrated The Maxim logo and Maxim Integrated are trademarks of Maxim Integrated Products, Inc.
DS4830
OpticalMicrocontroller
User’sGuide
Rev 0.3 8/2012
Seitenansicht 0
1 2 3 4 5 6 ... 226 227

Inhaltsverzeichnis

Seite 1 - User’sGuide

Maxim cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a Maxim product. No circuit patent licenses are

Seite 2 - Contents

DS4830 User’s Guide 10 Figure 1-1 DS4830 Block Diagram This document is provided as a supplement to the DS4830 IC data sheet. This user’s guide

Seite 3

DS4830 User’s Guide 100 edge is used to sample the serial shift data. The Clock Phase Select (CKPHA; SPICF.1) bit controls whether the active or in

Seite 4

DS4830 User’s Guide 101 12.1.2 – SPI Character Lengths To flexibly accommodate different SPI transfer data lengths, the character length for any t

Seite 5

DS4830 User’s Guide 102 12.2.3 – Write Collision While Busy A write collision occurs if an attempt to write the SPIB data buffer is made during a t

Seite 6

DS4830 User’s Guide 103 12.4 – SPI Master The DS4830 has the following SPI interface signals. Functional name External pin name MSPIDI: Input to s

Seite 7

DS4830 User’s Guide 104 Figure 12-4: SPI Master Pin Configurations with mode fault enable and disable In master mode, the MSPICS pin of the master

Seite 8

DS4830 User’s Guide 105 12.4.3 – SPI Master Register Descriptions SPI Master Module has four SFR registers. These are SPICN_M, SPICF_M, SPICK_M an

Seite 9 - SECTION 1 – OVERVIEW

DS4830 User’s Guide 106 12.4.3.2 – SPI Configuration Register (SPICF_M) SPICF_M Register Address: M5 [13h] Bit 7 6 5 4 3 2 1 0 Name ESPII SAS - -

Seite 10 - DS4830 User’s Guide

DS4830 User’s Guide 107 12.5 – SPI Slave Functional name External pin name SSPIDO: Output from serial shift register (MISO) GP6 SSPIDI: Input to s

Seite 11 - SECTION 2 – ARCHITECTURE

DS4830 User’s Guide 108 12.5.4 – SPI Slave Register Descriptions SPI Slave Module has four SFR registers. These are SPICN_S, SPICF_S,

Seite 12 - 2.2 – Register Space

DS4830 User’s Guide 109 12.5.4.2 – SPI Configuration Register (SPICF_S) SPICF_S Register Address: M1 [13h] Bit 7 6 5 4 3 2 1 0 Name ESPII SAS - -

Seite 13 - 2.3 – Memory Types

DS4830 User’s Guide 11 SECTION 2 – ARCHITECTURE The DS4830 contains a MAXQ20 low-cost, high-performance, CMOS, fully static microcontroller with fl

Seite 14

DS4830 User’s Guide 110 SECTION 13 – 3-WIRE The DS4830 has proprietary 3-Wire master interface for communication with MAXIM 3-wire laser drivers (

Seite 15

DS4830 User’s Guide 111 13.1.1.1 – Write Mode (RWN=0) The 3-Wire master generates 16 clock cycles on MCL pin. It outputs 16-bits (MSB first DADDR d

Seite 16

DS4830 User’s Guide 112 13.2 – 3-Wire Register Descriptions The 3-Wire interface is controlled by two SFR registers. These are the 3-

Seite 17

DS4830 User’s Guide 113 SECTION 14 – PWM The DS4830 provides ten independent PWM output pins that can be used to create DC-DC power supply contro

Seite 18

DS4830 User’s Guide 114 PWMCN.REG_SEL = 00bPWMCN.PWM_SEL =n PWMCN.REG_SEL = 01bPWMCN.PWM_SEL =n PWMCN.REG_SEL = 1xbPWMCN.PWM_SEL =n DCYC0 (Ch0)DCYC

Seite 19

DS4830 User’s Guide 115 14.2 – Individual PWM Channel Operation Figure 14-3: Block diagram of one PWM channel. The DS4830 has 10 PWMs whic

Seite 20 - 2.6 – Reset Conditions

DS4830 User’s Guide 116 PWM Output High Time128 CyclesPWM Output Low Time384 CyclesPWM Frame = 512 Cycles9-bit PWM Operation in Normal ModeDCYCn

Seite 21

DS4830 User’s Guide 117 PWM Output High Time32 CyclesPWM Output Low Time96 CyclesPWM Frame = 512 Cycles9 bit PWM Operation in 4 Slot pulse spreadin

Seite 22 - 2.7 – Clock Generation

DS4830 User’s Guide 118 Table 14-2. Slot frequencies for various resolution with different PWM Clocks Resolution No of Slots Clock (MHz) Frame f

Seite 23

DS4830 User’s Guide 119 14.2.4 – Alternate PWM Output Table 14-3 shows the mapping of each PWM Output. The PWM outputs PW0 to PW7 are also multip

Seite 24

DS4830 User’s Guide 12 prefix register is cleared to zero after one cycle so it will not affect any other instructions. The write to the prefix re

Seite 25

DS4830 User’s Guide 120 14.2.3.1 – PWM DELAY with PWMSYNC SFR The PWM channels to be synchronized must have the same configurations (Resolution,

Seite 26

DS4830 User’s Guide 121 PWM_SEL REG_SEL Local Register Selected 0 0 Duty Cycle Register PWM Channel 0 (DCYC0) 0 1 PWM Configuration Register PWM Ch

Seite 27

DS4830 User’s Guide 122 14.3.2.1 – Local Register DCYCn PWMCN REG_SEL = 00b PWMDATA[15:0]  DCYCn[15:0] BIT NAME DESCRIPTION 15:12 Reserved Reserv

Seite 28

DS4830 User’s Guide 123 14.3.2.2 – Local Register PWMCGFn Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 INV - ALT_ LOC PWMEN - CLK_SEL PS32 - PS4 - RE

Seite 29

DS4830 User’s Guide 124 14.3.2.3 – Local Register PWMDLYn PWMCN REG_SEL = 1xb PWMDATA[15:0]  PWMDLY[15:0] BIT NAME DESCRIPTION 15:12 Reserved Rese

Seite 30

DS4830 User’s Guide 125 14.4 – PWM Output Code Examples 14.4.1 – 9-bit PWM Output in normal mode with core clock Creating a 25% duty cycle with 2

Seite 31

DS4830 User’s Guide 126 SECTION 15 – GENERAL-PURPOSE INPUT/OUTPUT (GPIO) PINS 15.1 – Overview The DS4830 provides general-purpose input/output (GP

Seite 32

DS4830 User’s Guide 127 Table 15-1. GPIO Pins and Multiplexed Functions Port Index Pin Name Pin No. Default Function Special Function-1 Special f

Seite 33

DS4830 User’s Guide 128 Table 15-2. GPIO Registers Register Function Port 0 Port 1 Port 2 Port 6 POp Port Output Register M0[02h

Seite 34

DS4830 User’s Guide 129 15.2 – GPIO Port 0 Register Descriptions Port 0 provides eight GPIO pins that are multiplexed with ADC, DAC, Sample and Hol

Seite 35

DS4830 User’s Guide 13 Table 2-1. Register-to-Register Transfer Operations SOURCE REGISTER SIZE (BITS) DESTINATION REGISTER SIZE (BITS) PREFIX SET?

Seite 36 - SECTION 5 – INTERRUPTS

DS4830 User’s Guide 130 15.2.5 – GPIO Port 0 External Interrupt Flag Register (EIF0) Bit # 7 6 5 4 3 2 1 0 Name IE7 IE6 IE5 IE4 IE3 IE2 IE1 IE0 Res

Seite 37 - 5.1 – Servicing Interrupts

DS4830 User’s Guide 131 15.3.3 – GPIO Input Register for Port 1 (PI1) Bit # 7 6 5 4 3 2 1 0 Name PI1_7 PI1_6 PI1_5 PI1_4 PI1_3 PI1_2 PI1_1 PI1_0

Seite 38

DS4830 User’s Guide 132 PD2 is an 8-bit register used to determine the direction of the pins when they are used as GPIO pins.

Seite 39

DS4830 User’s Guide 133 15.5 – GPIO Port 6 Register Descriptions Port 6 provides seven GPIO pins that are multiplexed with the test access port (T

Seite 40

DS4830 User’s Guide 134 15.5.5 – GPIO Port 6 External Interrupt Flag Register (EIF6) Bit # 7 6 5 4 3 2 1 0 Name Reserved IE6 IE5 IE4 IE3 IE2 IE1

Seite 41

DS4830 User’s Guide 135 SECTION 16 – GENERAL-PURPOSE TIMERS The DS4830 has two identical 16-bit general-purpose timers. Each timer has the followin

Seite 42 - 6.1 – Detailed Description

DS4830 User’s Guide 136 In compare mode, the timer module begins counting from 0x0000 and when the value in the GTV register matches the value in t

Seite 43

DS4830 User’s Guide 137 16.2 – Timer Register Descriptions Each General Timer module has three independent SFR registers. These are GTCN, GTV and

Seite 44

DS4830 User’s Guide 138 16.2.2 – General Timer Value Register (GTV) GTV1 Register Address: M0 [06h] GTV2 Register Address: M3 [06h] Bit 15 14 13 1

Seite 45 - 6.3 – DAC Code Examples

DS4830 User’s Guide 139 SECTION 17 – SUPPLY VOLTAGE MONITOR (SVM) The DS4830 provides features to allow monitoring its power supply. The Supply Vol

Seite 46 - 7.1 – Detailed Description

DS4830 User’s Guide 14 The width of the stack is 16 bits to accommodate the instruction pointer size. On reset, the stack pointer SP initializes to

Seite 47

DS4830 User’s Guide 140 SECTION 18 – HARDWARE MULTIPLIER MODULE The hardware multiplier module can be used by the DS4830 to support hig

Seite 48

DS4830 User’s Guide 141 18.3 – Register Output Selection The Hardware Multiplier implements the MC Register Write Select (MCW) control bit so that

Seite 49

DS4830 User’s Guide 142 The specified hardware multiplier operation begins when the final operand(s) is loaded and will complete in a single cycle.

Seite 50

DS4830 User’s Guide 143 18.5.1 – Multiplier Control Register (MCNT) Bit 7 6 5 4 3 2 1 0 Name OF MCW CLD SQU OPCS MSUB MMAC SUS Reset 0 0 0 0 0 0 0

Seite 51

DS4830 User’s Guide 144 18.5.2 – Multiplier Operand A Register (MA) Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Name MA.15 MA.14 MA.13 MA.12 MA.11 MA

Seite 52

DS4830 User’s Guide 145 18.6 – Hardware Multiplier Examples The following are code examples of multiplier operations. ;Unsigned Multiply 16-bit x

Seite 53

DS4830 User’s Guide 146 SECTION 19 – WATCHDOG TIMER 19.1 - Overview The Watchdog Timer is a user programmable clock counter that can serve as a tim

Seite 54

DS4830 User’s Guide 147 Table 19-1. Watchdog Operating States EWT EWDI WDIF Actions x X 0 No interrupt has occurred. 0 0 x Watchdog disable, clock

Seite 55

DS4830 User’s Guide 148 BIT NAME DESCRIPTION 7 POR Power-On Reset Flag: This bit is set to 1 whenever a power-on/brownout reset occurs. It is una

Seite 56

DS4830 User’s Guide 149 SECTION 20 – TEST ACCESS PORT (TAP) The DS4830 incorporates a Test Access Port (TAP) and TAP controller for communication w

Seite 57

DS4830 User’s Guide 15 2.4.2 – Program Memory Mapping The DS4830’s mapping of the three memory segments (flash, SRAM, and utility ROM) as program m

Seite 58 - 7.3 – ADC Code Examples

DS4830 User’s Guide 150 20.1 – TAP Controller The TAP controller is a synchronous state machine that responds to changes at the TMS and TCK signa

Seite 59

DS4830 User’s Guide 151 20.2 – TAP State Control The TAP provides an independent serial channel to communicate synchronously with the host syste

Seite 60 - SECTION 8 – SAMPLE AND HOLD

DS4830 User’s Guide 152 Table 20-3 - Instruction Register (IR2:0) Encodings IR2:0 Instruction Function Serial Data Shift Register Selection

Seite 61

DS4830 User’s Guide 153 For the host to establish a specific data communication link, a private instruction must be loaded into the IR2:0 register.

Seite 62

DS4830 User’s Guide 154 Figure 20-4: TAP Controller Debug Mode DR-Scan Example Run-Test/IdleSelect-DR-ScanCapture-DRShift-DRExit1-DRP

Seite 63

DS4830 User’s Guide 155 SECTION 21 – IN-CIRCUIT DEBUG MODE The DS4830 is equipped with embedded debug hardware and embedded ROM firmware developed

Seite 64

DS4830 User’s Guide 156 TDI TDO9090X X s1 s0Host Command / Data Input StatusDS4830DS4830 Data Output Figure 21-2: 10-Bit Word Format Table 21-1: S

Seite 65

DS4830 User’s Guide 157 Table 21-2. Background Mode Commands Opcode Command Operation 0000-0000 No Operation No operation. (Default state for Debug

Seite 66

DS4830 User’s Guide 158 21.1.1.1 – Breakpoint 0 Register (BP0) Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Name BP0.15 BP0.14 BP0.13 BP0.12 BP0.11 BP

Seite 67

DS4830 User’s Guide 159 When REGE = 1: This register serves as one of the two register breakpoints. A break occurs when the destination register ad

Seite 68 - 9.1 – Detailed Description

DS4830 User’s Guide 16 pointer. If the data pointer is used as destination, the core performs a store operation that writes data to the memory loc

Seite 69

DS4830 User’s Guide 160 21.2 – Debug Mode There are two ways to enter the Debug Mode from Background Mode: 1. Issuance of the Debug command direc

Seite 70

DS4830 User’s Guide 161 (e.g., Unlock Password) require additional data from the host. Some commands need only to provide an indication of comp

Seite 71

DS4830 User’s Guide 162 Op Code Command Operation 0010-0101 Write data memory Write data to a selected data memory location. This command requires

Seite 72

DS4830 User’s Guide 163 Table 21-4. Output from Read Register Map Command WORD REGISTER WORD REGISTER WORD REGISTER WORD REGISTER WORD REGISTER W

Seite 73

DS4830 User’s Guide 164 debug engine. Also, note that the interrupt handler is an essential part of the CPU and a pending interru

Seite 74

DS4830 User’s Guide 165 21.3 – In-Circuit Debug Peripheral Registers The following peripheral registers are used to control the in-circuit debug m

Seite 75

DS4830 User’s Guide 166 21.3.3 – In-Circuit Debug Control Register (ICDC, M2[1Ah]) Bit 7 6 5 4 3 2 1 0 Name DME - REGE - CMD3 CMD2 CMD1 CMD0 Res

Seite 76 - SECTION 10 – I

DS4830 User’s Guide 167 21.3.4 – In-Circuit Debug Flag Register (ICDF, M2[1Bh]) Bit 7 6 5 4 3 2 1 0 Name - - - - PSS1 PSS0 JTAG_SPE TXC Reset 0 0

Seite 77

DS4830 User’s Guide 168 21.3.7 – In-Circuit Debug Data Register (ICDD, M2[1Eh]) Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Name ICDD.15 ICDD.14 IC

Seite 78

DS4830 User’s Guide 169 SECTION 22 – IN-SYSTEM PROGRAMMING The DS4830 contains an internal bootstrap loader utilizing the JTAG or I2C interfaces.

Seite 79

DS4830 User’s Guide 17 2.4.4.1 – Memory Map When Executing from Flash Memory When executing from the flash memory:  Read and write operations of

Seite 80

DS4830 User’s Guide 170 If none of the preceding conditions have been met, the DS4830 ROM code will be complete. The DS4830 will then jump to prog

Seite 81

DS4830 User’s Guide 171 Table 22-2 JTAG Bootloader Status Bits Bits 1:0 Status Condition 00 Reserved Invalid condition. 01 Reserved Invalid condit

Seite 82

DS4830 User’s Guide 172 22.2.1 – JTAG Bootloader Protocol The JTAG port consists of a shift register. As data is clocked into TDI, data will be c

Seite 83

DS4830 User’s Guide 173 22.3 – Bootloader Commands Commands for the DS4830 loader are grouped into families. All bootloader commands begin with

Seite 84

DS4830 User’s Guide 174 22.3.4 - Command 03h – Password Match Byte 1 Bytes 2 to 33 Byte 34 Byte 35 Command Data In NOP Return Input 03h 32-Byte

Seite 85

DS4830 User’s Guide 175 22.3.6 - Command 05h – Get Supported Commands Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7 Command NOP Data Out Data

Seite 86

DS4830 User’s Guide 176 22.3.11 - Command 10h – Load Code Byte 1 Byte 2 Byte 3 Byte 4 (Length) Bytes Byte Length+5 Byte Length+6 Command Data I

Seite 87

DS4830 User’s Guide 177 22.3.14 - Command 21h – Dump Data Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 5 Byte 6 Length Bytes Byte Length+7 Command D

Seite 88

DS4830 User’s Guide 178 This command operates in the same manner as the Load Data command, except that instead of writing the input data into SRAM,

Seite 89 - C-COMPATIBLE SLAVE INTERFACE

DS4830 User’s Guide 179 SECTION 23 – PROGRAMMING The following section provides a programming overview of the DS4830. For full details on the inst

Seite 90 - 11.1 – Detailed Description

DS4830 User’s Guide 18 2.4.4.2 – Memory Map When Executing from Utility ROM When executing from the utility ROM:  Read and write operations of SR

Seite 91

DS4830 User’s Guide 180 23.3.1 – Loading an 8-bit register with an immediate value Any writeable 8-bit register with a sub-index from 0h to 7h wit

Seite 92

DS4830 User’s Guide 181 16-bit destination  concatenation(8-bit source, 8-bit source) Two 8-bit source registers can be concatenated and stored in

Seite 93

DS4830 User’s Guide 182 As with other instructions, prefixing is required to select destination registers beyond index 07h. The MOVE instruction

Seite 94

DS4830 User’s Guide 183  MOVE Acc, Acc (Recirculation of active accumulator contents)  XCHN (Exchange nibbles within each byte of active

Seite 95

DS4830 User’s Guide 184 23.5.3 – ALU operations using the active accumulator and a source The following arithmetic and logical operations can use a

Seite 96

DS4830 User’s Guide 185 Since the Sign flag is a dynamic reflection of the high bit of the active accumulator, any instruction that changes the val

Seite 97

DS4830 User’s Guide 186  MOVE Acc.<b>, C (Set selected active accumulator bit to Carry)  AND Acc.<b> (Carry = Carry AND sel

Seite 98

DS4830 User’s Guide 187 23.7.3 - Conditional jumps Conditional jumps transfer program execution based on the value of one of the status flags (C,

Seite 99

DS4830 User’s Guide 188 move LC[1], #10h ; loop 16 times ... LoopTop: ; loop address not relative to djnz

Seite 100

DS4830 User’s Guide 189 To support high priority interrupts while servicing another interrupt source, the IMR register may be used to create a user

Seite 101 - 12.2 – SPI System Errors

DS4830 User’s Guide 19 2.4.4.3 – Memory Map When Executing from SRAM When executing from the SRAM:  The utility ROM can be read as data, starting

Seite 102 - 12.3 – SPI Interrupts

DS4830 User’s Guide 190 add @SP-- ; sum the last three words pushed onto the stack add @SP-- ; with Acc, disregarding ove

Seite 103

DS4830 User’s Guide 191 bit that is utilized only for word mode data pointer access). Switching from byte to word access mode or vice versa does no

Seite 104

DS4830 User’s Guide 192 SECTION 24 – INSTRUCTION SET Table 24-1. Instruction Set Summary Mnemonic Description 16-bit Instruction Word Status Bits

Seite 105

DS4830 User’s Guide 193 Note 2: Only module 8 and modules 0-5 are supported by these single-cycle bit operations. Potentially affects C or E if PSF

Seite 106

DS4830 User’s Guide 194 AND src Logical AND Description: Performs a logical-AND between the act

Seite 107

DS4830 User’s Guide 195 {L/S}CALL src {Long/Short} Call to subroutine Description: Perform

Seite 108

DS4830 User’s Guide 196 CMP src Compare Accumulator Description: Compare for equality between the active accumula

Seite 109

DS4830 User’s Guide 197 {L/S}DJNZ LC[n], src Decrement Counter, {Long/Short} Jump Not Zero Descript

Seite 110 - SECTION 13 – 3-WIRE

DS4830 User’s Guide 198 {L/S} JUMP src Unconditional {Long/Short} Jump Description: Performs a

Seite 111

DS4830 User’s Guide 199 {L/S} JUMP C / {L/S} JUMP NC, src Conditional {Long/Short} Jump o

Seite 112

DS4830 User’s Guide 2 Contents SECTION 1 – OVERVIEW ...

Seite 113 - Using PWMCN and PWMDATA

DS4830 User’s Guide 20 2.5 – Data Alignment To support merged program and data memory operation while maintaining efficient memory space usage, the

Seite 114

DS4830 User’s Guide 200 JUMP NZ Operation: Z=0: IP  IP + src (relative) –or— src (absolute) Z=1: IP  IP + 1 Encoding: 15

Seite 115

DS4830 User’s Guide 201 MOVE dst, src Move Data Description: Moves data from a sp

Seite 116

DS4830 User’s Guide 202 MOVE dst, src (continued) Destination Specifier Codesdst dst Bit Encodin

Seite 117

DS4830 User’s Guide 203 Example(s): MOVE A[0], A[3] ; A[0]  A[3] MOVE DP[0], #110h ; DP[0]  #0110h (PFX[0] re

Seite 118

DS4830 User’s Guide 204 MOVE C, Acc.<b> Move Accumulator bit to Carry Flag Description: Replaces the Carry (C) status flag with

Seite 119

DS4830 User’s Guide 205 MOVE C, #1 Set Carry Flag Description: Sets the Carry (C) processor status flag. Statu

Seite 120 - Core Clock

DS4830 User’s Guide 206 NEG Negate Accumulator Description: Performs a negation (two’s comple

Seite 121

DS4830 User’s Guide 207 POP dst Pop Word from the Stack Description: Pops a single word from the stack (@SP) to the spe

Seite 122

DS4830 User’s Guide 208 Operation: SP  ++SP Encoding: 15 0 f000 1101 ssss ssss Example(s): PUSH GR ; GR=0F3Fh

Seite 123 - FrequencyFramePWM

DS4830 User’s Guide 209 RET C / RET NC Conditional Return on Status Flag RET Z / RET NZ RET S Desc

Seite 124

DS4830 User’s Guide 21 BROWNOUT STATECPU DISABLEDANALOG ACTIVESYSTEM CLOCKSTARTUP DELAY CPU MODEDIGITAL CORE ONANALOG ONCODE EXECUTIONVDD > VBOV

Seite 125

DS4830 User’s Guide 210 RETI Return from Interrupt Description: RETI pops a single word from

Seite 126

DS4830 User’s Guide 211 RETI Z Operation: Z=1: IP  @SP-- INS 0 Z=0: IP  IP + 1 Encoding: 15

Seite 127 - * = 01b

DS4830 User’s Guide 212 RL / RLC Rotate Left Accumulator Carry Flag (Ex/In)clusive Description: Rotates the active accu

Seite 128

DS4830 User’s Guide 213 RR / RRC Rotate Right Accumulator Carry Flag (Ex/In)clusive Description: Rotates the active accu

Seite 129

DS4830 User’s Guide 214 SLA / SLA2 / SLA4 Shift Accumulator Left Arithmetically One, Two, or Four Times Description: Shifts the a

Seite 130

DS4830 User’s Guide 215 SR Shift Accumulator Right SRA / SRA2 / SRA4

Seite 131

DS4830 User’s Guide 216 SRA2 Operation: 15 Active Accumulator (Acc) 0 Carry Flag Acc.[13:0] Acc

Seite 132

DS4830 User’s Guide 217 SUB / SUBB src Subtract / Subtract with Borrow Description: Subtracts the specifie

Seite 133

DS4830 User’s Guide 218 XCH Exchange Accumulator Bytes Description: Exchanges the upper and lower bytes of the active accumu

Seite 134

DS4830 User’s Guide 219 XOR src Logical XOR Description: Performs a logical-XOR between the

Seite 135

DS4830 User’s Guide 22 2.6.4 – Internal System Resets There are two possible sources of internal system resets. An internal reset will hold the D

Seite 136

DS4830 User’s Guide 220 SECTION 25 – UTILITY ROM 25.1 – Overview The DS4830 utility ROM includes routines that provide the following functions to

Seite 137

DS4830 User’s Guide 221 25.2 – In-Application Programming Functions 25.2.1 – UROM_flashWrite Function UROM_flashWrite Summary Programs a single w

Seite 138

DS4830 User’s Guide 222 25.3 – Data Transfer Functions The DS4830 cannot access data from the same memory segment that is currently

Seite 139

DS4830 User’s Guide 223 25.3.1 – UROM_moveDP0 Function UROM_moveDP0 Summary Reads the byte/word value pointed to by DP[0]. Inputs DP[0]: Address to

Seite 140 - MULTIPLIER

DS4830 User’s Guide 224 25.3.4 – UROM_moveDP1 Function UROM_moveDP1 Summary Reads the byte/word value pointed to by DP[1]. Inputs DP[1]: Address to

Seite 141

DS4830 User’s Guide 225 25.3.7 – UROM_moveBP Function UROM_moveBP Summary Reads the byte/word value pointed to by BP[OFFS]. Inputs BP[OFFS]: Addres

Seite 142

DS4830 User’s Guide 226 25.3.10 – UROM_copyBuffer Function UROM_copyBuffer Summary LC[0] bytes/words (up to 256) from DP[0] to BP[OFFS]. Inputs DP[

Seite 143

DS4830 User’s Guide 227 25.4 – Utility ROM Examples 25.4.1 – Reading Constant Word Data from Flash UROM_moveDP0inc equ 08483h move DPC, #1Ch

Seite 144

DS4830 User’s Guide 23 SECTION 3 – SYSTEM REGISTER DESCRIPTIONS Most functions of the DS4830 are controlled by sets of registers. These registers p

Seite 145

DS4830 User’s Guide 24 Table 3-2. System Register Bit Functions REGISTER REGISTER BIT NUMBER 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 AP — — —

Seite 146 - SECTION 19 – WATCHDOG TIMER

DS4830 User’s Guide 25 3.1 Accumulator Pointer Register (AP, 8h[0h]) Initialization: This register is cleared to 00h on all forms of reset. Acce

Seite 147

DS4830 User’s Guide 26 3.5 Interrupt Mask Register (IMR, 8h[6h]) Initialization: This register is cleared to 00h on all forms of reset. Access:

Seite 148

DS4830 User’s Guide 27 3.8 Watchdog Control Register (WDCN, 8h[Fh]) Initialization: Bits 5, 4, 3 and 0 are cleared to 0 on all forms of reset; fo

Seite 149

DS4830 User’s Guide 28 3.10 Prefix Register (PFX[n], Bh[n]) Initialization: This register is cleared to 0000h on all forms of reset. Access: Unr

Seite 150 - 20.1 – TAP Controller

DS4830 User’s Guide 29 3.16 Frame Pointer Offset Register (OFFS, Eh[3h]) Initialization: This register is cleared to 00h on all forms of reset.

Seite 151 - 20.2 – TAP State Control

DS4830 User’s Guide 3 7.1.3 – Temperature Conversion ...

Seite 152 - 20.3 – Communication via TAP

DS4830 User’s Guide 30 3.22 General Register High Byte (GRH, Eh[9h]) Initialization: This register is cleared to 00h on all forms of reset. Acce

Seite 153

DS4830 User’s Guide 31 SECTION 4 – PERIPHERAL REGISTER DESCRIPTIONS Reg M0 M1 M2 M3 M4 M5 0 PO2 I2CBUF-M I2CBUF-S MCNT DACD0 QTDATA 1 PO1 I2CST-M I

Seite 154

DS4830 User’s Guide 32 MODULE 0 Register index 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 PO2 00h PO2[7:0] PO1 01h PO1[7

Seite 155

DS4830 User’s Guide 33 MODULE 1 Register index 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 I2CBUF_M 00h - D[7:0] I2CST_M 01h I2CBUS I2CBUSY - - I2CSPI I

Seite 156

DS4830 User’s Guide 34 MODULE 2 Register index 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 I2CBUF_S 00h - D[7:0] I2CST_S 01h I2CBUS I2CBUSY - - I2CSPI I

Seite 157

DS4830 User’s Guide 35 MODULE 3 Register index 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 MCNT 00h OF MCW CLD SQU OPCS MSUB MMAC SUS MA

Seite 158

DS4830 User’s Guide 36 SECTION 5 – INTERRUPTS The DS4830 provides a single, programmable interrupt vector (IV) that can be used to ha

Seite 159

DS4830 User’s Guide 37 Note: Some of the DS4830 module and peripheral interrupts sources are shown in the Figure 5-1 interrupt hier

Seite 160 - 21.2 – Debug Mode

DS4830 User’s Guide 38 I2C Slave Transmit Complete Interrupt I2CST_S.I2CTXI I2CIE_S.I2CTXIE I2C Slave Receive Ready Interrupt I2CST_S. I2CRXI I2CIE

Seite 161

DS4830 User’s Guide 39 pending interrupt. The peripheral register bits inside the module also provide a way to differentiate among

Seite 162

DS4830 User’s Guide 4 11.1 – Detailed Description ...

Seite 163

DS4830 User’s Guide 40 5.3 – Interrupt System Operation The interrupt handler hardware responds to any interrupt event when it is enabled. An inte

Seite 164

DS4830 User’s Guide 41 When the prefix register is activated by writing a value to it, it retains that value only for the next clock cycle. For the

Seite 165

DS4830 User’s Guide 42 SECTION 6 – DIGITAL-TO-ANALOG CONVERTER (DAC) The DS4830 contains eight 12-bit digital-to-analog converters (DACs). Each DA

Seite 166

DS4830 User’s Guide 43 The DAC Data register programs the DAC for a particular voltage output depending on the value of this register and the refer

Seite 167

DS4830 User’s Guide 44 6.2.1 – DAC Configuration Register (DACCFG) Register Address: M4 [08h] Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Name DAC

Seite 168

DS4830 User’s Guide 45 6.3 – DAC Code Examples 6.3.1 – DAC0 enabled with internal reference and output voltage is configured for 50%

Seite 169 - 22.1 – Detailed Description

DS4830 User’s Guide 46 SECTION 7 – ANALOG-TO-DIGITAL CONVERTER (ADC) The DS4830 provides a 13-bit analog-to-digital converter (ADC) with 26-input

Seite 170

DS4830 User’s Guide 47 By default, the external channels GP0-15 are general-purpose input. The DS4830 has the Pin Select Register (PINSEL). The PI

Seite 171 - 22.2 – Bootloader Operation

DS4830 User’s Guide 48 case for sequence conversion, where the starting and ending configuration address is the same. The configurat

Seite 172

DS4830 User’s Guide 49 3. S/H0 has priority over S/H1 if both S/Hs are ready for conversion. However, in next slot for S/H, the S/H1 will get slot

Seite 173 - 22.3 – Bootloader Commands

DS4830 User’s Guide 5 14.2.3 – Pulse Spreading...

Seite 174

DS4830 User’s Guide 50 ADACQ[3:0]. Table 7-2 shows the extended acquisition time in terms of core clocks at different ADACQ[3:0] The total acquisi

Seite 175

DS4830 User’s Guide 51 location configured in the ALT_LOC[4:0] bits in the ADDATA during ADC configuration (ADST.ADCFG = 1). This buffer is accesse

Seite 176

DS4830 User’s Guide 52 7.2 – ADC Register Descriptions The ADC is controlled by ADC SFR registers. The PINSEL register is used to configure pins as

Seite 177

DS4830 User’s Guide 53 7.2.2 – ADC Status Register (ADST) Register Address: M2[06h] Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Name - - - SH1DAI SH0

Seite 178

DS4830 User’s Guide 54 7.2.3 – PIN Select Register (PINSEL) Register Address: M2 [12h] Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Name PINSEL.15 PIN

Seite 179 - SECTION 23 – PROGRAMMING

DS4830 User’s Guide 55 6 ADALIGN ADC Data Alignment Select. This bit selects the ADC data alignment mode. Setting this bit to ‘1’ returns ADC data

Seite 180

DS4830 User’s Guide 56 7.2.6 – Temperature Control Register (TEMPCN) Register Address: M2 [0Bh] The Temperature Control register TEMPCN config

Seite 181

DS4830 User’s Guide 57 7.2.8 – ADC External Temperature Offset Register (TOEX) Register Address: M1 [1Ah] Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Seite 182

DS4830 User’s Guide 58 7.3 – ADC Code Examples 7.3.1 – One Sequence of 4 Voltage Conversions for Ch0 (Diff), Ch1 (Diff), Ch14 (Single) and Ch15 (Si

Seite 183

DS4830 User’s Guide 59 while (1) { while (!ADST_bit.ADDAI); //wait for conversions to complete ADST_bit.ADDAI = 0; ADST_bit.AD

Seite 184

DS4830 User’s Guide 6 SECTION 18 – HARDWARE MULTIPLIER MODULE ...

Seite 185

DS4830 User’s Guide 60 SECTION 8 – SAMPLE AND HOLD The DS4830 has two independent, but identical, Sample and Hold differential channels. Sample an

Seite 186

DS4830 User’s Guide 61 Sample Time (min 300nSec)Conversion Time Depends upon ADC SequencingSample and Hold Sample and Conversion TimingsSample Puls

Seite 187

DS4830 User’s Guide 62 circuit. When the clock select bit CLK_SEL is set to ‘1’, the external clock (CLKIN on the DACPW2 pin) is used for the samp

Seite 188

DS4830 User’s Guide 63 SHEN0/1 orINT_REIG0/1Sample PulseSample Pulse Width with external clockCLKIN ….Falling edge (Sample stop) depends upon SSC[3

Seite 189

DS4830 User’s Guide 64 8.1.5 – Sample and Hold Data Reading Each sample and hold has defined data buffer locations where the ADC controller writes

Seite 190

DS4830 User’s Guide 65 8.2 – Sample and Hold Register Descriptions The sample and hold has two SFRs. These are Sample and Hold Control Register (SH

Seite 191

DS4830 User’s Guide 66 125s. During fast mode, the sample and hold conversion priority is increased over voltage channels in the sequence and the

Seite 192 - SECTION 24 – INSTRUCTION SET

DS4830 User’s Guide 67 8.2.2 – Sample and Hold Internal Trigger Enable Register (SENR) SENR Register Address: M2[05h] Bit 15 14 13 12 11 10 9 8

Seite 193

DS4830 User’s Guide 68 SECTION 9 – QUICK TRIP (FAST COMPARATOR) The DS4830 has 16 8-bit quick trips with 16-input Analog MUX (Figure 9-1). The MUX

Seite 194

DS4830 User’s Guide 69 By default, the external channels GP0-15 are general-purpose input. The DS4830 has the Pin Select Register (PINSEL). The PIN

Seite 195

DS4830 User’s Guide 7 22.2.1 – JTAG Bootloader Protocol ...

Seite 196

DS4830 User’s Guide 70 (channel 7 + differential mode) and 06h (channel 6 + single-ended). See below Table 9-2 for the quick trip

Seite 197

DS4830 User’s Guide 71 Channel 5LT HTChannel 6LT HTChannel 7LT HT……….Channel 5LT HTChannel 6LT HTChannel 7LT HT……….Channel 6*LT HTChannel 6*LT HT*

Seite 198

DS4830 User’s Guide 72 9.2 – Quick Trip Register Descriptions The quick trip has 7 SFRs. These are the Quick Trip Control Register (QTCN), Quick Tr

Seite 199

DS4830 User’s Guide 73 QTDATA Register map when RW_LST = 0 (in the QTCN Register) Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Name - LOW or HIGH THRE

Seite 200

DS4830 User’s Guide 74 9.2.3 – Low Trip Interrupt Register (LTI) LTI Register Address: M5 [02h] Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Name IF[1

Seite 201

DS4830 User’s Guide 75 9.2.7 – Quick Trip List Register (QTLST) QTLIST Register Address: M5 [0Ah] Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Name

Seite 202

DS4830 User’s Guide 76 SECTION 10 – I2C-COMPATIBLE MASTER INTERFACE The DS4830 provides an I2C-compatible master controller that allows the DS4830

Seite 203

DS4830 User’s Guide 77 Figure 10-1: I2C Clock Generation The master I2C controller’s ability to monitor the state of SCL allows the master to o

Seite 204

DS4830 User’s Guide 78  Whenever SCL goes low. If the SCL line is low for a period longer than specified in the timeout register, the I2C contro

Seite 205

DS4830 User’s Guide 79 Figure 10-3: Master I2C Generated START and STOP 10.1.6 – Generating a STOP To end an I2C transfer, a STOP must be trans

Seite 206

DS4830 User’s Guide 8 23.6.2 - Zero Flag ...

Seite 207

DS4830 User’s Guide 80 10.1.7 – Transmitting a Slave Address The first byte after an I2C start or restart condition is the slave address byte. Thi

Seite 208

DS4830 User’s Guide 81 I2CNACKI = ACKNOWLEDGETransmit I2CBUF_M[7:0] I2CBUF_M[0] I2CMODEI2CBUSY=1I2CTXI=1I2CBUSY=0Write to I2CBUF_MRECEIVEAC

Seite 209

DS4830 User’s Guide 82 1. If I2CBUF_M is empty, the I2C master controller will copy the data from the shift register into I2CBUF_M. The I2CRXI fl

Seite 210

DS4830 User’s Guide 83 10.1.10 – I2C Master Clock Stretching The Master I2C Controller is capable of clock stretching at the end of each transfer c

Seite 211

DS4830 User’s Guide 84 10.1.12 – Operation as a Slave The DS4830 contains two I2C interfaces, the master (MSDA and MSCL) and slave (DS4830 SDA and

Seite 212

DS4830 User’s Guide 85 10.2 – I2C Master Controller Register Description Following are the registers that are used to control the I2C Master Inter

Seite 213

DS4830 User’s Guide 86 10.2.2 – I2C Master Status Register (I2CST_M) Address: M1[01h] Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Name I2CBUS I2CBUSY

Seite 214

DS4830 User’s Guide 87 10.2.3 – I2C Master Interrupt Enable Register (I2CIE_M) Address: M1[02h] Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Name - -

Seite 215

DS4830 User’s Guide 88 10.2.5 – I2C Master Clock Control Register (I2CCK_M) Address: M1[0Dh] Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Name I2CCKH7

Seite 216

DS4830 User’s Guide 89 SECTION 11 – I2C-COMPATIBLE SLAVE INTERFACE The DS4830 provides an I2C-compatible slave controller that allows the DS4830 to

Seite 217

DS4830 User’s Guide 9 SECTION 1 – OVERVIEW The DS4830 System Management Microcontroller provides a complete optical control, calibration, and monit

Seite 218

DS4830 User’s Guide 90 11.1 – Detailed Description 11.1.1 – Default Operation The I2C slave controller is enabled (I2CCN_S.I2CEN=1) by default. A

Seite 219

DS4830 User’s Guide 91 TransmittingByteReceiving ByteYReceiveAddr[6:0] + R/WMatchI2CSLA_S[7:1]?TransmitI2CACKI2CBUSY=0NI2CAMI=1Set I2CMODEAccording

Seite 220 - SECTION 25 – UTILITY ROM

DS4830 User’s Guide 92 Following the 8th data (least significant bit) being shifted to SDA, the SDA line will be released by the

Seite 221

DS4830 User’s Guide 93 11.1.8 – Clock Stretching If a slave device cannot receive or transmit another complete byte of data, it may hold SCL low, f

Seite 222

DS4830 User’s Guide 94 1. The I2C slave controller is in the idle state and there is no communications on the I2C bus. The timer should not generat

Seite 223

DS4830 User’s Guide 95 11.2 – I2C Slave Controller Register Description Following are the registers that are used to control the I2C Sla

Seite 224

DS4830 User’s Guide 96 11.2.2 – I2C Slave Status Register (I2CST_S) Address: M2[01h] Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Name I2CBUS I2CBUSY

Seite 225

DS4830 User’s Guide 97 11.2.3 – I2C Slave Interrupt Enable Register (I2CIE_S) Address: M2[02h] Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Name - - -

Seite 226

DS4830 User’s Guide 98 11.2.5 – I2C Slave Data Buffer Register (I2CBUF_S) Address: M2[00h] Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Name - - - - -

Seite 227 - 25.4 – Utility ROM Examples

DS4830 User’s Guide 99 SECTION 12 – SERIAL PERIPHERAL INTERFACE (SPI) The DS4830 provides two independent Serial Peripheral Interfaces (SPI) – one

Kommentare zu diesen Handbüchern

Keine Kommentare