70283k PDF
70283k PDF
70283k PDF
dsPIC33FJ16MC304
16-bit Digital Signal Controllers (up to 32 KB Flash and
2 KB SRAM) with Motor Control and Advanced Analog
Packages
Type SPDIP SOIC SSOP QFN-S QFN TQFP
Pin Count 28 28 28 28 44 44
Contact Lead/Pitch .100'' 1.27 0.65 0.65 0.65 0.80
I/O Pins 21 21 21 21 35 35
Dimensions 1.365x.285x.135'' 17.9xx7.50x2.05 10.2x5.3x1.75 6x6x0.9 8x8x0.9 10x10x1
Note: All dimensions are in millimeters (mm) unless specified.
10-Bit/12-Bit ADC
External Interrupts(3)
Quadrature Encoder
Motor Control PWM
Remappable Pins
RAM (Kbyte)
Output Compare
Standard PWM
Packages
Input Capture
I/O Pins
16-bit Timer
Interface
I2C™
Device Pins
UART
SPI
dsPIC33FJ32MC202 28 32 2 16 3(1) 4 2 6ch(2) 1 1 3 1 1ADC, 1 21 SPDIP
2ch(2) 6 ch SOIC
SSOP
QFN-S
dsPIC33FJ32MC204 44 32 2 26 3(1) 4 2 6ch(2) 1 1 3 1 1ADC, 1 35 QFN
2ch(2) 9 ch TQFP
dsPIC33FJ16MC304 44 16 2 26 3(1) 4 2 6ch(2) 1 1 3 1 1ADC, 1 35 QFN
2ch(2) 9 ch TQFP
Note 1: Only two out of three timers are remappable.
2: Only PWM fault inputs are remappable.
3: Only two out of three interrupts are remappable.
MCLR 1 28 AVDD
AN0/VREF+/CN2/RA0 2 27 AVSS
AN1/VREF-/CN3/RA1 3 26 PWM1L1/RP15(1)/CN11/RB15
dsPIC33FJ32MC202
PGED1/AN2/C2IN-/RP0(1)/CN4/RB0 4 25 PWM1H1/RP14(1)/CN12/RB14
PGEC1/AN3/C2IN+/RP1(1)/CN5/RB1 5 24 PWM1L2/RP13(1)/CN13/RB13
AN4/RP2(1)/CN6/RB2 6 23 PWM1H2/RP12(1)/CN14/RB12
AN5/RP3(1)/CN7/RB3 7 22 PGEC2/TMS/PWM1L3/RP11(1)/CN15/RB11
VSS 8 21 PGED2/TDI/PWM1H3/RP10(1)/CN16/RB10
OSC1/CLKI/CN30/RA2 9 20 VCAP
OSC2/CLKO/CN29/RA3 10 19 VSS
SOSCI/RP4(1)/CN1/RB4 11 18 TDO/PWM2L1/SDA1/RP9(1)/CN21/RB9
SOSCO/T1CK/CN0/RA4 12 17 TCK/PWM2H1/SCL1/RP8(1)/CN22/RB8
VDD 13 16 INT0/RP7/CN23/RB7
PGED3/ASDA1/RP5(1)/CN27/RB5 14 15 PGEC3/ASCL1/RP6(1)/CN24/RB6
PWM1H1/RP14(1)/CN12/RB14
PWM1L1/RP15(1)/CN11/RB15
AN0/VREF+/CN2/RA0
AN1/VREF-/CN3/RA1
MCLR
AVDD
AVSS
28 27 26 25 24 23 22
PGED1/EMUD1/AN2/C2IN-/RP0(1)/CN4/RB0 1 21 PWM1L2/RP13(1)/CN13/RB13
PGEC1/EMUC1/AN3/C2IN+/RP1(1)/CN5/RB1 2 20 PWM1H2/RP12(1)/CN14/RB12
AN4/RP2(1)/CN6/RB2 3 19 PGEC2/EMUC2/TMS/PWM1L3/RP11(1)/CN15/RB11
AN5/RP3(1)/CN7/RB3 4 dsPIC33FJ32MC202 18 PGED2/EMUD2/TDI/PWM1H3/RP10(1)/CN16/RB10
VSS5 17 VCAP
OSC1/CLKI/CN30/RA2 6 16 VSS
OSC2/CLKO/CN29/RA3 7 15 TDO/PWM2L1/SDA1/RP9(1)/CN21/RB9
8 9 10 11 12 13 14
VDD
SOSCI/RP4/CN1/RB4
SOSCO/T1CK/CN0/RA4
PGED3/EMUD3/ASDA1/RP5(1)/CN27/RB5
PGEC3/EMUC3/ASCL1/RP6(1)/CN24/RB6
INT0/RP7(1)/CN23/RB7
TCK/PWM2H1/SCL1/RP8(1)/CN22/RB8
Note 1: The RPn pins can be used by any remappable peripheral. See Table 1 for the list of available
peripherals.
2: The metal plane at the bottom of the device is not connected to any pins and is recommended to
be connected to VSS externally.
PGEC1/EMUC1/AN3/C2IN+/RP1(1)/CN5/RB1
PGED1/EMUD1/AN2/C2IN-/RP0(1)/CN4/RB0
PWM1H1/RP14(1)/CN12/RB14
PWM1L1/RP15(1)/CN11/RB15
AN0/VREF+/CN2/RA0
AN1/VREF-/CN3/RA1
TMS/RA10
TCK/RA7
MCLR
AVDD
AVSS
22 21 20 19 18 17 16 15 14 13 12
AN4/RP2(1)/CN6/RB2 23 11 PWM1L2/RP13(1)/CN13/RB13
AN5/RP3(1)/CN7/RB3 24 10 PWM1H2/RP12(1)/CN14/RB12
AN6/RP16(1)/CN8/RC0 25 9 PGEC2/EMUC2/PWM1L3/RP11(1)/CN15/RB11
AN7/RP17(1)/CN9/RC1 26 8 PGED2/EMUD2/PWM1H3/RP10(1)/CN16/RB10
AN8/RP18(1)/CN10/RC2 27 7 VCAP
VDD
dsPIC33FJ32MC204 VSS
28 6
dsPIC33FJ16MC304
VSS 29 5 RP25/CN19/RC9
OSC1/CLKI/CN30/RA2 30 4 RP24/CN20/RC8
OSC2/CLKO/CN29/RA3 31 3 PWM2L1/RP23(1)/CN17/RC7
TDO/RA8 32 2 PWM2H1/RP22(1)/CN18/RC6
SOSCI/RP4(1)/CN1/RB4 33 1 SDA1/RP9(1)/CN21/RB9
34 35 36 37 38 39 40 41 42 43 44
VSS
VDD
TDI/RA9
RP19(1)/CN28/RC3
RP20(1)/CN25/RC4
RP21(1)/CN26/RC5
PGED3/EMUD3/ASDA1/RP5(1)/CN27/RB5
PGEC3/EMUC3/ASCL1/RP6 /CN24/RB6
SCL1/RP8(1)/CN22/RB8
INT0/RP7/CN23/RB7
SOSCO/T1CK/CN0/RA4
(1)
Note 1: The RPn pins can be used by any remappable peripheral. See Table 1 for the list of available
peripherals.
2: The metal plane at the bottom of the device is not connected to any pins and is recommended to
be connected to VSS externally.
PGEC1/EMUC1/AN3/C2IN+/RP1(1)/CN5/RB1
PGED1/EMUD1/AN2/C2IN-/RP0(1)/CN4/RB0
PWM1H1/RP14(1)/CN12/RB14
PWM1L1/RP15(1)/CN11/RB15
AN0/VREF+/CN2/RA0
AN1/VREF-/CN3/RA1
TMS/RA10
TCK/RA7
MCLR
AVDD
AVSS
22
21
20
19
18
17
16
15
14
13
12
AN4/RP2(1)/CN6/RB2 23 11 PWM1L2/RP13(1)/CN13/RB13
AN5/RP3(1)/CN7/RB3 24 10 PWM1H2/RP12(1)/CN14/RB12
AN6/RP16(1)/CN8/RC0 25 9 PGEC2/EMUC2/PWM1L3/RP11(1)/CN15/RB11
AN7/RP17(1)/CN9/RC1 26 8 PGED2/EMUD2/PWM1H3/RP10(1)/CN16/RB10
AN8/RP18(1)/CN10/RC2 27 7 VCAP
VDD 28 dsPIC33FJ32MC204 6 VSS
dsPIC33FJ16MC304
VSS 29 5 RP25(1)/CN19/RC9
OSC1/CLKI/CN30/RA2 30 4 RP24(1)/CN20/RC8
OSC2/CLKO/CN29/RA3 31 3 PWM2L1/RP23(1)/CN17/RC7
TDO/RA8 32 2 PWM2H1/RP22(1)/CN18/RC6
SOSCI/RP4(1)/CN1/RB4 33 1 SDA1/RP9(1)/CN21/RB9
34
35
36
37
39
40
41
42
43
44
38
VSS
VDD
SOSCO/T1CK/CN0/RA4
TDI/RA9
RP19/(1)CN28/RC3
RP20(1)/CN25/RC4
RP21(1)/CN26/RC5
PGED3/EMUD3/ASDA1/RP5(1)/CN27/RB5
PGEC3/EMUC3/ASCL1/RP6(1)/CN24/RB6
INT0/RP7(1)/CN23/RB7
SCL1/RP8(1)/CN22/RB8
Note 1: The RPn pins can be used by any remappable peripheral. See Table 1 for the list of available
peripherals.
Errata
An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for current
devices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revision of
silicon and revision of document to which it applies.
To determine if an errata sheet exists for a particular device, please check with one of the following:
• Microchip’s Worldwide Web site; http://www.microchip.com
• Your local Microchip sales office (see last page)
When contacting a sales office, please specify which device, revision of silicon and data sheet (include literature number) you are
using.
16
8 16 16 16
23 16
16
PORTC
Control Signals
to Various Blocks DSP Engine
16 x 16
OSC2/CLKO Timing Power-up W Register Array
OSC1/CLKI Generation Timer Divide Support
16
Oscillator
FRC/LPRC Start-up Timer
Oscillators
Power-on
Reset
Precision
16-bit ALU
Band Gap Watchdog
Reference Timer
16
Brown-out
Voltage Reset
Regulator
Note: Not all pins or features are implemented on all device pinout configurations. See “Pin Diagrams” for the specific pins
and features present on each device.
VDD
VSS
VCAP
R
R1 The MCLR pin provides for two specific device
MCLR functions:
• Device Reset
C
• Device programming and debugging
dsPIC33F
During device programming and debugging, the
VSS VDD
resistance and capacitance that can be added to the
pin must be considered. Device programmers and
VDD VSS
0.1 µF 0.1 µF debuggers drive the MCLR pin. Consequently,
AVDD
AVSS
VDD
Ceramic
VSS
Ceramic specific voltage levels (VIH and VIL) and fast signal
transitions must not be adversely affected. Therefore,
0.1 µF 0.1 µF specific values of R and C will need to be adjusted
Ceramic Ceramic based on the application and PCB requirements.
L1(1)
For example, as shown in Figure 2-2, it is
Note 1: As an option, instead of a hard-wired connection, an recommended that capacitor C is isolated from the
inductor (L1) can be substituted between VDD and MCLR pin during programming and debugging
AVDD to improve ADC noise rejection. The inductor operations.
impedance should be less than 1Ω and the inductor
capacity greater than 10 mA. Place the components shown in Figure 2-2 within
Where: one-quarter inch (6 mm) from the MCLR pin.
f = F CNV
-------------
- (i.e., ADC conversion rate/2) FIGURE 2-2: EXAMPLE OF MCLR PIN
2
CONNECTIONS
1 -
f = ----------------------
( 2π LC ) VDD
1 2
L = ⎛ ---------------------⎞
⎝ ( 2πf C )⎠ R(1)
R1(2)
MCLR
2.2.1 TANK CAPACITORS
JP dsPIC33F
On boards with power traces running longer than six
inches in length, it is suggested to use a tank capacitor C
for integrated circuits including DSCs to supply a local
power source. The value of the tank capacitor should
be determined based on the trace resistance that con- Note 1: R ≤ 10 kΩ is recommended. A suggested
nects the power supply source to the device, and the starting value is 10 kΩ. Ensure that the MCLR
maximum current drawn by the device in the applica- pin VIH and VIL specifications are met.
tion. In other words, select the tank capacitor so that it 2: R1 ≤ 470W will limit any current flowing into
meets the acceptable voltage sag at the device. Typical MCLR from the external capacitor C, in the
values range from 4.7 µF to 47 µF. event of MCLR pin breakdown, due to Elec-
trostatic Discharge (ESD) or Electrical
2.3 CPU Logic Filter Capacitor Overstress (EOS). Ensure that the MCLR pin
VIH and VIL specifications are met.
Connection (VCAP)
A low-ESR (<5 Ohms) capacitor is required on the
VCAP pin, which is used to stabilize the voltage
regulator output voltage. The VCAP pin must not be
connected to VDD, and must have a capacitor between
4.7 µF and 10 µF, 16V connected to ground. The type
can be ceramic or tantalum. Refer to Section 24.0
“Electrical Characteristics” for additional
information.
16 16 16
8 16
Program Memory 16
EA MUX
Instruction
Decode and
Control Instruction Reg
Control Signals
to Various Blocks 16
DSP Engine
16 x 16 16
W Register Array
Divide Support 16
16
16-bit ALU
16
To Peripheral Modules
PC22 PC0
0 Program Counter
7 0
TBLPAG Data Table Page Address
7 0
PSVPAG Program Space Visibility Page Address
15 0
RCOUNT REPEAT Loop Counter
15 0
DCOUNT DO Loop Counter
22 0
DOSTART DO Loop Start Address
22
DOEND DO Loop End Address
15 0
CORCON Core Configuration Register
SRH SRL
Legend:
C = Clear only bit R = Readable bit U = Unimplemented bit, read as ‘0’
S = Set only bit W = Writable bit -n = Value at POR
‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
S
40 a
40-bit Accumulator A
40 Round t 16
40-bit Accumulator B u
Logic r
Carry/Borrow Out a
Saturate t
e
Carry/Borrow In Adder
Negate
40 40 40
Barrel
16
Shifter
X Data Bus
40
Sign-Extend
Y Data Bus
32 16
Zero Backfill
33 32
17-bit
Multiplier/Scaler
16 16
To/From W Array
Unimplemented Unimplemented
(Read ‘0’s) (Read ‘0’s)
0x7FFFFE 0x7FFFFE
0x800000 0x800000
Reserved Reserved
Configuration Memory Space
0xF7FFFE 0xF7FFFE
Device Configuration 0xF80000 Device Configuration 0xF80000
Registers 0xF80017 Registers 0xF80017
0xF80018 0xF80018
Reserved Reserved
0xFEFFFE 0xFEFFFE
0xFF0000 0xFF0000
DEVID (2) 0xFFFFFE
DEVID (2) 0xFFFFFE
MSB LSB
Address 16 bits Address
MSb LSb
0x0001 0x0000
2 Kbyte
SFR Space
SFR Space 0x07FE
0x07FF
0x0801 0x0800
X Data RAM (X)
8 Kbyte
0x0BFF 0x0BFE
0x0001 0x0C00 Near Data
2 Kbyte
Y Data RAM (Y) Space
SRAM Space 0x0FFF 0x0FFE
0x1001 0x1000
0x1FFF 0x1FFE
0x2001 0x2000
0x8001 0x8000
X Data
Optionally Unimplemented (X)
Mapped
into Program
Memory
0xFFFF 0xFFFE
SFR All
SFR Name Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Addr Resets
MODCON 0046 XMODEN YMODEN — — BWM<3:0> YWM<3:0> XWM<3:0> 0000
XMODSRT 0048 XS<15:1> 0 xxxx
CNEN1 0060 CN15IE CN14IE CN13IE CN12IE CN11IE — — — CN7IE CN6IE CN5IE CN4IE CN3IE CN2IE CN1IE CN0IE 0000
CNEN2 0062 — CN30IE CN29IE — CN27IE — — CN24IE CN23IE CN22IE CN21IE — — — — CN16IE 0000
CNPU1 0068 CN15PUE CN14PUE CN13PUE CN12PUE CN11PUE — — — CN7PUE CN6PUE CN5PUE CN4PUE CN3PUE CN2PUE CN1PUE CN0PUE 0000
CNPU2 006A — CN30PUE CN29PUE — CN27PUE — — CN24PUE CN23PUE CN22PUE CN21PUE — — — — CN16PUE 0000
Legend: x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
TABLE 4-3: CHANGE NOTIFICATION REGISTER MAP FOR dsPIC33FJ32MC204 and dsPIC33FJ16MC304
SFR SFR All
Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Name Addr Resets
CNEN1 0060 CN15IE CN14IE CN13IE CN12IE CN11IE CN10IE CN9IE CN8IE CN7IE CN6IE CN5IE CN4IE CN3IE CN2IE CN1IE CN0IE 0000
CNEN2 0062 — CN30IE CN29IE CN28IE CN27IE CN26IE CN25IE CN24IE CN23IE CN22IE CN21IE CN20IE CN19IE CN18IE CN17IE CN16IE 0000
CNPU1 0068 CN15PUE CN14PUE CN13PUE CN12PUE CN11PUE CN10PUE CN9PUE CN8PUE CN7PUE CN6PUE CN5PUE CN4PUE CN3PUE CN2PUE CN1PUE CN0PUE 0000
CNPU2 006A — CN30PUE CN29PUE CN28PUE CN27PUE CN26PUE CN25PUE CN24PUE CN23PUE CN22PUE CN21PUE CN20PUE CN19PUE CN18PUE CN17PUE CN16PUE 0000
Legend: x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
DS70283K-page 35
DS70283K-page 36
INTCON1 0080 NSTDIS OVAERR OVBERR COVAERR COVBERR OVATE OVBTE COVTE SFTACERR DIV0ERR — MATHERR ADDRERR STKERR OSCFAIL — 0000
INTCON2 0082 ALTIVT DISI — — — — — — — — — — — INT2EP INT1EP INT0EP 0000
IFS0 0084 — — AD1IF U1TXIF U1RXIF SPI1IF SPI1EIF T3IF T2IF OC2IF IC2IF — T1IF OC1IF IC1IF INT0IF 0000
IFS1 0086 — — INT2IF — — — — — IC8IF IC7IF — INT1IF CNIF — MI2C1IF SI2C1IF 0000
IFS3 008A FLTA1IF — — — — QEIIF PWM1IF — — — — — — — — — 0000
IFS4 008C — — — — — FLTA2IF PWM2IF — — — — — — — U1EIF — 0000
IEC0 0094 — — AD1IE U1TXIE U1RXIE SPI1IE SPI1EIE T3IE T2IE OC2IE IC2IE — T1IE OC1IE IC1IE INT0IE 0000
IEC1 0096 — — INT2IE — — — — — IC8IE IC7IE — INT1IE CNIE — MI2C1IE SI2C1IE 0000
IEC3 009A FLTA1IE — — — — QEIIE PWM1IE — — — — — — — — — 0000
IEC4 009C — — — — — FLTA2IE PWM2IE — — — — — — — U1EIE — 0000
IPC0 00A4 — T1IP<2:0> — OC1IP<2:0> — IC1IP<2:0> — INT0IP<2:0> 4444
IPC1 00A6 — T2IP<2:0> — OC2IP<2:0> — IC2IP<2:0> — — — — 4440
IPC2 00A8 — U1RXIP<2:0> — SPI1IP<2:0> — SPI1EIP<2:0> — T3IP<2:0> 4444
IPC3 00AA — — — — — — — — — AD1IP<2:0> — U1TXIP<2:0> 0044
IPC4 00AC — CNIP<2:0> — — — — — MI2C1IP<2:0> — SI2C1IP<2:0> 4044
IPC5 00AE — IC8IP<2:0> — IC7IP<2:0> — — — — — INT1IP<2:0> 4404
IPC7 00B2 — — — — — — — — — INT2IP<2:0> — — — — 0040
IPC14 00C0 — — — — — QEIIP<2:0> — PWM1IP<2:0> — — — — 0440
IPC15 00C2 — FLTA1IP<2:0> — — — — — — — — — — — — 4000
IPC16 00C4 — — — — — — — — — U1EIP<2:0> — — — — 0040
IPC18 00C8 — — — — — FLTA2IP<2:0> — PWM2IP<2:0> — — — — 0440
INTTREG 00E0 — — — — ILR<3:0> — VECNUM<6:0> 0000
Legend: x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
© 2007-2012 Microchip Technology Inc.
© 2007-2012 Microchip Technology Inc.
P1TCON 01C0 PTEN — PTSIDL — — — — — PTOPS<3:0> PTCKPS<1:0> PTMOD<1:0> 0000 0000 0000 0000
P1TMR 01C2 PTDIR PWM Timer Count Value Register 0000 0000 0000 0000
P1TPER 01C4 — PWM Time Base Period Register 0000 0000 0000 0000
P1SECMP 01C6 SEVTDIR PWM Special Event Compare Register 0000 0000 0000 0000
PWM1CON1 01C8 — — — — — PMOD3 PMOD2 PMOD1 — PEN3H PEN2H PEN1H — PEN3L PEN2L PEN1L 0000 0000 1111 1111
PWM1CON2 01CA — — — — SEVOPS<3:0> — — — — — IUE OSYNC UDIS 0000 0000 0000 0000
P1DTCON1 01CC DTBPS<1:0> DTB<5:0> DTAPS<1:0> DTA<5:0> 0000 0000 0000 0000
P1DTCON2 01CE — — — — — — — — — — DTS3A DTS3I DTS2A DTS2I DTS1A DTS1I 0000 0000 0000 0000
P1FLTACON 01D0 — — FAOV3H FAOV3L FAOV2H FAOV2L FAOV1H FAOV1L FLTAM — — — — FAEN3 FAEN2 FAEN1 0000 0000 0000 0000
P1OVDCON 01D4 — — POVD3H POVD3L POVD2H POVD2L POVD1H POVD1L — — POUT3H POUT3L POUT2H POUT2L POUT1H POUT1L 1111 1111 0000 0000
P1DC1 01D6 PWM Duty Cycle #1 Register 0000 0000 0000 0000
P1DC2 01D8 PWM Duty Cycle #2 Register 0000 0000 0000 0000
P1DC3 01DA PWM Duty Cycle #3 Register 0000 0000 0000 0000
Legend: u = uninitialized bit, — = unimplemented, read as ‘0’
P2TCON 05C0 PTEN — PTSIDL — — — — — PTOPS<3:0> PTCKPS<1:0> PTMOD<1:0> 0000 0000 0000 0000
P2TMR 05C2 PTDIR PWM Timer Count Value Register 0000 0000 0000 0000
P2TPER 05C4 — PWM Time Base Period Register 0000 0000 0000 0000
P2SECMP 05C6 SEVTDIR PWM Special Event Compare Register 0000 0000 0000 0000
PWM2CON1 05C8 — — — — — — — PMOD1 — — — PEN1H — — — PEN1L 0000 0000 1111 1111
PWM2CON2 05CA — — — — SEVOPS<3:0> — — — — — IUE OSYNC UDIS 0000 0000 0000 0000
P2DTCON1 05CC DTBPS<1:0> DTB<5:0> DTAPS<1:0> DTA<5:0> 0000 0000 0000 0000
© 2007-2012 Microchip Technology Inc.
QEI1CON 01E0 CNTERR — QEISIDL INDEX UPDN QEIM<2:0> SWPAB PCDOUT TQGATE TQCKPS<1:0> POSRES TQCS UPDN_SRC 0000 0000 0000 0000
U1MODE 0220 UARTEN — USIDL IREN RTSMD — UEN1 UEN0 WAKE LPBACK ABAUD URXINV BRGH PDSEL<1:0> STSEL 0000
U1STA 0222 UTXISEL1 UTXINV UTXISEL0 — UTXBRK UTXEN UTXBF TRMT URXISEL<1:0> ADDEN RIDLE PERR FERR OERR URXDA 0110
U1TXREG 0224 — — — — — — — UART Transmit Register xxxx
U1RXREG 0226 — — — — — — — UART Receive Register 0000
U1BRG 0228 Baud Rate Generator Prescaler 0000
Legend: x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
TABLE 4-17: PERIPHERAL PIN SELECT OUTPUT REGISTER MAP FOR dsPIC33FJ32MC202
File All
Addr Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Name Resets
RPOR0 06C0 — — — RP1R<4:0> — — — RP0R<4:0> 0000
RPOR1 06C2 — — — RP3R<4:0> — — — RP2R<4:0> 0000
RPOR2 06C4 — — — RP5R<4:0> — — — RP4R<4:0> 0000
RPOR3 06C6 — — — RP7R<4:0> — — — RP6R<4:0> 0000
RPOR4 06C8 — — — RP9R<4:0> — — — RP8R<4:0> 0000
© 2007-2012 Microchip Technology Inc.
File
Addr Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 All Resets
Name
RPOR0 06C0 — — — RP1R<4:0> — — — RP0R<4:0> 0000
RPOR1 06C2 — — — RP3R<4:0> — — — RP2R<4:0> 0000
TRISA 02C0 — — — — — TRISA10 TRISA9 TRISA8 TRISA7 — — TRISA4 TRISA3 TRISA2 TRISA1 TRISA0 079F
PORTA 02C2 — — — — — RA10 RA9 RA8 RA7 — — RA4 RA3 RA2 RA1 RA0 xxxx
LATA 02C4 — — — — — LAT10 LAT8 LAT8 LAT7 — — LATA4 LATA3 LATA2 LATA1 LATA0 xxxx
ODCA 02C6 — — — — — ODCA10 ODCA9 ODCA8 ODCA7 — — ODCA4 ODCA3 ODCA2 ODCA1 ODCA0 0000
DS70283K-page 43
Legend: x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
DS70283K-page 44
TRISB 02C8 TRISB15 TRISB14 TRISB13 TRISB12 TRISB11 TRISB10 TRISB9 TRISB8 TRISB7 TRISB6 TRISB5 TRISB4 TRISB6 TRISB5 TRISB1 TRISB0 FFFF
PORTB 02CA RB15 RB14 RB13 RB12 RB11 RB10 RB9 RB8 RB7 RB6 RB5 RB4 RB6 RB5 RB1 RB0 xxxx
LATB 02CC LATB15 LATB14 LATB13 LATB12 LATB11 LATB10 LATB9 LATB8 LATB7 LATB6 LATB5 LATB4 LATB6 LATB5 LATB1 LATB0 xxxx
ODCB 02CE ODCB15 ODCB14 ODCB13 ODCB12 ODCB11 ODCB10 ODCB9 ODCB8 ODCB7 ODCB6 ODCB5 ODCB4 ODCB6 ODCB5 ODCB1 ODCB0 0000
Legend: x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for 100-pin devices.
TRISC 02D0 — — — — — — TRISC9 TRISC8 TRISC7 TRISC6 TRISC5 TRISC4 TRISC6 TRISC5 TRISC1 TRISC0 03FF
PORTC 02D2 — — — — — — RC9 RC8 RC7 RC6 RC5 RC4 RC6 RC5 RC1 RC0 xxxx
LATC 02D4 — — — — — — LATC9 LATC8 LATC7 LATC6 LATC5 LATC4 LATC6 LATC5 LATC1 LATC0 xxxx
ODCC 02D6 — — — — — — ODCC9 ODCC8 ODCC7 ODCC6 ODCC5 ODCC4 ODCC6 ODCC5 ODCC1 ODCC0 0000
Legend: x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
RCON 0740 TRAPR IOPUWR — — — — CM VREGS EXTR SWR SWDTEN WDTO SLEEP IDLE BOR POR xxxx(1)
OSCCON 0742 — COSC<2:0> — NOSC<2:0> CLKLOCK IOLOCK LOCK — CF — LPOSCEN OSWEN 0300(2)
CLKDIV 0744 ROI DOZE<2:0> DOZEN FRCDIV<2:0> PLLPOST<1:0> — PLLPRE<4:0> 3040
PLLFBD 0746 — — — — — — — PLLDIV<8:0> 0030
OSCTUN 0748 — — — — — — — — — — TUN<5:0> 0000
Legend: x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
© 2007-2012 Microchip Technology Inc.
PMD1 0770 — — T3MD T2MD T1MD QEIMD PWM1MD — I2C1MD — U1MD — SPI1MD — — AD1MD 0000
PMD2 0772 IC8MD IC7MD — — — — IC2MD IC1MD — — — — — — OC2MD OC1MD 0000
PMD3 0774 — — — — — — — — — — — PWM2MD — — — — 0000
Legend: x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
DS70283K-page 45
dsPIC33FJ32MC202/204 and dsPIC33FJ16MC304
4.4.1 SOFTWARE STACK 4.4.2 DATA RAM PROTECTION FEATURE
In addition to its use as a working register, the W15 The dsPIC33F product family supports Data RAM
register in the dsPIC33FJ32MC202/204 and protection features that enable segments of RAM to be
dsPIC33FJ16MC304 devices is also used as a protected when used in conjunction with Boot and
software Stack Pointer. The Stack Pointer always Secure Code Segment Security. BSRAM (Secure RAM
points to the first available free word and grows from segment for BS) is accessible only from the Boot
lower to higher addresses. It predecrements for stack Segment Flash code when enabled. SSRAM (Secure
pops and post-increments for stack pushes, as shown RAM segment for RAM) is accessible only from the
in Figure 4-4. For a PC push during any CALL Secure Segment Flash code when enabled. See
instruction, the MSb of the PC is zero-extended before Table 4-1 for an overview of the BSRAM and SSRAM
the push, ensuring that the MSb is always clear. SFRs.
• Register Indirect
PC<15:0> W15 (before CALL)
• Register Indirect Post-Modified
000000000 PC<22:16> • Register Indirect Pre-Modified
<Free Word> W15 (after CALL) • 5-bit or 10-bit Literal
Note: Not all instructions support all the
POP : [--W15]
PUSH : [W15++] addressing modes given above. Individ-
ual instructions can support different
subsets of these addressing modes.
Sequential Address
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 0
Pivot Point
XB = 0x0008 for a 16-Word Bit-Reversed Buffer
A3 A2 A1 A0 Decimal A3 A2 A1 A0 Decimal
0 0 0 0 0 0 0 0 0 0
0 0 0 1 1 1 0 0 0 8
0 0 1 0 2 0 1 0 0 4
0 0 1 1 3 1 1 0 0 12
0 1 0 0 4 0 0 1 0 2
0 1 0 1 5 1 0 1 0 10
0 1 1 0 6 0 1 1 0 6
0 1 1 1 7 1 1 1 0 14
1 0 0 0 8 0 0 0 1 1
1 0 0 1 9 1 0 0 1 9
1 0 1 0 10 0 1 0 1 5
1 0 1 1 11 1 1 0 1 13
1 1 0 0 12 0 0 1 1 3
1 1 0 1 13 1 0 1 1 11
1 1 1 0 14 0 1 1 1 7
1 1 1 1 15 1 1 1 1 15
23 bits
EA 1/0
8 bits 16 bits
24 bits
Select
1 EA 0
Program Space Visibility(1)
0 PSVPAG
(Remapping)
8 bits 15 bits
23 bits
Note 1: The Least Significant bit (LSb) of program space addresses is always fixed as ‘0’ to
maintain word alignment of data in the program and data spaces.
2: Table operations are not required to be word-aligned. Table read operations are permitted
in the configuration memory space.
Program Space
TBLPAG
02
23 15 0
0x000000 23 16 8 0
00000000
00000000
0x020000 00000000
0x030000 00000000
‘Phantom’ Byte
TBLRDH.B (Wn<0> = 0)
TBLRDL.B (Wn<0> = 1)
TBLRDL.B (Wn<0> = 0)
TBLRDL.W
PSV Area
...while the lower 15 bits
of the EA specify an
exact address within
0xFFFF the PSV area. This
corresponds exactly to
the same lower 15 bits
of the actual program
space address.
0x800000
24 bits
Using
0 Program Counter 0
Program Counter
Working Reg EA
Using
1/0 TBLPAG Reg
Table Instruction
8 bits 16 bits
User/Configuration Byte
Space Select 24-bit EA Select
For example, if the device is operating at +125° C, the The NVMCON register (Register 5-1) controls which
FRC accuracy will be ±5%. If the TUN<5:0> bits (see blocks are to be erased, which memory type is to be
Register 8-4) are set to ‘b111111,the minimum row programmed and the start of the programming cycle.
write time is equal to Equation 5-2. NVMKEY is a write-only register that is used for write
protection. To start a programming or erase sequence,
the user application must consecutively write 0x55 and
0xAA to the NVMKEY register. Refer to Section 5.3
“Programming Operations” for further details.
If ERASE = 0:
1111 = No operation
1101 = No operation
1100 = No operation
0011 = Memory word program operation
0010 = No operation
0001 = Memory row program operation
0000 = Program a single Configuration register byte
Glitch Filter
MCLR
WDT
Module
Sleep or Idle
BOR
Internal
Regulator SYSRST
VDD
Trap Conflict
Illegal Opcode
Uninitialized W Register
Configuration Mismatch
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: All of the Reset status bits can be set or cleared in software. Setting one of these bits in software does not
cause a device Reset.
2: If the FWDTEN Configuration bit is ‘1’ (unprogrammed), the WDT is always enabled, regardless of the
SWDTEN bit setting.
Note 1: All of the Reset status bits can be set or cleared in software. Setting one of these bits in software does not
cause a device Reset.
2: If the FWDTEN Configuration bit is ‘1’ (unprogrammed), the WDT is always enabled, regardless of the
SWDTEN bit setting.
Vbor
VBOR
VPOR
VDD
TPOR
1
POR TBOR
2
BOR 3
TPWRT
SYSRST
4
Oscillator Clock
TOSCD TOST TLOCK
6
TFSCM
FSCM
5
Time
Note 1: POR: A POR circuit holds the device in Reset when the power supply is turned on. The POR circuit is active
until VDD crosses the VPOR threshold and the delay TPOR has elapsed.
2: BOR: The on-chip voltage regulator has a BOR circuit that keeps the device in Reset until VDD crosses the
VBOR threshold and the delay TBOR has elapsed. The delay TBOR ensures the voltage regulator output
becomes stable.
3: PWRT Timer: The programmable power-up timer continues to hold the processor in Reset for a specific
period of time (TPWRT) after a BOR. The delay TPWRT ensures that the system power supplies have stabilized
at the appropriate level for full-speed operation. After the delay TPWRT has elapsed, the SYSRST becomes
inactive, which in turn enables the selected oscillator to start generating clock cycles.
4: Oscillator Delay: The total delay for the clock to be ready for various clock source selections are given in
Table 6-1. Refer to Section 8.0 “Oscillator Configuration” for more information.
5: When the oscillator clock is ready, the processor begins execution from location 0x000000. The user
application programs a GOTO instruction at the reset address, which redirects program execution to the
appropriate start-up routine.
6: The Fail-Safe Clock Monitor (FSCM), if enabled, begins to monitor the system clock when the system clock
is ready and the delay TFSCM elapsed.
VBOR
TBOR + TPWRT
SYSRST
VDD
VBOR
TBOR + TPWRT
SYSRST
VDD
VBOR
TBOR + TPWRT
SYSRST
6.5 External Reset (EXTR) The Software Reset (Instruction) Flag (SWR) bit in the
Reset Control register (RCON<6>) is set to indicate
The external Reset is generated by driving the MCLR the software Reset.
pin low. The MCLR pin is a Schmitt trigger input with an
additional glitch filter. Reset pulses that are longer than
6.7 Watchdog Time-out Reset (WDTO)
the minimum pulse-width will generate a Reset. Refer
to Section 24.0 “Electrical Characteristics” for Whenever a Watchdog time-out occurs, the device will
minimum pulse-width specifications. The External asynchronously assert SYSRST. The clock source will
Reset (MCLR) Pin (EXTR) bit in the Reset Control remain unchanged. A WDT time-out during Sleep or
register (RCON) is set to indicate the MCLR Reset. Idle mode will wake-up the processor, but will not reset
the processor.
6.5.1 EXTERNAL SUPERVISORY CIRCUIT
The Watchdog Timer Time-out Flag bit (WDTO) in the
Many systems have external supervisory circuits that Reset Control register (RCON<4>) is set to indicate
generate reset signals to Reset multiple devices in the the Watchdog Reset. Refer to Section 21.4
system. This external Reset signal can be directly “Watchdog Timer (WDT)” for more information on
connected to the MCLR pin to Reset the device when Watchdog Reset.
the rest of system is Reset.
6.8 Trap Conflict Reset
6.5.2 INTERNAL SUPERVISORY CIRCUIT
If a lower-priority hard trap occurs while a
When using the internal power supervisory circuit to higher-priority trap is being processed, a hard trap
Reset the device, the external reset pin (MCLR) should conflict Reset occurs. The hard traps include
be tied directly or resistively to VDD. In this case, the exceptions of priority level 13 through level 15,
MCLR pin will not be used to generate a Reset. The inclusive. The address error (level 13) and oscillator
external reset pin (MCLR) does not have an internal error (level 14) traps fall into this category.
pull-up and must not be left unconnected.
The Trap Reset Flag bit (TRAPR) in the Reset Control
register (RCON<15>) is set to indicate the Trap Conflict
6.6 Software RESET Instruction (SWR)
Reset. Refer to Section 7.0 “Interrupt Controller” for
Whenever the RESET instruction is executed, the more information on trap conflict Resets.
device will assert SYSRST, placing the device in a
special Reset state. This Reset state will not
re-initialize the clock. The clock source in effect prior to
the RESET instruction will remain. SYSRST is released
at the next instruction cycle, and the reset vector fetch
will commence.
Note 1: See Table 7-1 for the list of implemented interrupt vectors.
7.4 Interrupt Control and Status The interrupt sources are assigned to the IFSx, IECx
and IPCx registers in the same sequence that they are
Registers listed in Table 7-1. For example, the INT0 (External
dsPIC33FJ32MC202/204 and dsPIC33FJ16MC304 Interrupt 0) is shown as having vector number 8 and a
devices implement a total of 22 registers for the natural order priority of 0. Thus, the INT0IF bit is found
interrupt controller: in IFS0<0>, the INT0IE bit in IEC0<0>, and the INT0IP
bits in the first position of IPC0 (IPC0<2:0>).
• INTCON1
• INTCON2 7.4.6 STATUS/CONTROL REGISTERS
• IFSx Although they are not specifically part of the interrupt
• IECx control hardware, two of the CPU Control registers
• IPCx contain bits that control interrupt functionality.
• INTTREG • The CPU STATUS register, SR, contains the
IPL<2:0> bits (SR<7:5>). These bits indicate the
7.4.1 INTCON1 AND INTCON2 current CPU interrupt priority level. The user can
Global interrupt control functions are controlled from change the current CPU priority level by writing to
INTCON1 and INTCON2. INTCON1 contains the the IPL bits.
Interrupt Nesting Disable bit (NSTDIS) as well as the • The CORCON register contains the IPL3 bit
control and status flags for the processor trap sources. which, together with IPL<2:0>, also indicates the
The INTCON2 register controls the external interrupt current CPU priority level. IPL3 is a read-only bit
request signal behavior and the use of the Alternate so that trap events cannot be masked by the user
Interrupt Vector Table. software.
All Interrupt registers are described in Register 7-1
through Register 7-24 in the following pages.
Legend:
C = Clear only bit R = Readable bit U = Unimplemented bit, read as ‘0’
S = Set only bit W = Writable bit -n = Value at POR
‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: For complete register details, see Register 3-1: “SR: CPU STATUS Register”.
2: The IPL<2:0> bits are concatenated with the IPL<3> bit (CORCON<3>) to form the CPU Interrupt Priority
Level. The value in parentheses indicates the IPL if IPL<3> = 1. User interrupts are disabled when
IPL<3> = 1.
3: The IPL<2:0> Status bits are read-only when NSTDIS (INTCON1<15>) = 1.
Note 1: For complete register details, see Register 3-2: “CORCON: CORE Control Register”.
2: The IPL3 bit is concatenated with the IPL<2:0> bits (SR<7:5>) to form the CPU Interrupt Priority Level.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
DOZE
(1) S1/S3
S1 PLL
OSC2
POSCMD<1:0>
FP(3)
FRC
FRCDIV
FRCDIVN
Oscillator S7
÷ 2
FOSC
FRCDIV<2:0>
TUN<5:0>
FRCDIV16
S6
÷ 16
FRC S0
LPRC LPRC
S5
Oscillator
LPOSCEN
SOSCI Clock Fail Clock Switch Reset
S7 NOSC<2:0> FNOSC<2:0>
WDT, PWRT,
FSCM
Timer 1
For example, suppose a 10 MHz crystal is being used EQUATION 8-3: XT WITH PLL MODE
with the selected oscillator mode of XT with PLL. EXAMPLE
• If PLLPRE<4:0> = 0, then N1 = 2. This yields a
1 10000000 ⋅ 32
F CY = F = --- ⋅ ⎛ -------------------------------------⎞ = 40 MIPS
VCO input of 10/2 = 5 MHz, which is within the OSC
-------------
acceptable range of 0.8-8 MHz. 2 2 ⎝ 2⋅ 2 ⎠
FVCO
0.8-8.0 MHz 12.5-80 MHz
100-200 MHz
Here(1) Here(1)
Here(1)
PLLDIV
N1 N2
Divide by Divide by
2-33 M 2, 4, 8
Divide by
2-513
Note 1: Writes to this register require an unlock sequence. Refer to Section 7. “Oscillator” (DS70186) in the
“dsPIC33F/PIC24H Family Reference Manual” for details.
2: Direct clock switches between any primary oscillator mode with PLL and FRCPLL mode are not permitted.
This applies to clock switches in either direction. In these instances, the application must switch to FRC
mode as a transition clock source between the two PLL modes.
3: This register is reset only on a Power-on Reset (POR).
Note 1: Writes to this register require an unlock sequence. Refer to Section 7. “Oscillator” (DS70186) in the
“dsPIC33F/PIC24H Family Reference Manual” for details.
2: Direct clock switches between any primary oscillator mode with PLL and FRCPLL mode are not permitted.
This applies to clock switches in either direction. In these instances, the application must switch to FRC
mode as a transition clock source between the two PLL modes.
3: This register is reset only on a Power-on Reset (POR).
Note 1: This bit is cleared when the ROI bit is set and an interrupt occurs.
2: This register is reset only on a Power-on Reset (POR).
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: OSCTUN functionality has been provided to help customers compensate for temperature effects on the
FRC frequency over a wide range of temperatures. The tuning step size is an approximation and is neither
characterized nor tested.
2: This register is reset only on a Power-on Reset (POR).
9.2.2 IDLE MODE Doze mode is enabled by setting the DOZEN bit
(CLKDIV<11>). The ratio between peripheral and core
The following occur in Idle mode:
clock speed is determined by the DOZE<2:0> bits
• The CPU stops executing instructions. (CLKDIV<14:12>). There are eight possible
• The WDT is automatically cleared. configurations, from 1:1 to 1:128, with 1:1 being the
• The system clock source remains active. By default setting.
default, all peripheral modules continue to operate Programs can use Doze mode to selectively reduce
normally from the system clock source, but can power consumption in event-driven applications. This
also be selectively disabled (see Section 9.4 allows clock-sensitive functions, such as synchronous
“Peripheral Module Disable”). communications, to continue without interruption while
• If the WDT or FSCM is enabled, the LPRC also the CPU idles, waiting for something to invoke an
remains active. interrupt routine. An automatic return to full-speed CPU
The device will wake from Idle mode on any of these operation on interrupts can be enabled by setting the
events: ROI bit (CLKDIV<15>). By default, interrupt events
have no effect on Doze mode operation.
• Any interrupt that is individually enabled
For example, suppose the device is operating at
• Any device Reset
20 MIPS and the CAN module has been configured for
• A WDT time-out 500 kbps based on this device operating speed. If the
On wake-up from Idle mode, the clock is reapplied to device is placed in Doze mode with a clock frequency
the CPU and instruction execution will begin (2-4 ratio of 1:4, the CAN module continues to communicate
cycles later), starting with the instruction following the at the required bit rate of 500 kbps, but the CPU now
PWRSAV instruction, or the first instruction in the ISR. starts executing instructions at a frequency of 5 MIPS.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: PCFGx bits have no effect if the ADC module is disabled by setting this bit. In this case, all port pins
multiplexed with ANx will be in Digital mode.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
10.0 I/O PORTS the I/O pin. The logic also prevents “loop through”, in
which a port’s digital output can drive the input of a
Note 1: This data sheet summarizes the features peripheral that shares the same pin. Figure 10-1 shows
of the dsPIC33FJ32MC202/204 and how ports are shared with other peripherals and the
dsPIC33FJ16MC304 devices. It is not associated I/O pin to which they are connected.
intended to be a comprehensive refer- When a peripheral is enabled and the peripheral is
ence source. To complement the infor- actively driving an associated pin, the use of the pin as
mation in this data sheet, refer to Section
a general purpose output pin is disabled. The I/O pin
10. “I/O Ports” (DS70193) of the
can be read, but the output driver for the parallel port bit
“dsPIC33F/PIC24H Family Reference
is disabled. If a peripheral is enabled, but the peripheral
Manual”, which is available on Microchip
is not actively driving a pin, that pin can be driven by a
web site (www.microchip.com).
port.
2: Some registers and associated bits
All port pins have three registers directly associated
described in this section may not be
available on all devices. Refer to with their operation as digital I/O. The data direction
Section 4.0 “Memory Organization” in register (TRISx) determines whether the pin is an input
this data sheet for device-specific register or an output. If the data direction bit is a ‘1’, then the pin
and bit information. is an input. All port pins are defined as inputs after a
Reset. Reads from the latch (LATx) read the latch.
All of the device pins (except VDD, VSS, MCLR and Writes to the latch write the latch. Reads from the port
OSC1/CLKI) are shared among the peripherals and the (PORTx) read the port pins, while writes to the port pins
parallel I/O ports. All I/O input ports feature Schmitt write the latch.
Trigger inputs for improved noise immunity. Any bit and its associated data and control registers
that are not valid for a particular device will be
10.1 Parallel I/O (PIO) Ports disabled. That means the corresponding LATx and
TRISx registers and the port pin will read as zeros.
Generally a parallel I/O port that shares a pin with a
peripheral is subservient to the peripheral. The When a pin is shared with another peripheral or
peripheral’s output buffer data and control signals are function that is defined as an input only, it is
provided to a pair of multiplexers. The multiplexers nevertheless regarded as a dedicated port because
select whether the peripheral or the associated port there is no other competing source of outputs.
has ownership of the output data and control signals of
PIO Module 1
Output Data
Read TRIS 0
WR TRIS CK
TRIS Latch
D Q
WR LAT +
WR Port CK
Data Latch
Read LAT
Input Data
Read Port
Correct:
BSET PORTB, #RB1 ;Set PORTB<RB1> high
NOP
BSET PORTB, #RB6 ;Set PORTB<RB6> high
NOP
Preferred:
BSET LATB, LATB1 ;Set PORTB<RB1> high
BSET LATB, LATB6 ;Set PORTB<RB6> high
25
RP25
Default
0
U1TX Output
3
U1RTS Output 4
RPn
Output Data
OC2 Output
19
UPDN Output
26
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
2: Some registers and associated bits 1. Set the TON bit (= 1) in the T1CON register.
described in this section may not be 2. Select the timer prescaler ratio using the
available on all devices. Refer to TCKPS<1:0> bits in the T1CON register.
Section 4.0 “Memory Organization” in 3. Set the Clock and Gating modes using the TCS
this data sheet for device-specific register and TGATE bits in the T1CON register.
and bit information. 4. Set or clear the TSYNC bit in T1CON to select
synchronous or asynchronous operation.
The Timer1 module is a 16-bit timer, which can serve
as the time counter for the real-time clock, or operate 5. Load the timer period value into the PR1
as a free-running interval timer/counter. Timer1 can register.
operate in three modes: 6. If interrupts are required, set the interrupt enable
bit, T1IE. Use the priority bits, T1IP<2:0>, to set
• 16-bit Timer
the interrupt priority.
• 16-bit Synchronous Counter
• 16-bit Asynchronous Counter
TCKPS<1:0>
SOSCO/ TON 2
1x
T1CK
Gate Prescaler
SOSCEN Sync 01 1, 8, 64, 256
SOSCI
TCY 00
TGATE
TGATE TCS
1 Q D
Set T1IF
0 Q CK
0
Reset
TMR1
1 Sync
Comparator TSYNC
Equal
PR1
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
The Timer2/3 feature also supports: The timer value at any point is stored in the register
pair, TMR3:TMR2, which always contains the most sig-
• Timer gate operation nificant word of the count, while TMR2 contains the
• Selectable prescaler settings least significant word.
• Timer operation during Idle and Sleep modes
• Interrupt on a 32-bit period register match 12.2 16-bit Operation
• Time base for Input Capture and Output Compare To configure any of the timers for individual 16-bit
modules (Timer2 and Timer3 only) operation:
• ADC1 event trigger (Timer2/3 only)
1. Clear the T32 bit corresponding to that timer.
Individually, all eight of the 16-bit timers can function as 2. Select the timer prescaler ratio using the
synchronous timers or counters. They also offer the TCKPS<1:0> bits.
features listed above, except for the event trigger. The
3. Set the Clock and Gating modes using the TCS
operating modes and enabled features are determined
and TGATE bits.
by setting the appropriate bit(s) in the T2CON, T3CON
registers. T2CON registers are shown in generic form 4. Load the timer period value into the PRx
in Register 12-1. T3CON registers are shown in register.
Register 12-2. 5. If interrupts are required, set the interrupt enable
bit, TxIE. Use the priority bits, TxIP<2:0>, to set
the interrupt priority.
6. Set the TON bit.
Gate Prescaler
Sync 01 1, 8, 64, 256
TCY 00
TGATE
TGATE
1 Q D TCS
Set T3IF
Q CK
0
PR3 PR2
MSb LSb
16
Read TMR2
Write TMR2
16
16
TMR3HLD
16
Data Bus<15:0>
Note 1: The 32-bit timer control bit, T32, must be set for 32-bit timer/counter operation. All control bits are respective to the
T2CON register.
2: The ADC event trigger is available only on Timer2/3.
Gate Prescaler
Sync 01 1, 8, 64, 256
TGATE
00
1 Q D
TCY TCS
Set T2IF Q CK
0 TGATE
Reset
TMR2 Sync
Comparator
Equal
PR2
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: When 32-bit timer operation is enabled (T32 = 1) in the Timer Control register (T2CON<3>), the TSIDL bit
must be cleared to operate the 32-bit timer in Idle mode.
2: When the 32-bit timer operation is enabled (T32 = 1) in the Timer Control register (T2CON<3>), these bits
have no effect.
16 16
ICTMR
1 0
(ICxCON<7>)
Prescaler Edge Detection Logic FIFO
Counter and R/W
(1, 4, 16) Clock Synchronizer Logic
ICx Pin
ICM<2:0> (ICxCON<2:0>)
3 Mode Select
FIFO
System Bus
Set Flag ICxIF
(in IFSn Register)
Note: An ‘x’ in a signal, register or bit name denotes the number of the capture channel.
14.0 OUTPUT COMPARE The Output Compare module can select either Timer2
or Timer3 for its time base. The module compares the
Note 1: This data sheet summarizes the features value of the timer with the value of one or two compare
of the dsPIC33FJ32MC202/204 and registers depending on the operating mode selected.
dsPIC33FJ16MC304 family of devices. It The state of the output pin changes when the timer
is not intended to be a comprehensive value matches the compare register value. The Output
reference source. To complement the Compare module generates either a single output
information in this data sheet, refer to pulse or a sequence of output pulses, by changing the
Section 13. “Output Compare” state of the output pin on the compare match events.
(DS70209) of the “dsPIC33F/PIC24H The Output Compare module can also generate
Family Reference Manual”, which is interrupts on compare match events.
available from the Microchip web site
The Output Compare module has multiple operating
(www.microchip.com).
modes:
2: Some registers and associated bits
• Active-Low One-Shot mode
described in this section may not be
available on all devices. Refer to • Active-High One-Shot mode
Section 4.0 “Memory Organization” in • Toggle mode
this data sheet for device-specific register • Delayed One-Shot mode
and bit information. • Continuous Pulse mode
• PWM mode without fault protection
• PWM mode with fault protection
OCxRS
OCxR Output S Q
OCx
Logic R
3
Output
OCM<2:0> Output Enable
Mode Select Enable Logic
Comparator
OCFA
0 1 OCTSEL 0 1
16 16
OCxRS
TMRy
OCxR
Active-Low One-Shot
(OCM = 001)
Active-High One-Shot
(OCM = 010)
Toggle Mode
(OCM = 011)
Delayed One-Shot
(OCM = 100)
PWM Mode
(OCM = 110 or 111)
PWM1CON1
PWM Enable and Mode SFRs
PWM1CON2
P1DTCON1
Dead-Time Control SFRs
P1DTCON2
PWM Manual
P1OVDCON Control SFR
PWM Generator 3
P1DC3 Buffer
16-bit Data Bus
P1DC3
PWM PWM1H2
P1TMR Channel 2 Dead-Time
Generator 2
Generator and
Override Logic Output PWM1L2
Comparator Driver
PWM PWM1H1
Channel 1 Dead-Time Block
Generator 1
Generator and
P1TPER Override Logic PWM1L1
P1TPER Buffer
P1TCON FLTA1
P1SECMP PTDIR
Note: Details of PWM Generator 1and PWM Generator 2 are not shown for clarity.
PWM2CON2
P2DTCON1
Dead-Time Control SFRs
P2DTCON2
PWM Manual
P2OVDCON Control SFR
PWM Generator 1
P2DC1Buffer
16-bit Data Bus
P2DC1
P2TMR
Output
Comparator Driver
Block
P2TPER
P2TPER Buffer
P2TCON FLTA2
P2SECMP PTDIR
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
bit 15 PTDIR: PWM Time Base Count Direction Status bit (read-only)
1 = PWM time base is counting down
0 = PWM time base is counting up
bit 14-0 PTMR <14:0>: PWM Time Base Register Count Value bits
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
bit 15 bit 8
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: SEVTDIR is compared with PTDIR (PXTMR<15>) to generate the Special Event Trigger.
2: PxSECMP<14:0> is compared with PXTMR<14:0> to generate the Special Event Trigger.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: Reset condition of the PENxH and PENxL bits depends on the value of the PWMPIN Configuration bit in
the FPOR Configuration register.
2: PWM2 supports only 1 PWM I/O pin pair.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
1
QEIM<2:0>
0
QEIIF
D Q
TQGATE Event
CK Q Flag
Programmable
QEBx
Digital Filter
Programmable
INDXx
Digital Filter
PCDOUT 3
UPDNx
Up/Down
1
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Transfer Transfer
SPIxRXB SPIxTXB
SPIxBUF
16
Internal Data Bus
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: The CKE bit is not used in the Framed SPI modes. Program this bit to ‘0’ for the Framed SPI modes
(FRMEN = 1).
2: This bit must be cleared when FRMEN = 1.
3: Do not set both Primary and Secondary prescalers to a value of 1:1.
Note 1: The CKE bit is not used in the Framed SPI modes. Program this bit to ‘0’ for the Framed SPI modes
(FRMEN = 1).
2: This bit must be cleared when FRMEN = 1.
3: Do not set both Primary and Secondary prescalers to a value of 1:1.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Internal
Data Bus
I2CxRCV
Read
Shift
SCLx Clock
I2CxRSR
LSb
I2CxMSK
Write Read
I2CxADD
Read
Read
Collision Write
Detect
I2CxCON
Acknowledge
Generation Read
Clock
Stretching
Write
I2CxTRN
LSb
Shift Clock Read
Reload
Control
Write
Read
TCY/2
R/C-0 HS R/C-0 HS R-0 HSC R/C-0 HSC R/C-0 HSC R-0 HSC R-0 HSC R-0 HSC
IWCOL I2COV D_A P S R_W RBF TBF
bit 7 bit 0
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
IrDA®
Note 1: Refer to Section 17. “UART” (DS70188) in the “dsPIC33F/PIC24H Family Reference Manual” for
information on enabling the UART module for receive or transmit operation.
2: This feature is only available for the 16x BRG mode (BRGH = 0).
Note 1: Refer to Section 17. “UART” (DS70188) in the “dsPIC33F/PIC24H Family Reference Manual” for
information on enabling the UART module for receive or transmit operation.
2: This feature is only available for the 16x BRG mode (BRGH = 0).
Note 1: Refer to Section 17. “UART” (DS70188) in the “dsPIC33F/PIC24H Family Reference Manual” for
information on enabling the UART module for transmit operation.
Note 1: Refer to Section 17. “UART” (DS70188) in the “dsPIC33F/PIC24H Family Reference Manual” for
information on enabling the UART module for transmit operation.
AN0
AN8
S/H0
CHANNEL
SCAN +
CH0SB<4:0>
CH0SA<4:0> -
CH0 CSCNA
AN1
VREFL
CH0NA CH0NB
AN0 (1)
VREF+(1) AVDD VREF- AVSS
AN3 S/H1
+
CH123SA CH123SB -
CH1(2)
AN6
VCFG<2:0>
VREFL ADC1BUF0
ADC1BUF1
ADC1BUF2
VREFH VREFL
CH123NA CH123NB
SAR ADC
AN1
AN4
S/H2
+ ADC1BUFE
CH123SA CH123SB - ADC1BUFF
CH2(2)
AN7
VREFL
CH123NA CH123NB
AN2
AN5
S/H3
+
CH3(2) CH123SA CH123SB
-
AN8
VREFL
CH123NA CH123NB
Alternate
Input Selection
Note 1: VREF+, VREF- inputs can be multiplexed with other analog inputs.
2: Channels 1, 2 and 3 are not applicable for the 12-bit mode of operation.
AN0
AN5
S/H0
CHANNEL
SCAN +
CH0SB<4:0>
CH0SA<4:0> -
CH0 CSCNA
AN1
VREFL
CH0NA CH0NB
AN0
VREF+(1) AVDD VREF-(1) AVSS
AN3 S/H1
+
CH123SA CH123SB -
CH1(2)
VCFG<2:0>
VREFL ADC1BUF0
ADC1BUF1
ADC1BUF2
VREFH VREFL
CH123NA CH123NB
SAR ADC
AN1
AN4
S/H2
+ ADC1BUFE
CH123SA CH123SB - ADC1BUFF
(2)
CH2
VREFL
CH123NA CH123NB
AN2
AN5
S/H3
+
CH123SA CH123SB
-
CH3(2)
VREFL
CH123NA CH123NB
Alternate
Input Selection
Note 1: VREF+, VREF- inputs can be multiplexed with other analog inputs.
2: Channels 1, 2 and 3 are not applicable for the 12-bit mode of operation.
AD1CON3<15>
ADC Internal
RC Clock(2) 0
TAD
AD1CON3<5:0> 1
ADC Conversion
TCY Clock Multiplier
TOSC(1) X2
1, 2, 3, 4, 5,..., 64
Note 1: Refer to Figure 8-2 for the derivation of FOSC when the PLL is enabled. If the PLL is not used, FOSC is equal
to the clock frequency. TOSC = 1/FOSC.
2: See the ADC Electrical Characteristics for the exact RC clock value.
20.3 ADC Helpful Tips behavior because the CPU code execution is
faster than the ADC. As a result, in manual sam-
1. The SMPI<3:0> (AD1CON2<5:2>) control bits: ple mode, particularly where the users code is
a) Determine when the ADC interrupt flag is setting the SAMP bit (AD1CON1<1>), the
set and an interrupt is generated if enabled. DONE bit should also be cleared by the user
b) When the CSCNA bit (AD1CON2<10>) is application just before setting the SAMP bit.
set to ‘1’, determines when the ADC analog 5. On devices with two ADC modules, the
scan channel list defined in the ADCxPCFG registers for both ADC modules
AD1CSSL/AD1CSSH registers starts over must be set to a logic ‘1’ to configure a target
from the beginning. I/O pin as a digital I/O pin. Failure to do so
c) On devices without a DMA peripheral, means that any alternate digital input function
determines when ADC result buffer pointer will always see only a logic ‘0’ as the digital
to ADC1BUF0-ADC1BUFF, gets reset back input buffer is held in Disable mode.
to the beginning at ADC1BUF0.
2. On devices without a DMA module, the ADC has 20.4 ADC Resources
16 result buffers. ADC conversion results are
Many useful resources are provided on the main prod-
stored sequentially in ADC1BUF0-ADC1BUFF
uct page of the Microchip web site for the devices listed
regardless of which analog inputs are being
in this data sheet. This product page, which can be
used subject to the SMPI<3:0> bits
accessed using this link, contains the latest updates
(AD1CON2<5:2>) and the condition described
and additional information.
in 1c above. There is no relationship between
the ANx input being measured and which ADC Note: In the event you are not able to access
buffer (ADC1BUF0-ADC1BUFF) that the the product page using the link above,
conversion results will be placed in. enter this URL in your browser:
3. On devices with a DMA module, the ADC mod- http://www.microchip.com/wwwproducts/
ule has only 1 ADC result buffer, (i.e., Devices.aspx?dDocName=en530334
ADC1BUF0), per ADC peripheral and the ADC
conversion result must be read either by the 20.4.1 KEY RESOURCES
CPU or DMA controller before the next ADC • Section 16. “Analog-to-Digital Converter
conversion is complete to avoid overwriting the (ADC)” (DS70183)
previous value.
• Code Samples
4. The DONE bit (AD1CON1<0>) is only cleared at
• Application Notes
the start of each conversion and is set at the
completion of the conversion, but remains set • Software Libraries
indefinitely even through the next sample phase • Webinars
until the next conversion begins. If application • All related dsPIC33F/PIC24H Family Reference
code is monitoring the DONE bit in any kind of Manuals Sections
software loop, the user must consider this • Development Tools
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
ADREF+ ADREF-
000 AVDD AVSS
001 External VREF+ AVSS
010 AVDD External VREF-
011 External VREF+ External VREF-
1xx AVDD AVSS
bit 12-11 Unimplemented: Read as ‘0’
bit 10 CSCNA: Scan Input Selections for CH0+ during Sample A bit
1 = Scan inputs
0 = Do not scan inputs
bit 9-8 CHPS<1:0>: Select Channels Utilized bits
When AD12B = 1, CHPS<1:0> is: U-0, Unimplemented, Read as ‘0’
1x = Converts CH0, CH1, CH2 and CH3
01 = Converts CH0 and CH1
00 = Converts CH0
bit 7 BUFS: Buffer Fill Status bit (valid only when BUFM = 1)
1 = ADC is currently filling second half of buffer, user should access data in the first half
0 = ADC is currently filling first half of buffer, user application should access data in the second half
bit 6 Unimplemented: Read as ‘0’
bit 5-2 SMPI<3:0>: Sample/Convert Sequences Per Interrupt Selection bits
1111 = Interrupts at the completion of conversion for each 16th sample/convert sequence
1110 = Interrupts at the completion of conversion for each 15th sample/convert sequence
•
•
•
0001 = Interrupts at the completion of conversion for each 2nd sample/convert sequence
0000 = Interrupts at the completion of conversion for each sample/convert sequence
bit 1 BUFM: Buffer Fill Mode Select bit
1 = Starts filling first half of buffer on first interrupt and the second half of buffer on next interrupt
0 = Always starts filling buffer from the beginning
bit 0 ALTS: Alternate Input Sample Mode Select bit
1 = Uses channel input selects for Sample A on first sample and Sample B on next sample
0 = Always uses channel input selects for Sample A
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
If AD12B = 0:
11 = Reserved
10 = Reserved
01 = CH1, CH2, CH3 negative input is VREF-
00 = CH1, CH2, CH3 negative input is VREF-
If AD12B = 0:
11 = Reserved
10 = CH1 negative input is AN6, CH2 negative input is AN7, CH3 negative input is AN8
01 = CH1, CH2, CH3 negative input is VREF-
00 = CH1, CH2, CH3 negative input is VREF-
bit 8 CH123SB: Channel 1, 2, 3 Positive Input Select for Sample B bit
If AD12B = 1:
1 = Reserved
0 = Reserved
If AD12B = 0:
1 = CH1 positive input is AN3, CH2 positive input is AN4, CH3 positive input is AN5
0 = CH1 positive input is AN0, CH2 positive input is AN1, CH3 positive input is AN2
bit 7-3 Unimplemented: Read as ‘0’
If AD12B = 0:
11 = Reserved
10 = Reserved
01 = CH1, CH2, CH3 negative input is VREF-
00 = CH1, CH2, CH3 negative input is VREF-
If AD12B = 0:
11 = Reserved
10 = CH1 negative input is AN6, CH2 negative input is AN7, CH3 negative input is AN8
01 = CH1, CH2, CH3 negative input is VREF-
00 = CH1, CH2, CH3 negative input is VREF-
bit 0 CH123SA: Channel 1, 2, 3 Positive Input Select for Sample A bit
If AD12B = 1:
1 = Reserved
0 = Reserved
If AD12B = 0:
1 = CH1 positive input is AN3, CH2 positive input is AN4, CH3 positive input is AN5
0 = CH1 positive input is AN0, CH2 positive input is AN1, CH3 positive input is AN2
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
REGISTER 20-6:
U-0 U-0 U-0 U-0 U-0 U-0 U-0 R/W-0
— — — — — — — CSS8
bit 15 bit 8
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: On devices without 9 analog inputs, all AD1CSSL bits can be selected by the user application. However,
inputs selected for scan without a corresponding input on device converts VREFL.
2: CSSx = ANx, where x = 0 through 8.
Legend:
R = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’
-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown
Note 1: On devices without 9 analog inputs, all PCFG bits are R/W by user software. However, the PCFG bits are
ignored on ports without a corresponding input on device.
2: PCFGx = ANx, where x = 0 through 8.
3: The PCFGx bits have no effect if the ADC module is disabled by setting ADxMD bit in the PMDx Register.
In this case, all port pins multiplexed with ANx will be in Digital mode.
3.3V
dsPIC33F
VDD
VCAP
CEFC
10 µF VSS
Sleep/Idle
WDTPRE WDTPOST<3:0>
SWDTEN WDT
FWDTEN Wake-up
RS RS 1
Prescaler Postscaler
LPRC Clock (divide by N1) (divide by N2) WDT
0 Reset
CLRWDT Instruction
TABLE 21-3: CODE FLASH SECURITY TABLE 21-4: CODE FLASH SECURITY
SEGMENT SIZES FOR SEGMENT SIZES FOR
32 KBYTE DEVICES 16 KBYTE DEVICES
CONFIG BITS CONFIG BITS
0x000000 0x000000
VS = 256 IW 0x0001FE VS = 256 IW 0x0001FE
0x000200 0x000200
BSS<2:0>=x11 0x0007FE BSS<2:0>=x11 0x0007FE
0x000800 0x000800
0x001FFE 0x001FFE
0K 0x002000 0K 0x002000
GS = 11008 IW 0x003FFE GS = 5376 IW
0x004000
0x0057FE 0x002BFE
0x000000 0x000000
VS = 256 IW 0x0001FE VS = 256 IW 0x0001FE
0x000200 0x000200
BS = 768 IW 0x0007FE BS = 768 IW 0x0007FE
BSS<2:0>=x10 0x000800 BSS<2:0>=x10 0x000800
0x001FFE 0x001FFE
256 0x002000 256 0x002000
0x003FFE
0x004000
GS = 10240 IW GS = 4608 IW
0x0057FE 0x002BFE
0x000000 0x000000
VS = 256 IW 0x0001FE VS = 256 IW 0x0001FE
0x000200 0x000200
BSS<2:0>=x01 BS = 3840 IW 0x0007FE BSS<2:0>=x01 BS = 3840 IW 0x0007FE
0x000800 0x000800
0x001FFE 0x001FFE
768 0x002000 768 0x002000
0x003FFE
0x004000
GS = 7168 IW GS = 1536 IW
0x0057FE 0x002BFE
0x000000 0x000000
VS = 256 IW 0x0001FE VS = 256 IW 0x0001FE
0x000200 0x000200
BS = 7936 IW 0x0007FE BS = 5376 IW 0x0007FE
BSS<2:0>=x00 0x000800 BSS<2:0>=x00 0x000800
0x001FFE 0x001FFE
0x002000 0x002000
1792 0x003FFE 1792
0x004000
GS = 3072 IW
0x0057FE 0x002BFE
Wm*Wm Multiplicand and Multiplier working register pair for Square instructions ∈
{W4 * W4,W5 * W5,W6 * W6,W7 * W7}
Wm*Wn Multiplicand and Multiplier working register pair for DSP instructions ∈
{W4 * W5,W4 * W6,W4 * W7,W5 * W6,W5 * W7,W6 * W7}
Wn One of 16 working registers ∈ {W0..W15}
Wnd One of 16 destination working registers ∈ {W0...W15}
Wns One of 16 source working registers ∈ {W0...W15}
WREG W0 (working register used in file register instructions)
Ws Source W register ∈ { Ws, [Ws], [Ws++], [Ws--], [++Ws], [--Ws] }
Wso Source W register ∈
{ Wns, [Wns], [Wns++], [Wns--], [++Wns], [--Wns], [Wns+Wb] }
Wx X data space prefetch address register for DSP instructions
∈ {[W8] + = 6, [W8] + = 4, [W8] + = 2, [W8], [W8] - = 6, [W8] - = 4, [W8] - = 2,
[W9] + = 6, [W9] + = 4, [W9] + = 2, [W9], [W9] - = 6, [W9] - = 4, [W9] - = 2,
[W9 + W12], none}
Wxd X data space prefetch destination register for DSP instructions ∈ {W4...W7}
Wy Y data space prefetch address register for DSP instructions
∈ {[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}
Wyd Y data space prefetch destination register for DSP instructions ∈ {W4...W7}
Note 1: Stresses above those listed under “Absolute Maximum Ratings” may cause permanent damage to the
device. This is a stress rating only, and functional operation of the device at those or any other conditions
above those indicated in the operation listings of this specification is not implied. Exposure to maximum
rating conditions for extended periods may affect device reliability.
2: Maximum allowable current is a function of device maximum power dissipation (see Table 24-2).
3: Exceptions are CLKOUT, which is able to sink/source 25 mA, and the VREF+, VREF-, SCLx, SDAx, PGECx
and PGEDx pins, which are able to sink/source 12 mA.
4: Refer to the “Pin Diagrams” section for 5V tolerant pins.
24.1 DC Characteristics
Load Condition 1 – for all pins except OSC2 Load Condition 2 – for OSC2
VDD/2
RL Pin CL
VSS
CL
Pin RL = 464Ω
CL = 50 pF for all pins except OSC2
VSS 15 pF for OSC2 output
Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4
OSC1
OS20
OS30 OS30 OS31 OS31
OS25
CLKO
OS41 OS40
D CLK 3% 3%
SPI SCK Jitter = ------------------------------ = ---------- = -------- = 0.75%
32 MHz 16 4
⎛ --------------------⎞
⎝ 2 MHz ⎠
I/O Pin
(Input)
DI35
DI40
VDD SY12
MCLR
Internal SY10
POR
SY11
PWRT
Time-out
SY30
OSC
Time-out
Internal
Reset
Watchdog
Timer
Reset
SY20
SY13
SY13
I/O Pins
SY35
FSCM
Delay
TABLE 24-21: RESET, WATCHDOG TIMER, OSCILLATOR START-UP TIMER, POWER-UP TIMER
TIMING REQUIREMENTS
Standard Operating Conditions: 3.0V to 3.6V
(unless otherwise stated)
AC CHARACTERISTICS
Operating temperature -40°C ≤TA ≤+85°C for Industrial
-40°C ≤TA ≤+125°C for Extended
Param
Symbol Characteristic Min Typ(2) Max Units Conditions
No.
SY10 TMCL MCLR Pulse Width (low)(1) 2 — — μs -40°C to +85°C
SY11 TPWRT Power-up Timer Period(1) — 2 — ms -40°C to +85°C
4 User programmable
8
16
32
64
128
SY12 TPOR Power-on Reset Delay(3) 3 10 30 μs -40°C to +85°C
SY13 TIOZ I/O High-Impedance from 0.68 0.72 1.2 μs —
MCLR Low or Watchdog
Timer Reset(1)
SY20 TWDT1 Watchdog Timer Time-out — — — ms See Section 21.4 “Watchdog
Period (1) Timer (WDT)” and LPRC
parameter F21a (Table 24-21).
SY30 TOST Oscillator Start-up Time — 1024 — — TOSC = OSC1 period
TOSC
SY35 TFSCM Fail-Safe Clock Monitor — 500 900 μs -40°C to +85°C
Delay(1)
Note 1: These parameters are characterized but not tested in manufacturing.
2: Data in “Typ” column is at 3.3V, 25°C unless otherwise stated.
3: These parameters are characterized by similarity, but are not tested in manufacturing.
TxCK
Tx10 Tx11
Tx15 Tx20
OS60
TMRx
QEB
TQ10 TQ11
TQ15 TQ20
POSCNT
ICx
IC10 IC11
IC15
OCx
(Output Compare
or PWM Mode) OC11 OC10
OC20
OCFA
OC15
MP30
FLTA
MP20
PWMx
MP11 MP10
PWMx
TQ36
QEA
(input)
TQ31 TQ30
TQ35
QEB
(input)
TQ41 TQ40
TQ31 TQ30
TQ35
QEB
Internal
QEA
(input)
QEB
(input)
Ungated
Index
TQ50
TQ51
Index Internal
TQ55
Position Coun-
ter Reset
FIGURE 24-14: SPIx MASTER MODE (HALF-DUPLEX, TRANSMIT ONLY CKE = 0) TIMING
CHARACTERISTICS
SCKx
(CKP = 0)
SCKx
(CKP = 1)
FIGURE 24-15: SPIx MASTER MODE (HALF-DUPLEX, TRANSMIT ONLY CKE = 1) TIMING
CHARACTERISTICS
SP36
SCKx
(CKP = 0)
SCKx
(CKP = 1)
SP30, SP31
TABLE 24-33: SPIx MASTER MODE (HALF-DUPLEX, TRANSMIT ONLY) TIMING REQUIREMENTS
Standard Operating Conditions: 3.0V to 3.6V
(unless otherwise stated)
AC CHARACTERISTICS
Operating temperature -40°C ≤TA ≤+85°C for Industrial
-40°C ≤TA ≤+125°C for Extended
Param
Symbol Characteristic(1) Min Typ(2) Max Units Conditions
No.
SP10 TscP Maximum SCK Frequency — — 15 MHz See Note 3
SP20 TscF SCKx Output Fall Time — — — ns See parameter DO32
and Note 4
SP21 TscR SCKx Output Rise Time — — — ns See parameter DO31
and Note 4
SP30 TdoF SDOx Data Output Fall Time — — — ns See parameter DO32
and Note 4
SP31 TdoR SDOx Data Output Rise Time — — — ns See parameter DO31
and Note 4
SP35 TscH2doV, SDOx Data Output Valid after — 6 20 ns —
TscL2doV SCKx Edge
SP36 TdiV2scH, SDOx Data Output Setup to 30 — — ns —
TdiV2scL First SCKx Edge
Note 1: These parameters are characterized, but are not tested in manufacturing.
2: Data in “Typ” column is at 3.3V, 25°C unless otherwise stated.
3: The minimum clock period for SCKx is 66.7 ns. Therefore, the clock generated in Master mode must not
violate this specification.
4: Assumes 50 pF load on all SPIx pins.
FIGURE 24-16: SPIx MASTER MODE (FULL-DUPLEX, CKE = 1, CKP = X, SMP = 1) TIMING
CHARACTERISTICS
SP36
SCKx
(CKP = 0)
SCKx
(CKP = 1)
SP41
TABLE 24-34: SPIx MASTER MODE (FULL-DUPLEX, CKE = 1, CKP = x, SMP = 1) TIMING
REQUIREMENTS
Standard Operating Conditions: 3.0V to 3.6V
(unless otherwise stated)
AC CHARACTERISTICS
Operating temperature -40°C ≤TA ≤+85°C for Industrial
-40°C ≤TA ≤+125°C for Extended
Param
Symbol Characteristic(1) Min Typ(2) Max Units Conditions
No.
SP10 TscP Maximum SCK Frequency — — 9 MHz See Note 3
SP20 TscF SCKx Output Fall Time — — — ns See parameter DO32
and Note 4
SP21 TscR SCKx Output Rise Time — — — ns See parameter DO31
and Note 4
SP30 TdoF SDOx Data Output Fall Time — — — ns See parameter DO32
and Note 4
SP31 TdoR SDOx Data Output Rise Time — — — ns See parameter DO31
and Note 4
SP35 TscH2doV, SDOx Data Output Valid after — 6 20 ns —
TscL2doV SCKx Edge
SP36 TdoV2sc, SDOx Data Output Setup to 30 — — ns —
TdoV2scL First SCKx Edge
SP40 TdiV2scH, Setup Time of SDIx Data 30 — — ns —
TdiV2scL Input to SCKx Edge
SP41 TscH2diL, Hold Time of SDIx Data Input 30 — — ns —
TscL2diL to SCKx Edge
Note 1: These parameters are characterized, but are not tested in manufacturing.
2: Data in “Typ” column is at 3.3V, 25°C unless otherwise stated.
3: The minimum clock period for SCKx is 111 ns. The clock generated in Master mode must not violate this
specification.
4: Assumes 50 pF load on all SPIx pins.
SCKx
(CKP = 0)
SCKx
(CKP = 1)
SP40 SP41
TABLE 24-35: SPIx MASTER MODE (FULL-DUPLEX, CKE = 0, CKP = x, SMP = 1) TIMING
REQUIREMENTS
Standard Operating Conditions: 3.0V to 3.6V
(unless otherwise stated)
AC CHARACTERISTICS
Operating temperature -40°C ≤TA ≤+85°C for Industrial
-40°C ≤TA ≤+125°C for Extended
Param
Symbol Characteristic(1) Min Typ(2) Max Units Conditions
No.
SP10 TscP Maximum SCK Frequency — — 9 MHz -40ºC to +125ºC and
see Note 3
SP20 TscF SCKx Output Fall Time — — — ns See parameter DO32
and Note 4
SP21 TscR SCKx Output Rise Time — — — ns See parameter DO31
and Note 4
SP30 TdoF SDOx Data Output Fall Time — — — ns See parameter DO32
and Note 4
SP31 TdoR SDOx Data Output Rise Time — — — ns See parameter DO31
and Note 4
SP35 TscH2doV, SDOx Data Output Valid after — 6 20 ns —
TscL2doV SCKx Edge
SP36 TdoV2scH, SDOx Data Output Setup to 30 — — ns —
TdoV2scL First SCKx Edge
SP40 TdiV2scH, Setup Time of SDIx Data 30 — — ns —
TdiV2scL Input to SCKx Edge
SP41 TscH2diL, Hold Time of SDIx Data Input 30 — — ns —
TscL2diL to SCKx Edge
Note 1: These parameters are characterized, but are not tested in manufacturing.
2: Data in “Typ” column is at 3.3V, 25°C unless otherwise stated.
3: The minimum clock period for SCKx is 111 ns. The clock generated in Master mode must not violate this
specification.
4: Assumes 50 pF load on all SPIx pins.
SP60
SSx
SP50 SP52
SCKx
(CKP = 0)
SCKx
(CKP = 1)
SP35
SP72 SP73
SP30,SP31 SP51
SDIx
SDI
MSb In Bit 14 - - - -1 LSb In
SP41
SP40
SP60
SSx
SP50 SP52
SCKx
(CKP = 0)
SCKx
(CKP = 1)
SP35
SP72 SP73
SP52
SP30,SP31 SP51
SDIx
SDI
MSb In Bit 14 - - - -1 LSb In
SP41
SP40
TABLE 24-37: SPIx SLAVE MODE (FULL-DUPLEX, CKE = 1, CKP = 1, SMP = 0) TIMING
REQUIREMENTS
Standard Operating Conditions: 3.0V to 3.6V
(unless otherwise stated)
AC CHARACTERISTICS
Operating temperature -40°C ≤TA ≤+85°C for Industrial
-40°C ≤TA ≤+125°C for Extended
Param
Symbol Characteristic(1) Min Typ(2) Max Units Conditions
No.
SP70 TscP Maximum SCK Input Frequency — — 11 MHz See Note 3
SP72 TscF SCKx Input Fall Time — — — ns See parameter DO32
and Note 4
SP73 TscR SCKx Input Rise Time — — — ns See parameter DO31
and Note 4
SP30 TdoF SDOx Data Output Fall Time — — — ns See parameter DO32
and Note 4
SP31 TdoR SDOx Data Output Rise Time — — — ns See parameter DO31
and Note 4
SP35 TscH2doV, SDOx Data Output Valid after — 6 20 ns —
TscL2doV SCKx Edge
SP36 TdoV2scH, SDOx Data Output Setup to 30 — — ns —
TdoV2scL First SCKx Edge
SP40 TdiV2scH, Setup Time of SDIx Data Input 30 — — ns —
TdiV2scL to SCKx Edge
SP41 TscH2diL, Hold Time of SDIx Data Input 30 — — ns —
TscL2diL to SCKx Edge
SP50 TssL2scH, SSx ↓ to SCKx ↑ or SCKx Input 120 — — ns —
TssL2scL
SP51 TssH2doZ SSx ↑ to SDOx Output 10 — 50 ns —
High-Impedance(4)
SP52 TscH2ssH SSx after SCKx Edge 1.5 TCY + 40 — — ns See Note 4
TscL2ssH
SP60 TssL2doV SDOx Data Output Valid after — — 50 ns —
SSx Edge
Note 1: These parameters are characterized, but are not tested in manufacturing.
2: Data in “Typ” column is at 3.3V, 25°C unless otherwise stated.
3: The minimum clock period for SCKx is 91 ns. Therefore, the SCK clock generated by the Master must not
violate this specification.
4: Assumes 50 pF load on all SPIx pins.
FIGURE 24-20: SPIx SLAVE MODE (FULL-DUPLEX CKE = 0, CKP = 1, SMP = 0) TIMING
CHARACTERISTICS
SSX
SP50 SP52
SCKX
(CKP = 0)
SCKX
(CKP = 1)
SP72 SP73
SP35
SP30,SP31 SP51
SP41
SP40
SSX
SP50 SP52
SCKX
(CKP = 0)
SCKX
(CKP = 1)
SP72 SP73
SP35
SP30,SP31 SP51
SP41
SP40
SCLx
IM31 IM34
IM30 IM33
SDAx
Start Stop
Condition Condition
SDAx
Out
SCLx
IS31 IS34
IS30 IS33
SDAx
Start Stop
Condition Condition
SDAx
Out
AD50
ADCLK
Instruction
Execution Set SAMP Clear SAMP
SAMP
AD61
AD60
TSAMP AD55
DONE
AD1IF
1 2 3 4 5 6 7 8 9
AD61 tPSS Sample Start from Setting 2.0 TAD — 3.0 TAD — —
Sample (SAMP) bit(2)
AD62 tCSS Conversion Completion to — 0.5 TAD — — —
Sample Start (ASAM = 1)(2)
AD63 tDPU Time to Stabilize Analog Stage — — 20 μs —
from ADC Off to ADC On(2)
Note 1: Because the sample caps will eventually lose charge, clock rates below 10 kHz may affect linearity
performance, especially at elevated temperatures.
2: These parameters are characterized but not tested in manufacturing.
AD50
ADCLK
Instruction
Execution Set SAMP Clear SAMP
SAMP
AD61
AD60
DONE
AD1IF
1 2 3 4 5 6 7 8 5 6 7 8
FIGURE 24-28: ADC CONVERSION (10-BIT MODE) TIMING CHARACTERISTICS (CHPS<1:0> = 01,
SIMSAM = 0, ASAM = 1, SSRC<2:0> = 111, SAMC<4:0> = 00001)
AD50
ADCLK
Instruction
Set ADON
Execution
SAMP
TSAMP AD55 AD55 TSAMP AD55
AD1IF
DONE
1 2 3 4 5 6 7 3 4 5 6 8
2 – Sampling starts after discharge period. TSAMP is described in 6 – One TAD for end of conversion.
Section 16. “Analog-to-Digital Converter (ADC)” (DS70183)
in the “dsPIC33F/PIC24H Family Reference Manual”. 7 – Begin conversion of next channel.
3 – Convert bit 9.
8 – Sample for time specified by SAMC<4:0>.
4 – Convert bit 8.
Note 1: Stresses above those listed under “Absolute Maximum Ratings” can cause permanent damage to the
device. This is a stress rating only, and functional operation of the device at those or any other conditions
above those indicated in the operation listings of this specification is not implied. Exposure to maximum
rating conditions for extended periods can affect device reliability.
2: Maximum allowable current is a function of device maximum power dissipation (see Table 25-2).
3: Unlike devices at 125°C and below, the specifications in this section also apply to the CLKOUT, VREF+,
VREF-, SCLx, SDAx, PGCx and PGDx pins.
4: AEC-Q100 reliability testing for devices intended to operate at 150°C is 1,000 hours. Any design in which
the total operating time from 125°C to 150°C will be greater than 1,000 hours is not warranted without prior
written approval from Microchip Technology Inc.
5: Refer to the “Pin Diagrams” section for 5V tolerant pins.
VDD/2
RL Pin CL
VSS
CL
Pin RL = 464Ω
CL = 50 pF for all pins except OSC2
VSS 15 pF for OSC2 output
Param
Symbol Characteristic Min Typ Max Units Conditions
No.
HOS53 DCLK CLKO Stability (Jitter)(1) -5 0.5 5 % Measured over 100 ms
period
Note 1: These parameters are characterized by similarity, but are not tested in manufacturing. This specification is
based on clock cycle by clock cycle measurements. To calculate the effective jitter for individual time
bases or communication clocks use this formula:
D CLK
Peripheral Clock Jitter = -----------------------------------------------------------------------
-
F OSC
⎛ ------------------------------------------------------------- -⎞
⎝ Peripheral Bit Rate Clock⎠
For example: Fosc = 32 MHz, DCLK = 5%, SPI bit rate clock, (i.e., SCK) is 2 MHz.
D CLK 5% 5%
SPI SCK Jitter = ------------------------------ = ---------- = -------- = 1.25%
32 MHz 16 4
⎛ --------------------⎞
⎝ 2 MHz ⎠
Param
Symbol Characteristic(1) Min Typ Max Units Conditions
No.
HSP35 TscH2doV, SDOx Data Output Valid after — 10 25 ns —
TscL2doV SCKx Edge
HSP40 TdiV2scH, Setup Time of SDIx Data Input 28 — — ns —
TdiV2scL to SCKx Edge
HSP41 TscH2diL, Hold Time of SDIx Data Input 35 — — ns —
TscL2diL to SCKx Edge
Note 1: These parameters are characterized but not tested in manufacturing.
Param
Symbol Characteristic(1) Min Typ Max Units Conditions
No.
HSP35 TscH2doV, SDOx Data Output Valid after — 10 25 ns —
TscL2doV SCKx Edge
HSP36 TdoV2sc, SDOx Data Output Setup to 35 — — ns —
TdoV2scL First SCKx Edge
HSP40 TdiV2scH, Setup Time of SDIx Data Input 28 — — ns —
TdiV2scL to SCKx Edge
HSP41 TscH2diL, Hold Time of SDIx Data Input 35 — — ns —
TscL2diL to SCKx Edge
Note 1: These parameters are characterized but not tested in manufacturing.
Param
Symbol Characteristic(1) Min Typ Max Units Conditions
No.
HSP35 TscH2doV, SDOx Data Output Valid after — — 35 ns —
TscL2doV SCKx Edge
HSP40 TdiV2scH, Setup Time of SDIx Data Input 25 — — ns —
TdiV2scL to SCKx Edge
HSP41 TscH2diL, Hold Time of SDIx Data Input to 25 — — ns —
TscL2diL SCKx Edge
HSP51 TssH2doZ SSx ↑ to SDOx Output 15 — 55 ns See Note 2
High-Impedance
Note 1: These parameters are characterized but not tested in manufacturing.
2: Assumes 50 pF load on all SPIx pins.
Param
Symbol Characteristic(1) Min Typ Max Units Conditions
No.
HSP35 TscH2doV, SDOx Data Output Valid after — — 35 ns —
TscL2doV SCKx Edge
HSP40 TdiV2scH, Setup Time of SDIx Data Input 25 — — ns —
TdiV2scL to SCKx Edge
HSP41 TscH2diL, Hold Time of SDIx Data Input 25 — — ns —
TscL2diL to SCKx Edge
HSP51 TssH2doZ SSx ↑ to SDOX Output 15 — 55 ns See Note 2
High-Impedance
HSP60 TssL2doV SDOx Data Output Valid after — — 55 ns —
SSx Edge
Note 1: These parameters are characterized but not tested in manufacturing.
2: Assumes 50 pF load on all SPIx pins.
Param
Symbol Characteristic Min Typ Max Units Conditions
No.
Reference Inputs
HAD08 IREF Current Drain — 250 600 μA ADC operating, See Note 1
— — 50 μA ADC off, See Note 1
Note 1: These parameters are not characterized or tested in manufacturing.
2: These parameters are characterized, but are not tested in manufacturing.
Param
Symbol Characteristic Min Typ Max Units Conditions
No.
ADC Accuracy (12-bit Mode) – Measurements with External VREF+/VREF-(1)
HAD20a Nr Resolution(3) 12 data bits bits —
HAD21a INL Integral Nonlinearity -2 — +2 LSb VINL = AVSS = VREFL = 0V,
AVDD = VREFH = 3.6V
HAD22a DNL Differential Nonlinearity > -1 — <1 LSb VINL = AVSS = VREFL = 0V,
AVDD = VREFH = 3.6V
HAD23a GERR Gain Error -2 — 10 LSb VINL = AVSS = VREFL = 0V,
AVDD = VREFH = 3.6V
HAD24a EOFF Offset Error -3 — 4 LSb VINL = AVSS = VREFL = 0V,
AVDD = VREFH = 3.6V
ADC Accuracy (12-bit Mode) – Measurements with Internal VREF+/VREF-(1)
HAD20a Nr Resolution(3) 12 data bits bits —
HAD21a INL Integral Nonlinearity -2 — +2 LSb VINL = AVSS = 0V, AVDD = 3.6V
HAD22a DNL Differential Nonlinearity > -1 — <1 LSb VINL = AVSS = 0V, AVDD = 3.6V
HAD23a GERR Gain Error 2 — 20 LSb VINL = AVSS = 0V, AVDD = 3.6V
HAD24a EOFF Offset Error 2 — 10 LSb VINL = AVSS = 0V, AVDD = 3.6V
Dynamic Performance (12-bit Mode)(2)
HAD33a FNYQ Input Signal Bandwidth — — 200 kHz —
Note 1: These parameters are characterized, but are tested at 20 ksps only.
2: These parameters are characterized by similarity, but are not tested in manufacturing.
3: Injection currents > | 0 | can affect the ADC results by approximately 4-6 counts.
Param
Symbol Characteristic Min Typ Max Units Conditions
No.
ADC Accuracy (10-bit Mode) – Measurements with External VREF+/VREF-(1)
HAD20b Nr Resolution(3) 10 data bits bits —
HAD21b INL Integral Nonlinearity -3 — 3 LSb VINL = AVSS = VREFL = 0V,
AVDD = VREFH = 3.6V
HAD22b DNL Differential Nonlinearity > -1 — <1 LSb VINL = AVSS = VREFL = 0V,
AVDD = VREFH = 3.6V
HAD23b GERR Gain Error -5 — 6 LSb VINL = AVSS = VREFL = 0V,
AVDD = VREFH = 3.6V
HAD24b EOFF Offset Error -1 — 5 LSb VINL = AVSS = VREFL = 0V,
AVDD = VREFH = 3.6V
ADC Accuracy (10-bit Mode) – Measurements with Internal VREF+/VREF-(1)
HAD20b Nr Resolution(3) 10 data bits bits —
HAD21b INL Integral Nonlinearity -2 — 2 LSb VINL = AVSS = 0V, AVDD = 3.6V
HAD22b DNL Differential Nonlinearity > -1 — <1 LSb VINL = AVSS = 0V, AVDD = 3.6V
HAD23b GERR Gain Error -5 — 15 LSb VINL = AVSS = 0V, AVDD = 3.6V
HAD24b EOFF Offset Error -1.5 — 7 LSb VINL = AVSS = 0V, AVDD = 3.6V
Dynamic Performance (10-bit Mode)(2)
HAD33b FNYQ Input Signal Bandwidth — — 400 kHz —
Note 1: These parameters are characterized, but are tested at 20 ksps only.
2: These parameters are characterized by similarity, but are not tested in manufacturing.
3: Injection currents > | 0 | can affect the ADC results by approximately 4-6 counts.
Param
Symbol Characteristic Min Typ Max Units Conditions
No.
Clock Parameters
HAD50 TAD ADC Clock Period(1) 147 — — ns —
Conversion Rate
HAD56 FCNV Throughput Rate(1) — — 400 Ksps —
Note 1: These parameters are characterized but not tested in manufacturing.
Param
Symbol Characteristic Min Typ Max Units Conditions
No.
Clock Parameters
HAD50 TAD ADC Clock Period(1) 104 — — ns —
Conversion Rate
HAD56 FCNV Throughput Rate(1) — — 800 Ksps —
Note 1: These parameters are characterized but not tested in manufacturing.
Note: The graphs provided following this note are a statistical summary based on a limited number of samples and are provided for design guidance purposes only.
The performance characteristics listed herein are not tested or guaranteed. In some graphs, the data presented may be outside the specified operating range
(e.g., outside specified power supply range) and therefore, outside the warranted range.
IOH (A)
-0.008 -0.020
-0.006 -0.015
-0.004 -0.010
-0.002 -0.005
0.000 0.000
0.00 0.50 1.00 1.50 2.00 2.50 3.00 3.50 4.00 0.00 1.00 2.00 3.00 4.00
VOH (V) VOH (V)
FIGURE 26-2: VOH – 4x DRIVER PINS FIGURE 26-4: VOH – 16x DRIVER PINS
-0.030 -0.080
3.6V
-0.070 3.6V
-0.025
3.3V -0.060 3.3V
-0.020 -0.050
3V 3V
IOH (A)
IOH (A)
-0.015 -0.040
-0.030
-0.010
-0.020
DS70283K-page 291
-0.005 -0.010
0.000 0.000
0.00 0.50 1.00 1.50 2.00 2.50 3.00 3.50 4.00 0.00 1.00 2.00 3.00 4.00
IOL (A)
IOL (A)
0.010 0.030
0.008
0.020
0.006
0.004 0.010
0.002
0.000 0.000
0.00 1.00 2.00 3.00 4.00 0.00 1.00 2.00 3.00 4.00
VOL (V) VOL (V)
FIGURE 26-6: VOL – 4x DRIVER PINS FIGURE 26-8: VOL – 16x DRIVER PINS
0.040 0.120
IOL (A)
IOL (A)
0.020 0.060
0.015
0.040
0.010
0.020
0.005
0.000 0.000
0.00 1.00 2.00 3.00 4.00 0.00 1.00 2.00 3.00 4.00
VOL (V) VOL (V)
FIGURE 26-9: TYPICAL IPD CURRENT @ VDD = 3.3V, +85ºC FIGURE 26-11: TYPICAL IDOZE CURRENT @ VDD = 3.3V, +85ºC
© 2007-2012 Microchip Technology Inc.
700
60.00
600
40.00
Current (mA)
400
30.00
300
20.00
200
10.00
100
0.00
0 1:1 1:2 1:64 1:128
-40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100 110 120 Doze Ratio
Temperature Celsius
FIGURE 26-10: TYPICAL IDD CURRENT @ VDD = 3.3V, +85ºC FIGURE 26-12: TYPICAL IIDLE CURRENT @ VDD = 3.3V, +85ºC
60 25
50
20
40
10
20
10 5
DS70283K-page 293
PMD = 0, no PLL
0
0 10 20 30 40 50 60 0
0 10 20 30 40
FCY (MIPS)
MIPS
FIGURE 26-13: TYPICAL FRC FREQUENCY @ VDD = 3.3V FIGURE 26-14: TYPICAL LPRC FREQUENCY @ VDD = 3.3V
DS70283K-page 294
33
7400
31
27
7300
25
Frequen
7250 23
7200 21
L
19
7150
17
7100 15
-40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100 110 120 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100 110 120
Temperature Celsius Temperature Celsius
© 2007-2012 Microchip Technology Inc.
dsPIC33FJ32MC202/204 and dsPIC33FJ16MC304
27.0 PACKAGING INFORMATION
27.1 Package Marking Information
XXXXXXXXXXXXXXXXXXXX dsPIC33FJ32MC
XXXXXXXXXXXXXXXXXXXX 202-E/SO e3
XXXXXXXXXXXXXXXXXXXX 0730235
YYWWNNN
XXXXXXXXXXXX 33FJ32MC
XXXXXXXXXXXX 202-E/SS e3
YYWWNNN 0730235
Note: If the full Microchip part number cannot be marked on one line, it is carried over to the next
line, thus limiting the number of available characters for customer-specific information.
XXXXXXXX 33FJ32MC
XXXXXXXX 202E/MM e3
YYWWNNN 0730235
XXXXXXXXXX dsPIC33FJ32
XXXXXXXXXX MC204-E/ML e3
XXXXXXXXXX 0730235
YYWWNNN
XXXXXXXXXX dsPIC33FJ
XXXXXXXXXX 32MC204
XXXXXXXXXX -E/PT e3
YYWWNNN 0730235
Note: If the full Microchip part number cannot be marked on one line, it is carried over to the next
line, thus limiting the number of available characters for customer-specific information.
28-Lead Skinny Plastic Dual In-Line (SP) – 300 mil Body [SPDIP]
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
NOTE 1
E1
1 2 3
A A2
L c
A1 b1
b e eB
Units INCHES
Dimension Limits MIN NOM MAX
Number of Pins N 28
Pitch e .100 BSC
Top to Seating Plane A – – .200
Molded Package Thickness A2 .120 .135 .150
Base to Seating Plane A1 .015 – –
Shoulder to Shoulder Width E .290 .310 .335
Molded Package Width E1 .240 .285 .295
Overall Length D 1.345 1.365 1.400
Tip to Seating Plane L .110 .130 .150
Lead Thickness c .008 .010 .015
Upper Lead Width b1 .040 .050 .070
Lower Lead Width b .014 .018 .022
Overall Row Spacing § eB – – .430
Notes:
1. Pin 1 visual index feature may vary, but must be located within the hatched area.
2. § Significant Characteristic.
3. Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed .010" per side.
4. Dimensioning and tolerancing per ASME Y14.5M.
BSC: Basic Dimension. Theoretically exact value shown without tolerances.
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
/HDG3ODVWLF6KULQN6PDOO2XWOLQH66±PP%RG\>6623@
1RWH )RUWKHPRVWFXUUHQWSDFNDJHGUDZLQJVSOHDVHVHHWKH0LFURFKLS3DFNDJLQJ6SHFLILFDWLRQORFDWHGDW
KWWSZZZPLFURFKLSFRPSDFNDJLQJ
D
N
E
E1
1 2
b
NOTE 1
e
c
A A2
φ
A1
L1 L
8QLWV 0,//,0(7(56
'LPHQVLRQ/LPLWV 0,1 120 0$;
1XPEHURI3LQV 1
3LWFK H %6&
2YHUDOO+HLJKW $ ± ±
0ROGHG3DFNDJH7KLFNQHVV $
6WDQGRII $ ± ±
2YHUDOO:LGWK (
0ROGHG3DFNDJH:LGWK (
2YHUDOO/HQJWK '
)RRW/HQJWK /
)RRWSULQW / 5()
/HDG7KLFNQHVV F ±
)RRW$QJOH
/HDG:LGWK E ±
1RWHV
3LQYLVXDOLQGH[IHDWXUHPD\YDU\EXWPXVWEHORFDWHGZLWKLQWKHKDWFKHGDUHD
'LPHQVLRQV'DQG(GRQRWLQFOXGHPROGIODVKRUSURWUXVLRQV0ROGIODVKRUSURWUXVLRQVVKDOOQRWH[FHHGPPSHUVLGH
'LPHQVLRQLQJDQGWROHUDQFLQJSHU$60(<0
%6& %DVLF'LPHQVLRQ7KHRUHWLFDOO\H[DFWYDOXHVKRZQZLWKRXWWROHUDQFHV
5() 5HIHUHQFH'LPHQVLRQXVXDOO\ZLWKRXWWROHUDQFHIRULQIRUPDWLRQSXUSRVHVRQO\
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
/HDG3ODVWLF4XDG)ODW1R/HDG3DFNDJH00±[[PP%RG\>4)16@
ZLWKPP&RQWDFW/HQJWK
1RWH )RUWKHPRVWFXUUHQWSDFNDJHGUDZLQJVSOHDVHVHHWKH0LFURFKLS3DFNDJLQJ6SHFLILFDWLRQORFDWHGDW
KWWSZZZPLFURFKLSFRPSDFNDJLQJ
D D2
EXPOSED
PAD
E2
E
b
2 2
1 1 K
N N
L
NOTE 1 BOTTOM VIEW
TOP VIEW
A3 A1
8QLWV 0,//,0(7(56
'LPHQVLRQ/LPLWV 0,1 120 0$;
1XPEHURI3LQV 1
3LWFK H %6&
2YHUDOO+HLJKW $
6WDQGRII $
&RQWDFW7KLFNQHVV $ 5()
2YHUDOO:LGWK ( %6&
([SRVHG3DG:LGWK (
2YHUDOO/HQJWK ' %6&
([SRVHG3DG/HQJWK '
&RQWDFW:LGWK E
&RQWDFW/HQJWK /
&RQWDFWWR([SRVHG3DG . ± ±
1RWHV
3LQYLVXDOLQGH[IHDWXUHPD\YDU\EXWPXVWEHORFDWHGZLWKLQWKHKDWFKHGDUHD
3DFNDJHLVVDZVLQJXODWHG
'LPHQVLRQLQJDQGWROHUDQFLQJSHU$60(<0
%6& %DVLF'LPHQVLRQ7KHRUHWLFDOO\H[DFWYDOXHVKRZQZLWKRXWWROHUDQFHV
5() 5HIHUHQFH'LPHQVLRQXVXDOO\ZLWKRXWWROHUDQFHIRULQIRUPDWLRQSXUSRVHVRQO\
/HDG3ODVWLF4XDG)ODW1R/HDG3DFNDJH00±[[PP%RG\>4)16@
ZLWKPP&RQWDFW/HQJWK
1RWH )RUWKHPRVWFXUUHQWSDFNDJHGUDZLQJVSOHDVHVHHWKH0LFURFKLS3DFNDJLQJ6SHFLILFDWLRQORFDWHGDW
KWWSZZZPLFURFKLSFRPSDFNDJLQJ
44-Lead Plastic Quad Flat, No Lead Package (ML) – 8x8 mm Body [QFN]
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
D D2
EXPOSED
PAD
E2
b
2 2
1 1
N N K
NOTE 1 L
A3 A1
Units MILLIMETERS
Dimension Limits MIN NOM MAX
Number of Pins N 44
Pitch e 0.65 BSC
Overall Height A 0.80 0.90 1.00
Standoff A1 0.00 0.02 0.05
Contact Thickness A3 0.20 REF
Overall Width E 8.00 BSC
Exposed Pad Width E2 6.30 6.45 6.80
Overall Length D 8.00 BSC
Exposed Pad Length D2 6.30 6.45 6.80
Contact Width b 0.25 0.30 0.38
Contact Length L 0.30 0.40 0.50
Contact-to-Exposed Pad K 0.20 – –
Notes:
1. Pin 1 visual index feature may vary, but must be located within the hatched area.
2. Package is saw singulated.
3. Dimensioning and tolerancing per ASME Y14.5M.
BSC: Basic Dimension. Theoretically exact value shown without tolerances.
REF: Reference Dimension, usually without tolerance, for information purposes only.
/HDG3ODVWLF4XDG)ODW1R/HDG3DFNDJH0/±[PP%RG\>4)1@
1RWH )RUWKHPRVWFXUUHQWSDFNDJHGUDZLQJVSOHDVHVHHWKH0LFURFKLS3DFNDJLQJ6SHFLILFDWLRQORFDWHGDW
KWWSZZZPLFURFKLSFRPSDFNDJLQJ
44-Lead Plastic Thin Quad Flatpack (PT) – 10x10x1 mm Body, 2.00 mm Footprint [TQFP]
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
D
D1
E
e
E1
N
b
NOTE 1 1 2 3
NOTE 2
A α
c φ
β A1 A2
L L1
Units MILLIMETERS
Dimension Limits MIN NOM MAX
Number of Leads N 44
Lead Pitch e 0.80 BSC
Overall Height A – – 1.20
Molded Package Thickness A2 0.95 1.00 1.05
Standoff A1 0.05 – 0.15
Foot Length L 0.45 0.60 0.75
Footprint L1 1.00 REF
Foot Angle φ 0° 3.5° 7°
Overall Width E 12.00 BSC
Overall Length D 12.00 BSC
Molded Package Width E1 10.00 BSC
Molded Package Length D1 10.00 BSC
Lead Thickness c 0.09 – 0.20
Lead Width b 0.30 0.37 0.45
Mold Draft Angle Top α 11° 12° 13°
Mold Draft Angle Bottom β 11° 12° 13°
Notes:
1. Pin 1 visual index feature may vary, but must be located within the hatched area.
2. Chamfers at corners are optional; size may vary.
3. Dimensions D1 and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed 0.25 mm per side.
4. Dimensioning and tolerancing per ASME Y14.5M.
BSC: Basic Dimension. Theoretically exact value shown without tolerances.
REF: Reference Dimension, usually without tolerance, for information purposes only.
Microchip Technology Drawing C04-076B
Note: For the most current package drawings, please see the Microchip Packaging Specification located at
http://www.microchip.com/packaging
Added Note 1 to all pin diagrams, which references RPn pin usage by
remappable peripherals (see “Pin Diagrams”).
Section 1.0 “Device Overview” Changed PORTA pin name from RA15 to RA10 (see Table 1-1).
Section 4.0 “Memory Organization” Added SFR definitions (ACCAL, ACCAH, ACCAU, ACCBL, ACCBH, and
ACCBU) to the CPU Core Register Map (see Table 4-1).
Updated Reset values for the following SFRs: IPC1, IPC3-IPC5, IPC7,
IPC16, and INTTREG (see Table 4-4).
Updated all SFR names in QEI1 Register Map (see Table 4-10).
Updated the bit range for AD1CON3 from ADCS<5:0> to ADCS<7:0>) (see
Table 4-14 and Table 4-15).
Updated the Reset value for CLKDIV in the System Control Register Map
(see Table 4-23).
Section 6.0 “Resets” Entire section was replaced to maintain consistency with other dsPIC33F
data sheets.
Section 8.0 “Oscillator Removed the first sentence of the third clock source item (External Clock) in
Configuration” Section 8.1.1.2 “Primary”.
Updated the default bit values for DOZE and FRCDIV in the Clock Divisor
Register (see Register 8-2).
Added the center frequency in the OSCTUN register for the FRC Tuning bits
(TUN<5:0>) value 011111 and updated the center frequency for bits value
011110 (see Register 8-4).
Section 9.0 “Power-Saving Added the following two registers:
Features”
• PMD1: Peripheral Module Disable Control Register 1
• PMD2: Peripheral Module Disable Control Register 2
• PMD3: Peripheral Module Disable Control Register 3
Section 10.0 “I/O Ports” Added paragraph and Table 10-1 to Section 10.2 “Open-Drain
Configuration”, which provides details on I/O pins and their functionality.
Removed the following sections, which are now available in the related
section of the dsPIC33F/PIC24H Family Reference Manual:
• 16.1 “Interrupts”
• 16.2 “Receive Operations”
• 16.3 “Transmit Operations”
• 16.4 “SPI Setup” (retained Figure 17-1: SPI Module Block Diagram)
Removed IrDA references and Note 1, and updated the bit and bit value
descriptions for UTXINV (UxSTA<14>) in the UARTx Status and Control
Register (see Register 19-2).
Section 20.0 “10-bit/12-bit Removed Equation 19-1: ADC Conversion Clock Period and Figure 19-2:
Analog-to-Digital Converter (ADC)” ADC Transfer Function (10-Bit Example).
Added Note 2 to Figure 20-3: ADC Conversion Clock Period Block Diagram.
Updated ADC Conversion Clock Select bits in the AD1CON3 register from
ADCS<5:0> to ADCS<7:0>. Any references to these bits have also been
updated throughout this data sheet (Register 20-3).
Added FICD register content (BKBUG, COE, JTAGEN, and ICS<1:0> to the
dsPIC33FJ32MC202/204 and dsPIC33FJ16MC304 Configuration Bits
Description (see Table 21-2).
Removed the words “if enabled” from the second sentence in the fifth
paragraph of Section 21.3 “BOR: Brown-out Reset”.
Section 24.0 “Electrical Updated Max MIPS value for -40ºC to +125ºC temperature range in
Characteristics” Operating MIPS vs. Voltage (see Table 24-1).
Added Note 4 (reference to new table containing digital-only and analog pin
information to I/O Pin Input Specifications (see Table 24-4).
Updated Typ, Min and Max values for Program Memory parameters D136,
D137 and D138 (see Table 24-12).
Updated Max value for Internal RC Accuracy parameter F21 for -40°C ≤TA ≤
+125°C condition and added Note 2 (see Table 24-19).
Removed all values for Reset, Watchdog Timer, Oscillator Start-up Timer,
and Power-up Timer parameter SY20 and updated conditions, which now
refers to Section 21.4 “Watchdog Timer (WDT)” and LPRC parameter
F21a (see Table 24-21).
Updated Min and Typ values for parameters AD60, AD61, AD62 and AD63
and removed Note 3 (see Table 24-41).
Updated Min and Typ values for parameters AD60, AD61, AD62 and AD63
and removed Note 3 (see Table 24-42).
Updated typical values for Operating Current (IDD) and added Note 3 in
Table 24-5.
Updated typical and maximum values for Idle Current (IIDLE): Core OFF
Clock ON Base Current and added Note 3 in Table 24-6.
Updated typical and maximum values for Power Down Current (IPD) and
added Note 5 in Table 24-7.
Updated typical and maximum values for Doze Current (IDOZE) and added
Note 2 in Table 24-8.
Updated typical value for parameter AD08 (ADC in operation) and added
Notes 2 and 3 in Table 24-38.
Updated the Min value for parameter DI35 (see Table 24-20).
All Resets values for the following SFRs in the Timer Register Map
were changed (see Table 4-5):
• TMR1
• TMR2
• TMR3
Section 8.0 “Oscillator Configuration” Added Note 3 to the OSCCON: Oscillator Control Register (see
Register 8-1).
Updated all SPI specifications (see Table 24-32 through Table 24-39
and Figure 24-14 through Figure 24-21).
AD1CSSL (ADC1 Input Scan Select Low)................ 210 T1CON (Timer1 Control) .......................................... 145
AD1PCFGL (ADC1 Port Configuration Low) ............ 210 T2CON Control)........................................................ 149
CLKDIV (Clock Divisor)............................................. 107 T3CON Control......................................................... 150
CORCON (Core Control) ...................................... 23, 75 UxMODE (UARTx Mode) ......................................... 195
DFLTCON (QEI Control)........................................... 177 UxSTA (UARTx Status and Control) ........................ 197
I2CxCON (I2Cx Control) ........................................... 188 Reset
I2CxMSK (I2Cx Slave Mode Address Mask) ............ 192 Illegal Opcode....................................................... 61, 69
I2CxSTAT (I2Cx Status) ........................................... 190 Trap Conflict ......................................................... 68, 69
ICxCON (Input Capture x Control) ............................ 153 Uninitialized W Register ....................................... 61, 69
IEC0 (Interrupt Enable Control 0) ............................... 84 Reset Sequence ................................................................. 71
IEC1 (Interrupt Enable Control 1) ............................... 86 Resets ................................................................................ 61
IEC3 (Interrupt Enable Control 3) ............................... 87
IEC4 (Interrupt Enable Control 4) ............................... 88 S
IFS0 (Interrupt Flag Status 0) ..................................... 79 Serial Peripheral Interface (SPI) ....................................... 179
IFS1 (Interrupt Flag Status 1) ..................................... 81 Software Reset Instruction (SWR)...................................... 68
IFS3 (Interrupt Flag Status 3) ..................................... 82 Software Simulator (MPLAB SIM) .................................... 229
IFS4 (Interrupt Flag Status 4) ..................................... 83 Software Stack Pointer, Frame Pointer
INTCON1 (Interrupt Control 1).................................... 76 CALLL Stack Frame ................................................... 46
INTCON2 (Interrupt Control 2).................................... 78 Special Features of the CPU ............................................ 211
INTTREG Interrupt Control and Status Register......... 99 SPI Module
IPC0 (Interrupt Priority Control 0) ............................... 89 SPI1 Register Map ..................................................... 39
IPC1 (Interrupt Priority Control 1) ............................... 90 Symbols Used in Opcode Descriptions ............................ 220
IPC14 (Interrupt Priority Control 14) ........................... 96 System Control
IPC15 (Interrupt Priority Control 15) ........................... 97 Register Map .............................................................. 44
IPC16 (Interrupt Priority Control 16) ........................... 97
IPC18 (Interrupt Priority Control 18) ........................... 98
T
IPC2 (Interrupt Priority Control 2) ............................... 91 Temperature and Voltage Specifications
IPC3 (Interrupt Priority Control 3) ............................... 92 AC..................................................................... 244, 285
IPC4 (Interrupt Priority Control 4) ............................... 93 Timer1 .............................................................................. 143
IPC5 (Interrupt Priority Control 5) ............................... 94 Timer2/3 ........................................................................... 147
IPC7 (Interrupt Priority Control 7) ............................... 95 Timing Characteristics
NVMCON (Flash Memory Control) ............................. 57 CLKO and I/O ........................................................... 247
NVMKEY (Nonvolatile Memory Key) .......................... 58 Timing Diagrams
OCxCON (Output Compare x Control) ..................... 158 10-bit ADC Conversion (CHPS<1:0> = 01, SIMSAM = 0,
OSCCON (Oscillator Control) ................................... 105 ASAM = 0, SSRC<2:0> = 000)......................... 278
OSCTUN (FRC Oscillator Tuning) ............................ 109 10-bit ADC Conversion (CHPS<1:0> = 01, SIMSAM = 0,
P1DC2 (PWM Duty Cycle 2)..................................... 172 ASAM = 1, SSRC<2:0> = 111,
P1DC3 (PWM Duty Cycle 3)..................................... 172 SAMC<4:0> = 00001)....................................... 278
PDC1 (PWM Duty Cycle 1)....................................... 172 12-bit ADC Conversion (ASAM = 0,
PLLFBD (PLL Feedback Divisor).............................. 108 SSRC<2:0> = 000) ........................................... 277
PMD1 (Peripheral Module Disable Control Brown-out Situations .................................................. 68
Register 1) ........................................................ 114 External Clock .......................................................... 245
PMD1 (Peripheral Module Disable Control Register 1) .. I2Cx Bus Data (Master Mode) .................................. 270
114 I2Cx Bus Data (Slave Mode) .................................... 272
PMD2 (Peripheral Module Disable Control I2Cx Bus Start/Stop Bits (Master Mode)................... 270
Register 2) ........................................................ 115 I2Cx Bus Start/Stop Bits (Slave Mode)..................... 272
PMD3 (Peripheral Module Disable Control Input Capture (CAPx) ............................................... 253
Register 3) ........................................................ 116 Motor Control PWM .................................................. 255
PMD3 (Peripheral Module Disable Control Register 3) .. Motor Control PWM Fault ......................................... 255
116 OC/PWM .................................................................. 254
PTCON (PWM Time Base Control) .......................... 163 Output Compare (OCx) ............................................ 253
PTMR (PWM Timer Count Value)............................. 164 QEA/QEB Input ........................................................ 256
PTPER (PWM Time Base Period) ............................ 164 QEI Module Index Pulse........................................... 257
PWMxCON1 (PWM Control 1).................................. 166 Reset, Watchdog Timer, Oscillator Start-up Timer
PWMxCON2 (PWM Control 2).................................. 167 and Power-up Timer ......................................... 248
PxDTCON1 (Dead-Time Control 1) .......................... 168 Timer1, 2, 3 External Clock ...................................... 250
PxDTCON2 (Dead-Time Control 2) .......................... 169 TimerQ (QEI Module) External Clock ....................... 252
PxFLTACON (Fault A Control).................................. 170 Timing Requirements
PxOVDCON (Override Control) ................................ 171 ADC Conversion (10-bit mode) ................................ 290
PxSECMP (Special Event Compare)........................ 165 ADC Conversion (12-bit Mode) ................................ 290
QEICON (QEI Control).............................................. 175 CLKO and I/O ........................................................... 247
RCON (Reset Control) ................................................ 63 External Clock .......................................................... 245
SPIxCON1 (SPIx Control 1)...................................... 182 Input Capture............................................................ 253
SPIxCON2 (SPIx Control 2)...................................... 184 SPIx Master Mode (CKE = 0) ................................... 286
SPIxSTAT (SPIx Status and Control) ....................... 181 SPIx Module Master Mode (CKE = 1) ...................... 286
SR (CPU Status)................................................... 21, 75 SPIx Module Slave Mode (CKE = 0) ........................ 287
SPIx Module Slave Mode (CKE = 1)......................... 287 Timer3 External Clock Requirements ....................... 251
Timing Specifications
10-bit ADC Conversion Requirements ...................... 279 U
12-bit ADC Conversion Requirements ...................... 277 UART Module
I2Cx Bus Data Requirements (Master Mode) ........... 271 UART1 Register Map.................................................. 39
I2Cx Bus Data Requirements (Slave Mode) ............. 273 Universal Asynchronous Receiver Transmitter (UART) ... 193
Motor Control PWM Requirements ........................... 255 Using the RCON Status Bits............................................... 69
Output Compare Requirements ................................ 253
PLL Clock.......................................................... 246, 285
V
QEI External Clock Requirements ............................ 252 Voltage Regulator (On-Chip) ............................................ 215
QEI Index Pulse Requirements................................. 257
W
Quadrature Decoder Requirements .......................... 256
Reset, Watchdog Timer, Oscillator Start-up Timer, Watchdog Time-out Reset (WDTR).................................... 68
Power-up Timer and Brown-out Watchdog Timer (WDT)............................................ 211, 216
Reset Requirements ......................................... 249 Programming Considerations ................................... 216
Simple OC/PWM Mode Requirements ..................... 254 WWW Address ................................................................. 325
Timer1 External Clock Requirements ....................... 250 WWW, On-Line Support ....................................................... 7
Timer2 External Clock Requirements ....................... 251
From: Name
Company
Address
City / State / ZIP / Country
Telephone: (_______) _________ - _________ FAX: (______) _________ - _________
Application (optional):
Would you like a reply? Y N
Questions:
2. How does this document meet your hardware and software development needs?
3. Do you find the organization of this document easy to follow? If not, why?
4. What additions to the document do you think would enhance the structure and subject?
5. What deletions from the document could be made without affecting the overall usefulness?
• Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
• There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
• Microchip is willing to work with the customer who is concerned about the integrity of their code.
• Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
ISBN: 978-1-62076-335-3