Page 4
© 2004 Microchip Technology Incorporated. All Rights Reserved. Introduction to the dsPIC30F Architecture (Part 2) 4
Basic Programmer’s Model
W Registers
General Purpose
Data Registers
or
Address Pointers
Stack Pointer
DSP OPERAND
Registers
DSP ADDRESS
Registers
DSP Accumulators
(40-bit)
ACCA
ACCB
Program Counter
(23-bit)
Status Register
0
W0
W1
W2
W3
W4
W5
W6
W7
W8
W9
W10
W11
W12
W13
W14
W15
DSP
Status
MCU
Status
15 0
0
15
01516313239
22
The basic programmer’s model of the dsPIC30F is shown here.
The dsPIC30F contains sixteen 16-bit general purpose working
registers W0 through W15, which are collectively known as W registers.
These registers may be used by the programmer for storing data or
they may be used as address pointers. Moreover, the W registers are
both byte and word accessible.
Some of the W registers, besides being usable as general purpose
registers, have some special functionality. For example, W15 is
designated as the Stack Pointer to support interrupts or subroutine
calls. W4 through W13 have some special roles to play when executing
the MAC instruction. Some of the W registers are shadowed to provide
a mechanism for fast context switching, for example, in a Real Time
Operating System.
Two 40-bit accumulators are provided primarily to support DSP
operations, but could be just as useful for general-purpose MCU
applications.
The 23-bit program counter can linearly address up to 4 million
instructions.
Lastly, a 16-bit status register provides feedback on the state of the
CPU, based on the result of various MCU and DSP operations.