12.07.2015 Views

Section 4. Program Memory - Microchip Taiwan

Section 4. Program Memory - Microchip Taiwan

Section 4. Program Memory - Microchip Taiwan

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

dsPIC33E/PIC24E Family Reference ManualFigure 4-11:<strong>Program</strong> Space Visibility Operation MSB AccessDSRPAG0x3A2<strong>Program</strong> SpaceSelect PSV AccessData SpaceDSRPAG = 10x0000DSRPAG15X DataSpaceEA16EA = 0EA = 1DSRPAG = 2'b11150x800015DSRPAG = 182323 15 00x5100000xFFFFHigh/Low Select0x517FFF0x0010Data Read<strong>4.</strong>5.2 PSV Mapping with X and Y Data SpaceThe Y data space is located outside the upper half of data space for most dsPIC33E/PIC24Evariants, such that the PSV area will map into X data space. The X and Y mapping affects theway PSV is used in algorithms.For example, the PSV mapping can be used to store coefficient data for Finite Impulse Response(FIR) filter algorithms. The FIR filter multiplies each value of a data buffer that contains historicalfilter input data with elements of a data buffer that contains constant filter coefficients. The FIRalgorithm is executed using the MAC instruction within a REPEAT loop. Each iteration of the MACinstruction prefetches one historical input value and one coefficient value to be multiplied in thenext iteration. One of the prefetched values must be located in X data memory space and theother must be located in Y data memory space.To satisfy the PSV mapping requirements for the FIR filter algorithm, the user application mustlocate the historical input data in the Y memory space, and the filter coefficients in X memoryspace.DS70613B-page 4-16© 2010 <strong>Microchip</strong> Technology Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!