DSPIC30F2010-30I/SOG Microchip Technology, DSPIC30F2010-30I/SOG Datasheet

IC DSPIC MCU/DSP 12K 28SOIC

DSPIC30F2010-30I/SOG

Manufacturer Part Number
DSPIC30F2010-30I/SOG
Description
IC DSPIC MCU/DSP 12K 28SOIC
Manufacturer
Microchip Technology
Series
dsPIC™ 30Fr

Specifications of DSPIC30F2010-30I/SOG

Core Processor
dsPIC
Core Size
16-Bit
Speed
30 MIPs
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, Motor Control PWM, QEI, POR, PWM, WDT
Number Of I /o
20
Program Memory Size
12KB (4K x 24)
Program Memory Type
FLASH
Eeprom Size
1K x 8
Ram Size
512 x 8
Voltage - Supply (vcc/vdd)
2.5 V ~ 5.5 V
Data Converters
A/D 6x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
28-SOIC (7.5mm Width)
Core Frequency
30MHz
Embedded Interface Type
I2C, SPI, UART
No. Of I/o's
20
Flash Memory Size
12KB
Supply Voltage Range
2.5V To 5.5V
Operating Temperature Range
-40°C To +85°C
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
XLT28SO-1 - SOCKET TRANSITION 28SOIC 300MILDV164005 - KIT ICD2 SIMPLE SUIT W/USB CABLE
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Lead free / RoHS Compliant
Other names
DSPIC30F201030ISO

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
DSPIC30F2010-30I/SOG
Manufacturer:
TOS
Quantity:
453
dsPIC30F2010
Data Sheet
28-pin High-Performance
Digital Signal Controllers
Preliminary
 2004 Microchip Technology Inc.
DS70118E

Related parts for DSPIC30F2010-30I/SOG

DSPIC30F2010-30I/SOG Summary of contents

Page 1

... Microchip Technology Inc. dsPIC30F2010 Data Sheet 28-pin High-Performance Digital Signal Controllers Preliminary DS70118E ...

Page 2

... PowerCal, PowerInfo, PowerMate, PowerTool, rfLAB, rfPICDEM, Select Mode, Smart Serial, SmartTel and Total Endurance are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. ...

Page 3

... Enhanced Flash 16-bit Digital Signal Controller Note: This data sheet summarizes features of this group of dsPIC30F devices and is not intended complete reference source. For more information on the CPU, peripherals, register descriptions and general device functionality, refer to the dsPIC30F Family Reference Manual (DS70046) ...

Page 4

... This table provides a summary of the dsPIC30F2010 peripheral features. Other available devices in the dsPIC30F Motor Control and Power Conversion Family are shown for feature comparison. DS70118E-page 2 • Detects clock failure and switches to on-chip low power RC oscillator • Programmable code protection • ...

Page 5

... AN5/QEB/IC8/CN7/RB5 OSC1/CLKIN OSC2/CLKO/RC15  2004 Microchip Technology Inc. 1 MCLR REF +/CN2/RB0 REF -/CN3/RB1 26 PWM1L/RE0 4 PWM1H/RE1 PWM2L/RE2 6 PWM2H/RE3 23 7 PWM3L/RE4 PWM3H/RE5 21 9 OSC1/CLKI PGC/EMUC/U1RX/SDI1/SDA/RF2 18 12 PGD/EMUD/U1TX/SDO1/SCL/RF3 FLTA/INT0/SCK1/OCFA/RE8 14 15 EMUC2/OC1/IC1/INT1/RD0 1 21 PWM2L/RE2 2 20 PWM2H/RE3 3 19 PWM3L/RE4 dsPIC30F2010 4 PWM3H/RE5 PGC/EMUC/U1RX/SDI1/SDA/RF2 7 15 Preliminary dsPIC30F2010 DS70118E-page 3 ...

Page 6

... Table of Contents 1.0 Device Overview .......................................................................................................................................................................... 5 2.0 CPU Architecture Overview.......................................................................................................................................................... 9 3.0 Memory Organization ................................................................................................................................................................. 19 4.0 Address Generator Units ............................................................................................................................................................ 31 5.0 Interrupts .................................................................................................................................................................................... 37 6.0 Flash Program Memory .............................................................................................................................................................. 43 7.0 Data EEPROM Memory ............................................................................................................................................................. 49 8.0 I/O Ports ..................................................................................................................................................................................... 53 9.0 Timer1 Module ........................................................................................................................................................................... 57 10.0 Timer2/3 Module ........................................................................................................................................................................ 61 11.0 Input Capture Module................................................................................................................................................................. 67 12.0 Output Compare Module ............................................................................................................................................................ 71 13 ...

Page 7

... Programmer’s Reference Manual (DS70030).  2004 Microchip Technology Inc. dsPIC30F2010 This document contains device specific information for the dsPIC30F2010 device. The dsPIC30F devices contain extensive Digital Signal Processor (DSP) func- tionality within a high-performance 16-bit microcontroller (MCU) architecture. Figure 1-1 shows a device block diagram for the dsPIC30F2010 device ...

Page 8

... FIGURE 1-1: dsPIC30F2010 BLOCK DIAGRAM Y Data Bus Interrupt PSV & Table Controller Data Access 8 24 Control Block 24 24 PCU PCH Program Counter Stack Address Latch Control Control Logic Logic Program Memory (12 Kbytes) Data EEPROM (1 Kbyte) 16 Data Latch ROM Latch 24 IR ...

Page 9

... ICD Tertiary Communication Channel clock input/output pin. ICD Quaternary Communication Channel data input/output pin. ICD Quaternary Communication Channel clock input/output pin. Capture inputs. The dsPIC30F2010 has 4 capture inputs. The inputs are numbered for consistency with the inputs on larger device variants. Quadrature Encoder Index Pulse input. ...

Page 10

... TABLE 1-1: PINOUT I/O DESCRIPTIONS (CONTINUED) Pin Buffer Pin Name Type Type PGD I/O ST PGC I ST RB0-RB5 I/O ST RC13-RC14 I/O ST RD0-RD1 I/O ST RE0-RE5, I/O ST RE8 RF2, RF3 I/O ST SCK1 I/O ST SDI1 I ST SDO1 O — SS1 I ST SCL I/O ST SDA I/O ...

Page 11

... Programmer’s Reference Manual (DS70030). This document provides a summary dsPIC30F2010 CPU and peripheral function. For a complete description of this functionality, please refer to the dsPIC30F Family Reference Manual (DS70046). 2.1 Core Overview The core has a 24-bit instruction word. The Program Counter (PC bits wide with the Least Significant (LS) bit always clear (see Section 3 ...

Page 12

... Programmer’s Model The programmer’s model is shown in Figure 2-1 and consists of 16x16-bit working registers (W0 through W15), 2x40-bit accumulators (AccA and AccB), STATUS register (SR), Data Table Page register (TBLPAG), Program Space Visibility Page register (PSVPAG), DO and REPEAT registers (DOSTART, DOEND, DCOUNT and RCOUNT), and Program Counter (PC) ...

Page 13

... DCOUNT 0 DOSTART DOEND 15 0 CORCON DC IPL2 IPL1 IPL0 SRL Preliminary dsPIC30F2010 PUSH.S Shadow DO Shadow Legend Working Registers Stack Pointer Limit Register AD0 Program Counter REPEAT Loop Counter DO Loop Counter DO Loop Start Address DO Loop End Address Core Configuration Register Z C Status Register ...

Page 14

... Divide Support The dsPIC devices feature a 16/16-bit signed fractional divide operation, as well as 32/16-bit and 16/16-bit signed and unsigned integer divide operations, in the form of single instruction iterative divides. The following instructions and data sizes are supported: 1. DIVF – 16/16 signed fractional divide 2. DIV.sd – ...

Page 15

... EDAC MAC MAC MOVSAC MPY MPY.N MSC  2004 Microchip Technology Inc. dsPIC30F2010 The DSP engine has various options selected through various bits in the CPU Core Configuration Register (CORCON), as listed below: 1. Fractional or integer DSP multiply (IF). 2. Signed or unsigned DSP multiply (US). ...

Page 16

... FIGURE 2-2: DSP ENGINE BLOCK DIAGRAM 40 Carry/Borrow Out Carry/Borrow In DS70118E-page 14 40-bit Accumulator A 40-bit Accumulator B Saturate Adder Negate Barrel 16 Shifter 40 Sign-Extend 17-bit Multiplier/Scaler 16 16 To/From W Array Preliminary Round u Logic Zero Backfill  2004 Microchip Technology Inc. ...

Page 17

... The OA and OB bits can also optionally generate an arithmetic warning trap when set and the correspond- ing overflow trap flag enable bit (OVATEN, OVBTEN) in the INTCON1 register (refer to Section 5.0) is set. This allows the user to take immediate action, for example, to correct system gain. Preliminary dsPIC30F2010 DS70118E-page 15 ...

Page 18

... The SA and SB bits are modified each time data passes through the adder/subtractor, but can only be cleared by the user. When set, they indicate that the accumulator has overflowed its maximum range (bit 31 for 32-bit sat- uration, or bit 39 for 40-bit saturation) and will be satu- rated (if saturation is enabled) ...

Page 19

... If the SATDW bit in the CORCON register is not set, the input data is always passed through unmodified under all conditions.  2004 Microchip Technology Inc. dsPIC30F2010 2.4.3 BARREL SHIFTER The barrel shifter is capable of performing up to 15-bit arithmetic or logic right shifts 16-bit left shifts in a single cycle ...

Page 20

... NOTES: DS70118E-page 18 Preliminary  2004 Microchip Technology Inc. ...

Page 21

... Microchip Technology Inc. dsPIC30F2010 FIGURE 3-1: PROGRAM SPACE MEMORY MAP FOR dsPIC30F2010 GOTO Reset - Reset - Target Address Reserved Ext. Osc. Fail Trap Address Error Trap Stack Error Trap Arithmetic Warn ...

Page 22

... TABLE 3-1: PROGRAM SPACE ADDRESS CONSTRUCTION Access Access Type Space Instruction Access User User TBLRD/TBLWT (TBLPAG<7> Configuration TBLRD/TBLWT (TBLPAG<7> Program Space Visibility User FIGURE 3-2: DATA ACCESS FROM PROGRAM SPACE ADDRESS GENERATION Using Program 0 Counter Using 0 PSVPAG Reg Program Space ...

Page 23

... Program Memory ‘Phantom’ Byte (Read as ‘0’).  2004 Microchip Technology Inc. dsPIC30F2010 A set of Table Instructions are provided to move byte or word sized data to and from program space. 1. TBLRDL: Table Read Low Word: Read the LS Word of the program address; ...

Page 24

... FIGURE 3-4: PROGRAM DATA TABLE ACCESS (MS BYTE) PC Address 0x000000 00000000 0x000002 00000000 00000000 0x000004 00000000 0x000006 Program Memory ‘Phantom’ Byte (Read as ‘0’) 3.1.2 DATA ACCESS FROM PROGRAM MEMORY USING PROGRAM SPACE VISIBILITY The upper 32 Kbytes of data space may optionally be mapped into any 16K word program space page ...

Page 25

... The data space memory is split into two blocks, X and Y data space. A key element of this architecture is that Y space is a subset of X space, and is fully contained within X space. In order to provide an apparent linear addressing space, X and Y spaces have contiguous addresses.  2004 Microchip Technology Inc. dsPIC30F2010 Program Space 0x0000 (1) PSVPAG 0x00 8 ...

Page 26

... FIGURE 3-6: DATA SPACE MEMORY MAP MS Byte Address 0x0001 SFR Space (Note) 0x07FF 0x0801 512 bytes 0x08FF 0x0901 SRAM Space 0x09FF 0x8001 Optionally Mapped into Program Memory 0xFFFF Note: Unimplemented SFR or SRAM locations read as ‘0’. DS70118E-page 24 16 bits MSB ...

Page 27

... DATA SPACE FOR MCU AND DSP (MAC CLASS) INSTRUCTIONS SFR SPACE (Y SPACE) Non-MAC Class Ops (Read/Write) MAC Class Ops (Write) Indirect EA using any W  2004 Microchip Technology Inc. dsPIC30F2010 SFR SPACE UNUSED Y SPACE UNUSED MAC Class Ops Read Only Indirect EA using W8, W9 ...

Page 28

... DATA SPACES The X data space is used by all instructions and sup- ports all addressing modes. There are separate read and write data buses. The X read data bus is the return data path for all instructions that view data space as combined X and Y address space also the X address space data path for the dual operand read instructions (MAC class) ...

Page 29

... A PC push during exception processing will concatenate the SRL register to the MSB of the PC prior to the push.  2004 Microchip Technology Inc. dsPIC30F2010 There is a Stack Pointer Limit register (SPLIM) associ- ated with the stack pointer. SPLIM is uninitialized at Reset the case for the stack pointer, SPLIM<0> ...

Page 30

... DS70118E-page 28 Preliminary  2004 Microchip Technology Inc. ...

Page 31

... Microchip Technology Inc. dsPIC30F2010 Preliminary DS70118E-page 29 ...

Page 32

... NOTES: DS70118E-page 30 Preliminary  2004 Microchip Technology Inc. ...

Page 33

... The address of the file register is specified explicitly. The contents of a register are accessed directly. The contents of Wn forms the EA. The contents of Wn forms the EA post-modified (incremented or decremented constant value pre-modified (incremented or decremented signed constant value to form the EA. The sum of Wn and a literal forms the EA. Preliminary dsPIC30F2010 DS70118E-page 31 ...

Page 34

... MCU INSTRUCTIONS The three-operand MCU instructions are of the form: Operand 3 = Operand 1 <function> Operand 2 where Operand 1 is always a working register (i.e., the Addressing mode can only be register direct), which is referred to as Wb. Operand 2 can register, fetched from data memory, or 5-bit literal. The result location can be either a W register or an address location ...

Page 35

... Bidirectional mode, (i.e., address bound- ary checks will be performed on both the lower and upper address boundaries).  2004 Microchip Technology Inc. dsPIC30F2010 4.2.1 START AND END ADDRESS The Modulo addressing scheme requires that a starting and an end address be specified and loaded ...

Page 36

... FIGURE 4-1: MODULO ADDRESSING OPERATION EXAMPLE Byte Address 0x1100 0x1163 Start Addr = 0x1100 End Addr = 0x1163 Length = 0x0032 words DS70118E-page 34 MOV #0x1100,W0 MOV W0, XMODSRT ;set modulo start address MOV #0x1163,W0 MOV W0,MODEND ;set modulo end address MOV #0x8001,W0 MOV W0,MODCON ...

Page 37

... W register that has been designated as the bit-reversed pointer. Sequential Address Bit Locations Swapped Left-to-Right Around Center of Binary Value Bit-Reversed Address Pivot Point XB = 0x0008 for a 16-word Bit-Reversed Buffer Preliminary dsPIC30F2010 N bytes, addressing and bit-reversed should not be enabled DS70118E-page 35 ...

Page 38

... TABLE 4-3: BIT-REVERSED ADDRESS MODIFIER VALUES FOR XBREV REGISTER Buffer Size (Words) 32768 16384 8192 4096 2048 1024 512 256 128 Note 1: Modifier values greater than 256 words exceed the data memory available on the dsPIC30F2010 device DS70118E-page 36 Decimal XB<14:0> Bit-Reversed Address Modifier Value ...

Page 39

... Manual (DS70046). For more information on the device instruction set and programming, refer to the dsPIC30F Programmer’s Reference Manual (DS70030). The dsPIC30F2010 has 24 interrupt sources and 4 processor exceptions (traps), which must be arbitrated based on a priority scheme. The CPU is responsible for reading the Interrupt Vec- tor Table (IVT) and transferring the address contained in the interrupt vector to the program counter ...

Page 40

... For example, the PLVD (Low Voltage Detect) can be given a priority of 7. The INT0 (external interrupt 0) may be assigned to priority level 1, thus giving it a very low effective priority. DS70118E-page 38 TABLE 5-1: dsPIC30F2010 INTERRUPT VECTOR TABLE INT Vector Number Number ...

Page 41

... Trap Lockout: Occurrence of multiple Trap conditions simulta- neously will cause a Reset.  2004 Microchip Technology Inc. dsPIC30F2010 5.3 Traps Traps can be considered as non-maskable interrupts indicating a software or hardware error, which adhere to a predefined priority as shown in Figure 5-1. They ...

Page 42

... Address Error Trap: This trap is initiated when any of the following circumstances occurs misaligned data word access is attempted data fetch from our unimplemented data memory location is attempted data access of an unimplemented program memory location is attempted instruction fetch from vector space is attempted. ...

Page 43

... If an enabled interrupt request of sufficient priority is received by the interrupt controller, then the standard interrupt request is presented to the processor. At the same time, the processor will wake-up from Sleep or Idle and begin execution of the Interrupt Service Routine (ISR) needed to process the interrupt request. Preliminary dsPIC30F2010 DS70118E-page 41 ...

Page 44

... DS70118E-page 42 Preliminary  2004 Microchip Technology Inc. ...

Page 45

... Addressing Using Table Instruction User/Configuration Space Select  2004 Microchip Technology Inc. dsPIC30F2010 6.2 Run Time Self-Programming (RTSP) RTSP is accomplished using TBLRD (table read) and TBLWT (table write) instructions. With RTSP, the user may erase program memory, 32 instructions (96 bytes time and can write program memory data, 32 instructions (96 bytes time ...

Page 46

... RTSP Operation The dsPIC30F Flash program memory is organized into rows and panels. Each row consists of 32 instruc- tions bytes. Each panel consists of 128 rows instructions. RTSP allows the user to erase one row (32 instructions time and to program 32 instructions at one time. RTSP may be used to program multiple program memory panels, but the table pointer must be changed at each panel boundary ...

Page 47

... MOV W1 NVMKEY , BSET NVMCON,#WR NOP NOP  2004 Microchip Technology Inc. dsPIC30F2010 4. Write 32 instruction words of data from data RAM “image” into the program Flash write latches. 5. Program 32 instruction words into program Flash. a) Setup NVMCON register for multi-word, program Flash, program, and set WREN bit ...

Page 48

... LOADING WRITE LATCHES Example 6-2 shows a sequence of instructions that can be used to load the 96 bytes of write latches. 32 TBLWTL and 32 TBLWTH instructions are needed to load the write latches selected by the table pointer. EXAMPLE 6-2: LOADING WRITE LATCHES ; Set up a pointer to the first program memory location to be written ...

Page 49

... Microchip Technology Inc. dsPIC30F2010 Preliminary DS70118E-page 47 ...

Page 50

... NOTES: DS70118E-page 48 Preliminary  2004 Microchip Technology Inc. ...

Page 51

... A TBLRD instruction reads a word at the current pro- gram word address. This example uses pointer to data EEPROM. The result is placed in register W4, as shown in Example 7-1. EXAMPLE 7-1: MOV #LOW_ADDR_WORD,W0 MOV #HIGH_ADDR_WORD,W1 MOV W1 TBLPAG , TBLRDL [ Preliminary dsPIC30F2010 DATA EEPROM READ ; Init Pointer ; read data EEPROM DS70118E-page 49 ...

Page 52

... Erasing Data EEPROM 7.2.1 ERASING A BLOCK OF DATA EEPROM In order to erase a block of data EEPROM, the NVMADRU and NVMADR registers must initially point to the block of memory to be erased. Configure NVMCON for erasing a block of data EEPROM, and set the ERASE and WREN bits in NVMCON register. ...

Page 53

... Write cycle will complete in 2mS. CPU is not stalled for the Data Write Cycle ; User can poll WR bit, use NVMIF or Timer IRQ to determine write complete  2004 Microchip Technology Inc. dsPIC30F2010 The write will not initiate if the above sequence is not exactly followed (write 0x55 to NVMKEY, write 0xAA to NVMCON, then set WR bit) for each word ...

Page 54

... WRITING A BLOCK OF DATA EEPROM To write a block of data EEPROM, write to all sixteen latches first, then set the NVMCON register and program the block. EXAMPLE 7-5: DATA EEPROM BLOCK WRITE MOV #LOW_ADDR_WORD,W0 MOV #HIGH_ADDR_WORD,W1 MOV W1 TBLPAG , MOV #data1,W2 [ W0]++ TBLWTL W2 , MOV #data2,W2 ...

Page 55

... I/O cell (pad) to which they are connected. Table 8-1 shows the formats of the registers for the shared ports, PORTB through PORTG. Output Multiplexers 1 Output Enable 0 1 Output Data Preliminary dsPIC30F2010 I/O Cell I/O Pad Input Data DS70118E-page 53 ...

Page 56

... Configuring Analog Port Pins The use of the ADPCFG and TRIS registers control the operation of the A/D port pins. The port pins that are desired as analog inputs must have their correspond- ing TRIS bit set (input). If the TRIS bit is cleared (out- ...

Page 57

... Microchip Technology Inc. dsPIC30F2010 Preliminary DS70118E-page 55 ...

Page 58

... NOTES: DS70118E-page 56 Preliminary  2004 Microchip Technology Inc. ...

Page 59

... Interrupt on 16-bit period register match or falling edge of external gate signal  2004 Microchip Technology Inc. dsPIC30F2010 These operating modes are determined by setting the appropriate bit(s) in the 16-bit SFR, T1CON. Figure 9-1 presents a block diagram of the 16-bit timer module. 16-bit Timer Mode: In the 16-bit Timer mode, the timer ...

Page 60

... FIGURE 9-1: 16-BIT TIMER1 MODULE BLOCK DIAGRAM (TYPE A TIMER) Equal Reset 0 T1IF Event Flag 1 TGATE SOSCO/ T1CK LPOSCEN SOSCI 9.1 Timer Gate Operation The 16-bit timer can be placed in the Gated Time Accu- mulation mode. This mode allows the internal T increment the respective timer when the gate input sig- nal (T1CK pin) is asserted high. Control bit TGATE (T1CON< ...

Page 61

... XTAL SOSCO pF 100K  2004 Microchip Technology Inc. dsPIC30F2010 9.5.1 RTC OSCILLATOR OPERATION When the TON = 1, TCS = 1 and TGATE = 0, the timer increments on the rising edge of the 32 kHz LP oscilla- tor output signal the value specified in the period register, and is then reset to ‘0’. ...

Page 62

... DS70118E-page 60 Preliminary  2004 Microchip Technology Inc. ...

Page 63

... These operating modes are determined by setting the appropriate bit(s) in the 16-bit T2CON and T3CON SFRs.  2004 Microchip Technology Inc. dsPIC30F2010 For 32-bit timer/counter operation, Timer2 is the LS Word and Timer3 is the MS Word of the 32-bit timer. Note: For 32-bit timer operation, T3CON control bits are ignored ...

Page 64

... FIGURE 10-1: 32-BIT TIMER2/3 BLOCK DIAGRAM Data Bus<15:0> TMR3HLD 16 Write TMR2 Read TMR2 16 Reset TMR3 MSB ADC Event Trigger Comparator x 32 Equal PR3 0 T3IF Event Flag 1 TGATE (T2CON<6>) T2CK Note: Timer configuration bit T32, T2CON(<3>) must be set to 1 for a 32-bit timer/counter operation. All control bits are respective to the T2CON register ...

Page 65

... Reset 0 T3IF Event Flag 1 TGATE See NOTE Note: The dsPIC30F2010 does not have an external pin input to TIMER3. The following modes should not be used: 1. TCS = 1 2. TCS = 0 and TGATE = 1 (gated time accumulation)  2004 Microchip Technology Inc. dsPIC30F2010 PR2 TMR2 Q D TGATE ...

Page 66

... Timer Gate Operation The 32-bit timer can be placed in the Gated Time Accu- mulation mode. This mode allows the internal T increment the respective timer when the gate input sig- nal (T2CK pin) is asserted high. Control bit TGATE (T2CON<6>) must be set to enable this mode. When in this mode, Timer2 is the originating clock source ...

Page 67

... Microchip Technology Inc. dsPIC30F2010 Preliminary DS70118E-page 65 ...

Page 68

... NOTES: DS70118E-page 66 Preliminary  2004 Microchip Technology Inc. ...

Page 69

... ICxCON register (where x = 1,2,...,N). The dsPIC devices contain capture channels, (i.e., the maximum value 8). Note: The dsPIC30F2010 device has four capture inputs – IC1, IC2, IC7 and IC8. The naming of these four capture chan- nels is intentional and preserves software compatibility with other dsPIC devices ...

Page 70

... Simple Capture Event Mode The simple capture events in the dsPIC30F product family are: • Capture every falling edge • Capture every rising edge • Capture every 4th rising edge • Capture every 16th rising edge • Capture every rising and falling edge These simple Input Capture modes are configured by setting the appropriate bits ICM< ...

Page 71

... Sleep mode. The prescale settings of 4:1 or 16:1 are not applicable in this mode.  2004 Microchip Technology Inc. dsPIC30F2010 11.2.2 INPUT CAPTURE IN CPU IDLE MODE CPU Idle mode allows input capture module operation with full functionality. In the CPU Idle mode, the interrupt mode selected by the ICI< ...

Page 72

... DS70118E-page 70 Preliminary  2004 Microchip Technology Inc. ...

Page 73

... Compare registers. In the Dual Compare mode, the OCxR register is used for the first compare and OCxRS is used for the second compare. Set Flag bit OCxIF Output Logic 3 OCM<2:0> Mode Select OCTSEL T3P3_MATCH T2P2_MATCH Preliminary dsPIC30F2010 S Q OCx R Output Enable OCFA (for and 2) DS70118E-page 71 ...

Page 74

... Timer2 and Timer3 Selection Mode Each output compare channel can select between one of two 16-bit timers; Timer2 or Timer3. The selection of the timers is controlled by the OCTSEL bit (OCxCON<3>). Timer2 is the default timer resource for the Output Compare module. 12.2 Simple Output Compare Match Mode When control bits OCM< ...

Page 75

... IFS0 Status register, and must be cleared in software. The interrupt is enabled via the respective timer interrupt enable bit (T2IE or T3IE), located in the IEC0 Control register. The output compare interrupt flag is never set during the PWM mode of operation. Preliminary dsPIC30F2010 DS70118E-page 73 ...

Page 76

... DS70118E-page 74 Preliminary  2004 Microchip Technology Inc. ...

Page 77

... Figure 13-1 depicts the Quadrature Encoder Interface block diagram. TQCKPS<1:0> TQCS QEIM<2:0> TQGATE CK Q 16-bit Up/Down Counter (POSCNT) 2 Quadrature Encoder Interface Logic Comparator/ Zero Detect 3 QEIM<2:0> Mode Select Max Count Register (MAXCNT) Preliminary dsPIC30F2010 bits QEIM<2:0> (QEICON<10:8>). 2 Prescaler 1, 8, 64, 256 QEIIF Event Flag Reset Equal DS70118E-page 75 ...

Page 78

... Quadrature Encoder Interface Logic A typical incremental (a.k.a. optical) encoder has three outputs: Phase A, Phase B, and an index pulse. These signals are useful and often required in position and speed control of ACIM and SR motors. The two channels, Phase A (QEA) and Phase B (QEB), have a unique relationship ...

Page 79

... To enable the filter output for channels QEA, QEB and INDX, the QEOUT bit must be ‘1’. The filter network for all channels is disabled on POR and BOR.  2004 Microchip Technology Inc. dsPIC30F2010 13.5 Alternate 16-bit Timer/Counter When the QEI module is not configured for the QEI mode QEIM< ...

Page 80

... QEI Module Operation During CPU Idle Mode Since the QEI module can function as a quadrature encoder interface 16-bit timer, the following section describes operation of the module in both modes. 13.7.1 QEI OPERATION DURING CPU IDLE MODE When the CPU is placed in the Idle mode, the QEI module will operate if the QEISIDL bit (QEICON< ...

Page 81

... Microchip Technology Inc. dsPIC30F2010 Preliminary DS70118E-page 79 ...

Page 82

... NOTES: DS70118E-page 80 Preliminary  2004 Microchip Technology Inc. ...

Page 83

... Up to 16-bit resolution • ‘On-the-Fly’ PWM frequency changes • Edge and Center Aligned Output modes  2004 Microchip Technology Inc. dsPIC30F2010 • Single Pulse Generation mode • Interrupt support for asymmetrical updates in Center Aligned mode • Output override control for Electrically Commutative Motor (ECM) operation • ...

Page 84

... FIGURE 14-1: PWM BLOCK DIAGRAM PWMCON1 PWMCON2 DTCON1 FLTACON OVDCON PTMR Comparator PTPER PTPER Buffer PTCON Comparator SEVTDIR SEVTCMP PWM time base Note: Details of PWM Generator #1 and #2 not shown for clarity. DS70118E-page 82 PWM Enable and Mode SFRs Dead Time Control SFR ...

Page 85

... The interrupt signals generated by the PWM time base depend on the mode selection bits (PTMOD<1:0>) and the postscaler bits (PTOPS<3:0>) in the PTCON SFR.  2004 Microchip Technology Inc. dsPIC30F2010 14.1.1 FREE RUNNING MODE In the Free Running mode, the PWM time base counts upwards until the value in the Time Base Period regis- ter (PTPER) is matched ...

Page 86

... DOUBLE UPDATE MODE In the Double Update mode (PTMOD<1:0> = 11), an interrupt event is generated each time the PTMR regis- ter is equal to zero, as well as each time a period match occurs. The postscaler selection bits have no effect in this mode of the timer. The Double Update mode provides two additional func- tions to the user ...

Page 87

... PWM edge occurs in the beginning. Thus, the PWM resolution is effectively doubled.  2004 Microchip Technology Inc. dsPIC30F2010 14.5.1 DUTY CYCLE REGISTER BUFFERS The four PWM duty cycle registers are double buffered to allow glitchless updates of the PWM outputs. For ...

Page 88

... Dead Time Generators Dead time generation may be provided when any of the PWM I/O pin pairs are operating in the Complementary Output mode. The PWM outputs use Push-Pull drive circuits. Due to the inability of the power output devices to switch instantaneously, some amount of time must ...

Page 89

... The HPOL bit specifies the polarity for the PWMxH outputs, whereas the LPOL bit specifies the polarity for the PWMxL outputs.  2004 Microchip Technology Inc. dsPIC30F2010 14.11.1 OUTPUT PIN CONTROL The PEN<3:1>H and PEN<3:1>L control bits in the PWMCON1 SFR enable each high PWM output pin and each low PWM output pin, respectively ...

Page 90

... FAULT INPUT MODES The FLTA input pin has two modes of operation: • Latched Mode: When the FLTA pin is driven low, the PWM outputs will go to the states defined in the FLTACON register. The PWM outputs will remain in this state until the FLTA pin is driven high and the corresponding interrupt flag has been cleared in software ...

Page 91

... Microchip Technology Inc. dsPIC30F2010 Preliminary DS70118E-page 89 ...

Page 92

... NOTES: DS70118E-page 90 Preliminary  2004 Microchip Technology Inc. ...

Page 93

... Both the transmit buffer (SPIxTXB) and the receive buffer (SPIxRXB) are mapped to the same register address, SPIxBUF.  2004 Microchip Technology Inc. dsPIC30F2010 In Master mode, the clock is generated by prescaling the system clock. Data is transmitted as soon as a value is written to SPIxBUF. The interrupt is generated at the middle of the transfer of the last bit ...

Page 94

... FIGURE 15-1: SPI BLOCK DIAGRAM Read SPIxBUF Receive SDIx bit0 SDOx SS & FSYNC Control SSx SCKx Note FIGURE 15-2: SPI MASTER/SLAVE CONNECTION SPI™ Master Serial Input Buffer (SPIxBUF) Shift Register (SPIxSR) MSb PROCESSOR 1 Note DS70118E-page 92 Internal Data Bus Write ...

Page 95

... Therefore, when the SSx pin is asserted low again, transmission/reception will begin at the MS bit, even if SSx had been de-asserted in the middle of a transmit/receive.  2004 Microchip Technology Inc. dsPIC30F2010 15.4 SPI Operation During CPU Sleep Mode During Sleep mode, the SPI module is shut-down. If ...

Page 96

... DS70118E-page 94 Preliminary  2004 Microchip Technology Inc. ...

Page 97

... I2CRCV and an interrupt transmission, the I2CTRN is not double buffered. Note: Following a Restart condition in 10-bit mode, the user only needs to match the first 7-bit address. Preliminary dsPIC30F2010 2 C Standard and Fast mode specifica bus MODES 2 C operation are supported: 2 ...

Page 98

... FIGURE 16- BLOCK DIAGRAM Shift SCL Clock SDA Stop bit Detect Stop bit Generate Shift Clock DS70118E-page 96 I2CRCV I2CRSR LSB Addr_Match Match Detect I2CADD Start and Start, Restart, Collision Detect Acknowledge Generation Clock Stretching I2CTRN LSB Reload Control I2CBRG BRG Down ...

Page 99

... I2CRCV is not full or I2COV is not set, I2CRSR is transferred to I2CRCV. ACK is sent on the ninth clock.  2004 Microchip Technology Inc. dsPIC30F2010 If the RBF flag is set, indicating that I2CRCV is still holding data from a previous operation (RBF = 1), then ACK is not sent; however, the interrupt pulse is gener- ated ...

Page 100

... Automatic Clock Stretch In the Slave modes, the module can synchronize buffer reads and write to the master device by clock stretching. 16.5.1 TRANSMIT CLOCK STRETCHING Both 10-bit and 7-bit Transmit modes implement clock stretching by asserting the SCLREL bit after the falling edge of the ninth clock if the TBF bit is cleared, indicat- ing the buffer is empty ...

Page 101

... Idle before the RCEN bit is set, other- wise the RCEN bit will be disregarded. The baud rate generator begins counting, and on each rollover, the state of the SCL pin toggles, and data is shifted in to the I2CRSR on the rising edge of each clock. Preliminary dsPIC30F2010 2 C bus will 2 C DS70118E-page 99 ...

Page 102

... BAUD RATE GENERATOR (BRG Master mode, the reload value for the BRG is located in the I2CBRG register. When the BRG is loaded with this value, the BRG counts down to ‘0’ and stops until another reload has taken place. If clock arbitration is taking place, for instance, the BRG is reloaded when the SCL pin is sampled high ...

Page 103

... Microchip Technology Inc. dsPIC30F2010 Preliminary DS70118E-page 101 ...

Page 104

... NOTES: DS70118E-page 102 Preliminary  2004 Microchip Technology Inc. ...

Page 105

... Family Reference Manual (DS70046). This section describes the Universal Asynchronous Receiver/Transmitter Communications module. Note: Since dsPIC30F2010 devices have only one UART, all references to Ux... imply that only. FIGURE 17-1: UART TRANSMITTER BLOCK DIAGRAM Internal Data Bus ...

Page 106

... FIGURE 17-2: UART RECEIVER BLOCK DIAGRAM LPBACK From UxTX 1 UxRX 0 · START bit Detect · Parity Check · Stop bit Detect · Shift Clock Generation · Wake Logic Note only. DS70118E-page 104 Internal Data Bus 16 Read Write UxRXREG Low Byte ...

Page 107

... The STSEL bit determines whether one or two Stop bits will be used during data transmission. The default (Power-on) setting of the UART is 8 bits, no parity, 1 Stop bit (typically represented 1).  2004 Microchip Technology Inc. dsPIC30F2010 17.3 Transmitting Data 17.3.1 TRANSMITTING IN 8-BIT DATA MODE ...

Page 108

... TRANSMIT INTERRUPT The transmit interrupt flag (U1TXIF or U2TXIF) is located in the corresponding interrupt flag register. The transmitter generates an edge to set the UxTXIF bit. The condition for generating the interrupt depends on UTXISEL control bit UTXISEL = 0, an interrupt is generated when a word is transferred from the Transmit buffer to the Transmit Shift register (UxTSR) ...

Page 109

... Microchip Technology Inc. dsPIC30F2010 17.7 Loopback Mode Setting the LPBACK bit enables this special mode in which the UxTX pin is internally connected to the UxRX pin ...

Page 110

... UART Operation During CPU Sleep and Idle Modes 17.10.1 UART OPERATION DURING CPU SLEEP MODE When the device enters Sleep mode, all clock sources to the module are shutdown and stay at logic ‘0’. If entry into Sleep mode occurs while a transmission is in progress, then the transmission is aborted. The UxTX pin is driven to logic ‘ ...

Page 111

... Microchip Technology Inc. dsPIC30F2010 Preliminary DS70118E-page 109 ...

Page 112

... NOTES: DS70118E-page 110 Preliminary  2004 Microchip Technology Inc. ...

Page 113

... AN4 AN4 AN5 AN5 AN1  2004 Microchip Technology Inc. dsPIC30F2010 The A/D module has six 16-bit registers: • A/D Control Register1 (ADCON1) • A/D Control Register2 (ADCON2) • A/D Control Register3 (ADCON3) • A/D Input Select Register (ADCHS) • A/D Port Configuration Register (ADPCFG) • ...

Page 114

... A/D Result Buffer The module contains a 16-word dual port read-only buffer, called ADCBUF0...ADCBUFF, to buffer the A/D results. The RAM is 10-bits wide, but is read into different format 16-bit words. The contents of the sixteen A/D conversion result buffer registers, ADCBUF0 through ADCBUFF, cannot be written by user software ...

Page 115

... Example 18-1 shows a sample calculation for the ADCS<5:0> bits, assuming a device operating speed of 30 MIPS. EXAMPLE 18-1: AD (SAMC = Minimum T ADCS<5:0> cycles to Therefore, Set ADCS<5:0> Actual T AD wait is Preliminary dsPIC30F2010 AD . The source of the AD . A/D CONVERSION CLOCK = T * (0.5*(ADCS<5:0> +1 ADCS<5:0> – time ...

Page 116

... A/D Acquisition Requirements The analog input model of the 10-bit A/D converter is shown in Figure 18-2. The total sampling time for the A function of the internal amplifier settling time, device V DD and the holding capacitor charge time. For the A/D converter to meet its specified accuracy, ...

Page 117

... Each of the output formats translates to a 16-bit result on the data bus. Write data will always be in right justified (integer) format. d09 d08 d07 d06 d05 d04 d03 d02 d01 d00 d09 d08 d07 d06 d05 d04 d03 d02 d01 d00 Preliminary dsPIC30F2010 ...

Page 118

... Configuring Analog Port Pins The use of the ADPCFG and TRIS registers control the operation of the A/D port pins. The port pins that are desired as analog inputs must have their correspond- ing TRIS bit set (input). If the TRIS bit is cleared (out- ...

Page 119

... Microchip Technology Inc. dsPIC30F2010 Preliminary DS70118E-page 117 ...

Page 120

... NOTES: DS70118E-page 118 Preliminary  2004 Microchip Technology Inc. ...

Page 121

... In the Idle mode, the clock sources are still active, but the CPU is shut-off. The RC oscillator option saves system cost, while the LP crystal option saves power.  2004 Microchip Technology Inc. dsPIC30F2010 19.1 Oscillator System Overview The dsPIC30F oscillator system has the following modules and features: • ...

Page 122

... TABLE 19-1: OSCILLATOR OPERATING MODES Oscillator Mode XTL 200 kHz-4 MHz crystal on OSC1:OSC2 MHz-10 MHz crystal on OSC1:OSC2 PLL 4x 4 MHz-10 MHz crystal on OSC1:OSC2. 4x PLL enabled PLL 8x 4 MHz-10 MHz crystal on OSC1:OSC2. 8x PLL enabled PLL 16x 4 MHz-10 MHz crystal on OSC1:OSC2. 16x PLL enabled ...

Page 123

... FIGURE 19-1: OSCILLATOR SYSTEM BLOCK DIAGRAM OSC1 Primary Oscillator OSC2 POR Done SOSCO 32 kHz LP Oscillator SOSCI  2004 Microchip Technology Inc. dsPIC30F2010 PLL F PLL x4, x8, x16 PLL Lock Primary Osc Primary Oscillator Stability Detector Oscillator Start-up Clock Timer Switching and Control ...

Page 124

... Oscillator Configurations 19.2.1 INITIAL CLOCK SOURCE SELECTION While coming out of Power-on Reset or Brown-out Reset, the device selects its clock source based on: a) FOS<1:0> configuration bits that select one of four oscillator groups. b) AND FPR<3:0> configuration bits that select one of 13 oscillator choices within the primary group. ...

Page 125

... PWRT expires. Note 1: OSC2 pin function is determined by the Primary (FPR<3:0>). 2: OSC1 pin cannot be used as an I/O pin even if the secondary oscillator or an internal clock source is selected at all times. Preliminary dsPIC30F2010 FRC TUNING FRC Frequency + 5.25% + 4.5% + 3.75% + 3.0% + 2.25 ...

Page 126

... FAIL-SAFE CLOCK MONITOR The Fail-Safe Clock Monitor (FSCM) allows the device to continue to operate even in the event of an oscillator failure. The FSCM function is enabled by appropriately programming the FCKSM configuration bits (Clock Switch and Monitor Selection bits) in the F configuration register. If the FSCM function is enabled, ...

Page 127

... Reset The dsPIC30F2010 differentiates between various kinds of Reset: a) Power-on Reset (POR) b) MCLR Reset during normal operation c) MCLR Reset during Sleep d) Watchdog Timer (WDT) Reset (during normal operation) e) Programmable Brown-out Reset (BOR) f) RESET Instruction g) Reset cause by trap lockup (TRAPR) h) Reset caused by illegal opcode using an ...

Page 128

... FIGURE 19-3: TIME-OUT SEQUENCE ON POWER-UP (MCLR TIED MCLR INTERNAL POR OST TIME-OUT PWRT TIME-OUT INTERNAL Reset FIGURE 19-4: TIME-OUT SEQUENCE ON POWER-UP (MCLR NOT TIED MCLR INTERNAL POR OST TIME-OUT PWRT TIME-OUT INTERNAL Reset FIGURE 19-5: TIME-OUT SEQUENCE ON POWER-UP (MCLR NOT TIED TO V ...

Page 129

... The BOR voltage trip points indicated here are nominal values provided for design guidance only.  2004 Microchip Technology Inc. dsPIC30F2010 A BOR will generate a Reset pulse which will reset the device. The BOR will select the clock source, based on the device configuration bit values (FOS<1:0> and FPR< ...

Page 130

... Table 19-5 shows the Reset conditions for the RCON Register. Since the control bits within the RCON regis- ter are R/W, the information in the table implies that all the bits are negated prior to the action specified in the condition column. TABLE 19-5: ...

Page 131

... If FSCM is not enabled, then the device will simply suspend execution of code until the clock is stable, and will remain in Sleep until the oscillator clock has started. Preliminary dsPIC30F2010 POR LOCK PWRT , T and T delays (~ 10 µs) is applied. This is the smallest POR ...

Page 132

... All Resets will wake-up the processor from Sleep mode. Any Reset, other than POR, will set the Sleep status bit POR, the Sleep bit is cleared. If Watchdog Timer is enabled, then the processor will wake-up from Sleep mode upon WDT time-out. The Sleep and WDTO status bits are both set ...

Page 133

... Microchip Technology Inc. dsPIC30F2010 Preliminary DS70118E-page 131 ...

Page 134

... NOTES: DS70118E-page 132 Preliminary  2004 Microchip Technology Inc. ...

Page 135

... All instructions are a single word, except for certain double-word instructions, which were made double- word instructions so that all the required information is available in these 48-bits. In the second word, the 8 MSb’s are 0’s. If this second word is executed as an instruction (by itself), it will execute as a NOP. Preliminary dsPIC30F2010 DS70118E-page 133 ...

Page 136

... Most single word instructions are executed in a single instruction cycle, unless a conditional test is true or the program counter is changed as a result of the instruc- tion. In these cases, the execution takes two instruction cycles with the additional instruction cycle(s) executed as a NOP. Notable exceptions are the BRA (uncondi- ...

Page 137

... Y data space pre-fetch address register for DSP instructions Wy ∈ {[W10]+=6, [W10]+=4, [W10]+=2, [W10], [W10]-=6, [W10]-=4, [W10]-=2, [W11]+=6, [W11]+=4, [W11]+=2, [W11], [W11]-=6, [W11]-=4, [W11]-=2, [W11+W12], none} Y data space pre-fetch destination register for DSP instructions ∈ {W4..W7} Wyd  2004 Microchip Technology Inc. dsPIC30F2010 Description Preliminary DS70118E-page 135 ...

Page 138

... TABLE 20-2: INSTRUCTION SET OVERVIEW Base Assembly Instr Assembly Syntax Mnemonic # 1 ADD ADD Acc ADD f ADD f,WREG ADD #lit10,Wn ADD Wb,Ws,Wd ADD Wb,#lit5,Wd ADD Wso,#Slit4,Acc 2 ADDC ADDC f ADDC f,WREG ADDC #lit10,Wn ADDC Wb,Ws,Wd ADDC Wb,#lit5,Wd 3 AND AND f AND f,WREG ...

Page 139

... Ws,Wd 28 DEC2 DEC2 f DEC2 f,WREG DEC2 Ws,Wd  2004 Microchip Technology Inc. dsPIC30F2010 Description Bit Test f, Skip if Clear Bit Test Ws, Skip if Clear Bit Test f, Skip if Set Bit Test Ws, Skip if Set Bit Test f Bit Test Bit Test Bit Test Ws<Wb> Bit Test Ws<Wb> ...

Page 140

... TABLE 20-2: INSTRUCTION SET OVERVIEW (CONTINUED) Base Assembly Instr Assembly Syntax Mnemonic # 29 DISI DISI #lit14 30 DIV DIV.S Wm,Wn DIV.SD Wm,Wn DIV.U Wm,Wn DIV.UD Wm,Wn 31 DIVF DIVF Wm, #lit14,Expr DO Wn,Expr Wm*Wm,Acc,Wx,Wy,Wxd 34 EDAC EDAC Wm*Wm,Acc,Wx,Wy,Wxd 35 EXCH EXCH Wns,Wnd 36 FBCL FBCL Ws,Wnd 37 FF1L FF1L ...

Page 141

... Ws,Wnd 70 SETM SETM f SETM WREG SETM Ws  2004 Microchip Technology Inc. dsPIC30F2010 Description Multiply and Subtract from Accumulator {Wnd+1, Wnd} = signed(Wb) * signed(Ws) {Wnd+1, Wnd} = signed(Wb) * unsigned(Ws) {Wnd+1, Wnd} = unsigned(Wb) * signed(Ws) {Wnd+1, Wnd} = unsigned(Wb) * unsigned(Ws) {Wnd+1, Wnd} = signed(Wb) * unsigned(lit5) {Wnd+1, Wnd} = unsigned(Wb) * ...

Page 142

... TABLE 20-2: INSTRUCTION SET OVERVIEW (CONTINUED) Base Assembly Instr Assembly Syntax Mnemonic # 71 SFTAC SFTAC Acc,Wn SFTAC Acc,#Slit6 f,WREG SL Ws,Wd SL Wb,Wns,Wnd SL Wb,#lit5,Wnd 73 SUB SUB Acc SUB f SUB f,WREG SUB #lit10,Wn SUB Wb,Ws,Wd SUB Wb,#lit5,Wd 74 SUBB SUBB f SUBB f,WREG SUBB ...

Page 143

... CAN ® - PowerSmart - Analog  2004 Microchip Technology Inc. dsPIC30F2010 21.1 MPLAB Integrated Development Environment Software The MPLAB IDE software brings an ease of software development previously unseen in the 8/16-bit micro- controller market. The MPLAB IDE is a Windows based application that contains: • ...

Page 144

... MPLAB C17 and MPLAB C18 C Compilers The MPLAB C17 and MPLAB C18 Code Development Systems are complete ANSI C compilers for Microchip’s PIC17CXXX and PIC18CXXX family of microcontrollers. These compilers provide powerful integration capabilities, superior code optimization and ease of use not found with other compilers. ...

Page 145

... The PC platform and Microsoft Windows 32-bit operating system were chosen to best make these features available in a simple, unified application.  2004 Microchip Technology Inc. dsPIC30F2010 21.11 MPLAB ICD 2 In-Circuit Debugger Microchip’s In-Circuit Debugger, MPLAB ICD powerful, low-cost, ...

Page 146

... PICSTART Plus Development Programmer The PICSTART Plus development programmer is an easy-to-use, low-cost, prototype programmer. It con- nects to the PC via a COM (RS-232) port. MPLAB Integrated Development Environment software makes using the programmer simple and efficient. The PICSTART Plus development programmer supports most PICmicro devices pins ...

Page 147

... Microcontrollers” Handbook and a USB interface cable. Supports all current 8/14-pin Flash PIC microcontrollers, as well as many future planned devices.  2004 Microchip Technology Inc. dsPIC30F2010 21.24 PICDEM USB PIC16C7X5 Demonstration Board The PICDEM USB Demonstration Board shows off the capabilities of the PIC16C745 and PIC16C765 USB microcontrollers ...

Page 148

... NOTES: DS70118E-page 146 Preliminary  2004 Microchip Technology Inc. ...

Page 149

... Microchip Technology Inc. DD (except V and MCLR) ................................................... -0. (Note 1) ......................................................................................... 0V to +13.25V DD ) ..........................................................................................................± > ................................................................................................... ± pin, inducing currents greater than 80 mA, may cause latchup Max MIPS dsPIC30F2010-30I dsPIC30F2010-20I 30 — 20 — 10 Preliminary dsPIC30F2010 DD + 0.3V) PP pin, rather dsPIC30F2010-20E 20 — — — — 15 7.5 — DS70118E-page 147 ...

Page 150

... TABLE 22-2: THERMAL OPERATING CONDITIONS Rating dsPIC30F2010-30I Operating Junction Temperature Range Operating Ambient Temperature Range dsPIC30F2010-20I Operating Junction Temperature Range Operating Ambient Temperature Range dsPIC30F2010-20E Operating Junction Temperature Range Operating Ambient Temperature Range Power Dissipation: Internal chip power dissipation × – ...

Page 151

... All I/O pins are configured as Inputs and pulled to V MCLR = WDT, FSCM, LVD and BOR are disabled. CPU, SRAM, Program Memory and Data Memory are operational. No peripheral modules are operating.  2004 Microchip Technology Inc. dsPIC30F2010 ) DD Standard Operating Conditions: 2.5V to 5.5V (unless otherwise stated) -40°C ≤ T ≤ ...

Page 152

... TABLE 22-5: DC CHARACTERISTICS: OPERATING CURRENT (I DC CHARACTERISTICS Parameter (1) Typical Max No. (2) DD Operating Current (I ) DC27 — — DC27a 26 — DC27b — — DC27c — — DC27d 47 — DC27e — — DC27f — — DC28 — — DC28a 21 — DC28b — — ...

Page 153

... Data in “Typical” column is at 5V, 25°C unless otherwise stated. Parameters are for design guidance only and are not tested. 2: Base I IDLE current is measured with Core off, Clock on and all modules turned off.  2004 Microchip Technology Inc. dsPIC30F2010 ) IDLE Standard Operating Conditions: 2.5V to 5.5V (unless otherwise stated) -40°C ≤ T ≤ +85°C for Industrial ...

Page 154

... TABLE 22-6: DC CHARACTERISTICS: IDLE CURRENT (I DC CHARACTERISTICS Parameter (1) Typical Max No. IDLE Idle Current (I ): Core OFF Clock ON Base Current DC47 — — DC47a 16.8 — DC47b — — DC47c — — DC47d 30.5 — DC47e — — DC47f — — DC48 — ...

Page 155

... LVD, BOR, WDT, etc. are all switched off. The ∆ current is the additional current consumed when the module is enabled. This current should added to the base I current.  2004 Microchip Technology Inc. dsPIC30F2010 Standard Operating Conditions: 2.5V to 5.5V (unless otherwise stated) -40°C ≤ T ≤ +85°C for Industrial A Operating temperature -40° ...

Page 156

... TABLE 22-8: DC CHARACTERISTICS: I/O PIN INPUT SPECIFICATIONS DC CHARACTERISTICS Param Symbol Characteristic No Input Low Voltage DI10 I/O pins: with Schmitt Trigger buffer DI15 MCLR DI16 OSC1 (in XT, HS and LP modes) DI17 OSC1 (in RC mode) DI18 SDA, SCL DI19 SDA, SCL IH V Input High Voltage ...

Page 157

... DD V – 0.7 — — TBD — — – 0.7 — — TBD — — — — 15 — — 50 — — 400 BO15 Power Up Time-out Preliminary dsPIC30F2010 ≤ +85°C for Industrial A ≤ +125°C for Extended A Units Conditions 8.5 mA 2.0 mA 1.6 mA ...

Page 158

... TABLE 22-10: ELECTRICAL CHARACTERISTICS: BOR DC CHARACTERISTICS Param Symbol Characteristic No. (2) BOR BO10 V BOR Voltage V DD transition high to low BHYS BO15 V Note 1: Data in “Typ” column is at 5V, 25°C unless otherwise stated. Parameters are for design guidance only and are not tested. ...

Page 159

... DC Spec Section 22.0. Load Condition 2 - for OSC2 Pin 464 Ω for all pins except OSC2 for OSC2 output OS20 OS30 OS30 OS25 OS40 Preliminary dsPIC30F2010 ≤ +85°C for Industrial A ≤ +125°C for Extended OS31 OS31 OS41 DS70118E-page 157 ...

Page 160

... TABLE 22-13: EXTERNAL CLOCK TIMING REQUIREMENTS AC CHARACTERISTICS Param Symbol Characteristic No. OSC OS10 F External CLKIN Frequency (External clocks allowed only in EC mode) Oscillator Frequency OSC OSC OSC OS20 1/F CY OS25 T Instruction Cycle Time (2) OS30 TosL, External Clock in (OSC1) TosH High or Low Time ...

Page 161

... Units (1) TBD % TBD % TBD % -40°C TBD % -40°C TBD % -40°C Preliminary dsPIC30F2010 ≤ +85°C for Industrial ≤ +125°C for Extended Units Conditions MHz EC, XT modes with PLL MHz EC, XT modes with PLL µs % Measured over 100 ms period (3) (3) (3) MIPS MIPS w PLL x8 w PLL x16 — ...

Page 162

... TABLE 22-17: AC CHARACTERISTICS: INTERNAL RC JITTER Standard Operating Conditions: 2 5.5 V (unless otherwise stated) AC CHARACTERISTICS Operating temperature Param Characteristic No. Internal FRC Jitter @ FRC Freq = 7.5 MHz FRC Note 1: Frequency calibrated at 25°C and 5V. TUN bits can be used to compensate for temperature drift. TABLE 22-18: INTERNAL RC ACCURACY ...

Page 163

... Measurements are taken in RC mode and EC mode where CLKOUT output These parameters are characterized but not tested in manufacturing. 4: Data in “Typ” column is at 5V, 25°C unless otherwise stated.  2004 Microchip Technology Inc. dsPIC30F2010 DI35 DI40 New Value DO31 DO32 Standard Operating Conditions: 2.5V to 5.5V (unless otherwise stated) -40° ...

Page 164

... FIGURE 22-5: RESET, WATCHDOG TIMER, OSCILLATOR START-UP TIMER AND POWER-UP TIMER TIMING CHARACTERISTICS DD V SY12 MCLR Internal POR SY11 PWRT Time-out SY30 OSC Time-out Internal Reset Watchdog Timer Reset I/O Pins SY35 FSCM Delay Note: Refer to Figure 22-2 for load conditions. ...

Page 165

... These parameters are characterized but not tested in manufacturing. 2: Data in “Typ” column is at 5V, 25°C unless otherwise stated. 3: Refer to Figure 22-1 and Table 22-10 for BOR.  2004 Microchip Technology Inc. dsPIC30F2010 Standard Operating Conditions: 2.5V to 5.5V (unless otherwise stated) -40°C ≤ T Operating temperature -40°C ≤ T ...

Page 166

... FIGURE 22-6: BAND GAP START-UP TIME CHARACTERISTICS 0V Enable Band Gap (see Note) Note: Band Gap is enabled when FBORPOR<7> is set. TABLE 22-21: BAND GAP START-UP TIME REQUIREMENTS AC CHARACTERISTICS Param Symbol Characteristic No. BGAP SY40 T Band Gap Start-up Time Note 1: These parameters are characterized but not tested in manufacturing. ...

Page 167

... TCS (T1CON, bit 1)) CKEXTMRL TA20 T Delay from External TxCK Clock Edge to Timer Increment  2004 Microchip Technology Inc. dsPIC30F2010 Tx11 Tx10 Tx15 OS60 Standard Operating Conditions: 2.5V to 5.5V (unless otherwise stated) -40°C ≤ T Operating temperature -40° ...

Page 168

... TABLE 22-23: TIMER2 EXTERNAL CLOCK TIMING REQUIREMENTS AC CHARACTERISTICS Param Symbol Characteristic No. TtxH TB10 TxCK High Time TB11 TtxL TxCK Low Time TB15 TtxP TxCK Input Period Synchronous, CKEXTMRL TB20 T Delay from External TxCK Clock Edge to Timer Increment TABLE 22-24: TIMER3 EXTERNAL CLOCK TIMING REQUIREMENTS ...

Page 169

... CKEXTMRL TQ20 T Delay from External TxCK Clock Edge to Timer Increment Note 1: These parameters are characterized but not tested in manufacturing.  2004 Microchip Technology Inc. dsPIC30F2010 TQ10 TQ11 TQ15 Standard Operating Conditions: 2.5V to 5.5V (unless otherwise stated) -40°C ≤ T Operating temperature -40°C ≤ T ...

Page 170

... FIGURE 22-9: INPUT CAPTURE (CAPx) TIMING CHARACTERISTICS X IC Note: Refer to Figure 22-2 for load conditions. TABLE 22-26: INPUT CAPTURE TIMING REQUIREMENTS AC CHARACTERISTICS Param Symbol Characteristic No. IC10 TccL ICx Input Low Time IC11 TccH ICx Input High Time IC15 TccP ICx Input Period Note 1: These parameters are characterized but not tested in manufacturing ...

Page 171

... Standard Operating Conditions: 2.5V to 5.5V (unless otherwise stated) Operating temperature (1) (2) Min Typ Max Units — — TBD ns — — TBD ns Preliminary dsPIC30F2010 -40°C ≤ T ≤ +85°C for Industrial A -40°C ≤ T ≤ +125°C for Extended A Conditions -40°C to +85° -40°C to +85° ...

Page 172

... FIGURE 22-12: MOTOR CONTROL PWM MODULE FAULT TIMING CHARACTERISTICS FLTA/B MP20 PWMx FIGURE 22-13: MOTOR CONTROL PWM MODULE TIMING CHARACTERISTICS PWMx Note: Refer to Figure 22-2 for load conditions. TABLE 22-29: MOTOR CONTROL PWM MODULE TIMING REQUIREMENTS AC CHARACTERISTICS Param Symbol Characteristic No ...

Page 173

... T (1) (2) Typ Max — — — — — — Preliminary dsPIC30F2010 ≤ +85°C for Industrial A ≤ +125°C for Extended A Units Conditions ns — ns — ns — ns — 16, 32, 64, 128 and 256 (Note 16, 32, 64, 128 and 256 (Note 2) DS70118E-page 171 ...

Page 174

... FIGURE 22-15: QEI MODULE INDEX PULSE TIMING CHARACTERISTICS QEA (input) QEB (input) Ungated Index TQ51 Index Internal Position TABLE 22-31: QEI INDEX PULSE TIMING REQUIREMENTS AC CHARACTERISTICS Param Symbol Characteristic No. TQ50 TqIL Filter Time to Recognize Low, with Digital Filter TQ51 TqiH ...

Page 175

... X Data Input 20 — X Data Input 20 — Preliminary dsPIC30F2010 SP20 SP21 LSb LSb IN -40°C ≤ T ≤ +85°C for Industrial A -40°C ≤ T ≤ +125°C for Extended A Max Units Conditions — ns — — ns — ...

Page 176

... FIGURE 22-17: SPI MODULE MASTER MODE (CKE =1) TIMING CHARACTERISTICS SP36 X SCK (CKP = 0) SP11 X SCK (CKP = 1) X MSb SDO SP40 SP30,SP31 X SDI MSb IN SP41 Note: Refer to Figure 22-2 for load conditions. TABLE 22-33: SPI MODULE MASTER MODE (CKE = 1) TIMING REQUIREMENTS AC CHARACTERISTICS ...

Page 177

... X Data Input 20 — ↓ Input X 120 — Output 10 — CY 1.5 T +40 — Preliminary dsPIC30F2010 SP52 SP72 SP73 LSb SP51 LSb IN -40°C ≤ T ≤ +85°C for Industrial A -40°C ≤ T ≤ +125°C for Extended A Max Units Conditions — ns — ...

Page 178

... FIGURE 22-19: SPI MODULE SLAVE MODE (CKE = 1) TIMING CHARACTERISTICS SP60 X SS SP50 SCK X (CKP = 0) SP71 X SCK (CKP = 1) MSb X SDO X SDI SDI MSb IN SP41 SP40 Note: Refer to Figure 22-2 for load conditions. DS70118E-page 176 SP70 SP73 SP35 SP72 SP52 BIT14 - - - - - -1 LSb ...

Page 179

... X Data Input 20 — X Data Input 20 — ↑ input X 120 — 10 — Edge 1 — — — Preliminary dsPIC30F2010 -40°C ≤ T ≤ +85°C for Industrial A -40°C ≤ T ≤ +125°C for Extended A Max Units Conditions — ns — — ns — — — — ...

Page 180

... FIGURE 22-20 BUS START/STOP BITS TIMING CHARACTERISTICS (MASTER MODE) SCL IM31 IM30 SDA Start Condition Note: Refer to Figure 22-2 for load conditions. 2 FIGURE 22-21 BUS DATA TIMING CHARACTERISTICS (MASTER MODE) IM20 SCL IM11 IM10 SDA In IM40 SDA Out Note: Refer to Figure 22-2 for load conditions. ...

Page 181

... BRG is the value of the I C Baud Rate Generator. Refer to Section 21 “Inter-Integrated Circuit™ the dsPIC30F Family Reference Manual. 2: Maximum pin capacitance = 10 pF for all I  2004 Microchip Technology Inc. dsPIC30F2010 Standard Operating Conditions: 2.5V to 5.5V (unless otherwise stated) -40°C ≤ T Operating temperature -40°C ≤ T ...

Page 182

... FIGURE 22-22 BUS START/STOP BITS TIMING CHARACTERISTICS (SLAVE MODE) SCL IS31 IS30 SDA Start Condition 2 FIGURE 22-23 BUS DATA TIMING CHARACTERISTICS (SLAVE MODE) IS20 SCL IS30 IS31 SDA In IS40 SDA Out DS70118E-page 180 IS33 IS11 IS10 IS26 IS25 IS40 Preliminary ...

Page 183

... MHz mode 0.5 — — 400 2 C pins (for 1 MHz mode only). Preliminary dsPIC30F2010 Units Conditions µs Device must operate at a minimum of 1.5 MHz µs Device must operate at a minimum of 10 MHz. µs — µs Device must operate at a minimum of 1 ...

Page 184

... TABLE 22-38: 10-BIT HIGH-SPEED A/D MODULE SPECIFICATIONS AC CHARACTERISTICS Param Symbol Characteristic No. AD01 AV DD Module V DD Supply SS SS AD02 AV Module V Supply REFH AD05 V Reference Voltage High REFL AD06 V Reference Voltage Low AD07 V REF Absolute Reference Voltage AD08 I REF Current Drain INH ...

Page 185

... Because the sample caps will eventually lose charge, clock rates below 10 kHz can affect linearity performance, especially at elevated temperatures. 2: The A/D conversion result never decreases with an increase in the input voltage, and has no missing codes.  2004 Microchip Technology Inc. dsPIC30F2010 Standard Operating Conditions: 2.7V to 5.5V (unless otherwise stated) -40°C ≤ T Operating temperature -40°C ≤ T Min ...

Page 186

... FIGURE 22-24: 10-BIT HIGH-SPEED A/D CONVERSION TIMING CHARACTERISTICS (CHPS = 01, SIMSAM = 0, ASAM = 0, SSRC = 000) AD50 ADCLK Instruction Execution SET SAMP CLEAR SAMP SAMP ch0_dischrg ch0_samp ch1_dischrg ch1_samp eoc AD61 AD60 T SAMP DONE ADIF ADRES(0) ADRES( Software sets ADCON. SAMP to start sampling. ...

Page 187

... ADRES(0) ADRES( Software sets ADCON. ADON to start AD operation Sampling starts after discharge period. SAMP T is described in the dsPIC30F Family Reference Manual, Section 17 Convert bit Convert bit 8.  2004 Microchip Technology Inc. dsPIC30F2010 AD55 AD55 Convert bit One T for end of conversion Begin conversion of next channel 8 - Sample for time specified by SAMC ...

Page 188

... TABLE 22-39: 10-BIT HIGH-SPEED A/D CONVERSION TIMING REQUIREMENTS AC CHARACTERISTICS Param Symbol Characteristic No. AD AD50 T A/D Clock Period AD51 t RC A/D Internal RC Oscillator Period CONV AD55 t Conversion Time CNV AD56 F Throughput Rate SAMP AD57 T Sample Time AD60 t PCS Conversion Start from Sample ...

Page 189

... For device marking beyond this, certain price adders apply. Please check with your Microchip Sales Office. For QTP devices, any special marking adders are included in QTP price.  2004 Microchip Technology Inc. dsPIC30F2010 Example dsPIC30F2010 -30I/MM 040700U Example dsPIC30F2010-30I/SP 0348017 Example dsPIC30F2010-30I/SO 0348017 Preliminary DS70118E-page 187 ...

Page 190

... Plastic Quad Flat No Lead Package 6x6x0.9 mm Body (QFN-S) – With 0.40 mm Contact Length (Saw Singulated) E TOP VIEW A1 Dimension Limits Number of Pins Pitch Overall Height Standoff Overall Width Exposed Pad Width Overall Length Exposed Pad Length Lead Width Lead Length ...

Page 191

... B1 .040 .053 .065 B .016 .019 .022 eB .320 .350 .430 α β Preliminary dsPIC30F2010 α MILLIMETERS MIN NOM MAX 28 2.54 3.56 3.81 4.06 3.18 3.30 3.43 0.38 7.62 7.87 8.26 6.99 7.24 7.49 34.16 34.67 35.18 3.18 3 ...

Page 192

... Plastic Small Outline – Wide, 300 mil (SOIC 45° c β Dimension Limits Number of Pins Pitch Overall Height Molded Package Thickness Standoff § Overall Width Molded Package Width Overall Length Chamfer Distance Foot Length Foot Angle Top Lead Thickness Lead Width ...

Page 193

... Implementation ........................................................... 35 Modifier Values (table) ................................................ 36 Sequence Table (16-Entry)......................................... 36 Block Diagram PWM ........................................................................... 82 Block Diagrams 10-bit High Speed A/D Functional............................. 111 16-bit Timer1 Module .................................................. 58 DSP Engine ................................................................ 14 dsPIC30F2010 .............................................................. 6 External Power-on Reset Circuit............................... 127  2004 Microchip Technology Inc. dsPIC30F2010 .............................................................................. 96 Input Capture Mode.................................................... 67 Oscillator System...................................................... 121 Output Compare Mode ...

Page 194

... Write Verify ................................................................. 52 Writing ......................................................................... 51 Writing, Block .............................................................. 52 Writing, Word .............................................................. 51 DC Characteristics ............................................................ 147 BOR .......................................................................... 156 Brown-out Reset ....................................................... 155 I/O Pin Input Specifications ....................................... 153 I/O Pin Output Specifications .................................... 155 Idle Current (I IDLE ) .................................................... 151 DD Operating Current (I )............................................. 149 Power-Down Current ( ........................................ 153 Program and EEPROM............................................. 156 Temperature and Voltage Specifications .................. 147 Dead-Time Generators ...

Page 195

... Initial Clock Source Selection ................................... 122 LP Oscillator Control ................................................. 123 Start-up Timer (OST) ................................................ 122 Oscillator Operating Modes Table .................................... 120 Oscillator Selection ........................................................... 119  2004 Microchip Technology Inc. dsPIC30F2010 Oscillator Start-up Timer Timing Characteristics .............................................. 162 Timing Requirements ............................................... 163 Output Compare Interrupts ................................................. 73 Output Compare Mode Register Map ...

Page 196

... PWM Duty Cycle Comparison Units ................................... 85 Duty Cycle Register Buffers ........................................ 85 PWM FLTA Pins.................................................................. 87 Enable Bits.................................................................. 87 Fault States ................................................................. 87 Modes ......................................................................... 88 Cycle-by-Cycle.................................................... 88 Latched ............................................................... 88 PWM Operation During CPU Idle Mode.............................. 88 PWM Operation During CPU Sleep Mode .......................... 88 PWM Output and Polarity Control ....................................... 87 Output Pin Control ...................................................... 87 PWM Output Override......................................................... 87 Complementary Output Mode ...

Page 197

... Input Capture ............................................................ 168 Motor Control PWM Module...................................... 170 Oscillator Start-up Timer ........................................... 163 Output Compare Module........................................... 168 Power-up Timer ........................................................ 163  2004 Microchip Technology Inc. dsPIC30F2010 QEI Module External Clock .................................................. 167 Index Pulse....................................................... 172 Quadrature Decoder................................................. 171 Reset ........................................................................ 163 Simple OC/PWM Mode ............................................ 169 SPI Module Master Mode (CKE = 0) ...

Page 198

... NOTES: DS70118E-page 196 Preliminary  2004 Microchip Technology Inc. ...

Page 199

... Microchip's development systems software products. Plus, this line provides information on how customers ® ® can receive the most current upgrade kits.The Hot Line or Microsoft Numbers are: 1-800-755-2345 for U.S. and most of Canada, and 1-480-792-7302 for the rest of the world. Preliminary dsPIC30F2010 042003 DS70118E-page 197 ...

Page 200

... Telephone: (_______) _________ - _________ Application (optional): Would you like a reply? Y Device: dsPIC30F2010 Questions: 1. What are the best features of this document? 2. How does this document meet your hardware and software development needs you find the organization of this document easy to follow? If not, why? 4 ...

Related keywords