DSPIC30F
DSPIC30F
DSPIC30F
Brochage du DSPIC30F6014A
pendant que le processeur lit la prochaine instruction dans la mmoire programme, il excute l'actuelle qui manipule des donnes en RAM.
Architecture RISC 16-bit harvard modifie 80 Pin I/O (dspic30F6014A) 30(MIPS) CPU; Alimentation 2.5 to 5.5 V 84 instructions de base (76 instructions PIC + DSP) Le format des instructions est sur 24 (Le PC permet ainsi d'adresser jusqu' 4M x 24 bits de mmoire programme.) 16X16bits registres de travail (W0 W15) 1 compteur de programme 23 bits (Le PC permet ainsi
d'adresser jusqu' 4M x 24 bits de mmoire programme.)
1Multiplieur 17 bits
deux accumulateurs (ACCA et ACCB) de 40 bits: sauvegarde temporaire des rsultat de multiplication et addition de 2 registres de 16 bits.(MAC, nombres complexes. )
CAN (Controller Area Network), RAM 8192 Bytes 2 UART, 2 SPI, 1I2C Hardware RTC
ADC 12-bit 200(ksps) 16 canaux Bus de donnes sur 16bits (pour mmoire de donnes) Toutes les instructions du DSP sexcutent en un seul cycle sauf les instructions DO, BRA, Call, MOVD, les instructions de manipulation des tables (2cycles)et DIV(18 cycles)
Mcanisme dinterruption
Lorsquune interruption survient , les oprations suivantes sont effectues par le processeur:
3. Ladresse de la routine dexcution approprie est obtenue en chargeant le contenu dun vecteur dinterruption. 4. La routine dinterruption est excute. 5. A la fin de la routine dinterruption, le processeur reprend lexcution du programme suspendu. ladresse sauvegarde sur la pile.
Registres gnraux
W15=0x808
W15=0x806
bit 15 OA: Accumulator A Overflow Status bit 1 = Accumulator A overflowed 0 = Accumulator A has not overflowed bit 14 OB: Accumulator B Overflow Status bit 1 = Accumulator B overflowed 0 = Accumulator B has not overflowed bit 13 SA: Accumulator A Saturation Sticky Status bit 1 = Accumulator A is saturated or has been saturated at some time 0 = Accumulator A is not saturated
bit 12 SB: Accumulator B Saturation Sticky Status bit 1 = Accumulator B is saturated or has been saturated at some time 0 = Accumulator B is not saturated bit 11 OAB: OA || OB Combined Accumulator Overflow Status bit 1 = Accumulators A or B have overflowed 0 = Neither Accumulators A or B have overflowed bit 10 SAB: SA || SB Combined Accumulator Sticky Status bit 1 = Accumulators A or B are saturated or have been saturated at some time in the past 0 = Neither Accumulator A or B are saturated bit 9 DA: DO Loop Active bit 1 = DO loop in progress 0 = DO loop not in progress bit 8 DC: MCU ALU Half Carry/Borrow bit 1 = A carry-out from the 4th low order bit (for byte-sized data) or 8th low order bit (for word-sized data) of the result occurred 0 = No carry-out from the 4th low order bit (for byte-sized data) or 8th low order bit (for word-sized data) of the result occurred
bit 4 RA: REPEAT Loop Active bit 1 = REPEAT loop in progress 0 = REPEAT loop not in progress bit 3 N: MCU ALU Negative bit 1 = Result was negative 0 = Result was non-negative (zero or positive) bit 2 OV: MCU ALU Overflow bit utilis en complment 2. 1 = Overflow occurred for signed arithmetic (in this arithmetic operation) 0 = No overflow occurred bit 1 Z: MCU ALU Zero bit 1 = An operation which effects the Z bit has set it at some time in the past 0 = The most recent operation which effects the Z bit has cleared it (i.e., a non-zero result) bit 0 C: MCU ALU Carry/Borrow bit 1 = A carry-out from the Most Significant bit of the result occurred 0 = No carry-out from the Most Significant bit of the result occurred
Mmoire de donnes
Mmoire de programme
*30F6014A
*30F6014A
SFR (Special Function Register): ce bloc de 2Ko regroupe les registres du CPU (CentralProcess Unit) (travail, tat et pointeur de pile) et les registres de configuration des priphriques
X RAM et Y RAM: ces deux blocs sont contigus ; le CPU y lit et crit de faon classique mais le module DSP peut accder simultanment aux deux blocs en un seul cycle pour effectuer les oprations de type MAC (Multiply And Accumulate) Les instructions doivent commencer par les adresses paires Ex: MOV 0x1001, W2 est une erreur (charger le contenu de
01001ds W2)
Mmoire donnes: X AGU et Y AGU (Address Generation Units) ou units dlaboration dadresses ou systme gnrateur dadresses: Chaque zone mmoire X et Y possde son propre bus dadresses et de donnes. Ce qui rend possible laccs simultan ou en parallle 3 informations (une instruction et 2 donnes)
Y data bus
Round logic
MOV [W1], W2
MOV W0,W1 ; move contents of W0 to W1 MOV W0,[W1] ; move W0 to address contained in W1 ADD W0,[W4],W5 ; add contents of W0 to contents ;pointed by W4. Place result in W5. MOV WREG,0x0100 ; move contents of W0 to address 0x0100 ADD 0x0100,WREG ; add W0 to the word at address 0x0100, store in W0 ; WREG=W0 en assembleur DSPIC30F
2.2.8 TBLPAG Register The TBLPAG register is used to hold the upper 8 bits of a program memory address during table read and write operations. Table instructions are used to transfer data between program memory space and data memory space. 2.2.9 PSVPAG Register Program space visibility allows the user to map a 32 Kbyte section of the program memory space into the upper 32 Kbytes of data address space. This feature allows transparent access of constant data through dsPIC30F instructions that operate on data memory. The PSVPAG register selects the 32 Kbyte region of program memory space that is mapped to the data address space.
the Program Memory map includes configuration memory space, which can only be accessed using the table instructions. The Device Configuration Registers, which are used to configure basic parameters of device operation such as system clock source, are located in this address space.
The first 8 Kbytes of data space (i.e., all 2 Kbytes of SFRs and the first 6 Kbytes of dataRAM) are called Near RAM. This region of RAM can be accessed directly via file register instructions. Some instructions cannot directly access RAM that is not near and must use indirect addressing. The last 32 Kbytes of data RAM space are not implemented but can be mapped into program space for Program Space Visibility (PSV). PSV allows tables in program memory to be read as though they were in data RAM. (This feature can be quite useful for accessing DSP filter coefficients.)