MA240029 Microchip Technology, MA240029 Datasheet - Page 67

no-image

MA240029

Manufacturer Part Number
MA240029
Description
Daughter Cards & OEM Boards PIC24FJ128GA310 Gen Purpose PIM
Manufacturer
Microchip Technology
Datasheet

Specifications of MA240029

Rohs
yes
Product
Daughter Cards
Core
PIC
Description/function
Plug-in module
Interface Type
I2C, SPI
Tool Is For Evaluation Of
PIC24FJ128GA310
For Use With
Explorer 16 Development Board

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
MA240029
Manufacturer:
MICROCHIP
Quantity:
12 000
4.2.5.2
In order to write data to EDS space, such as in EDS
reads, an Address Pointer is set up by loading the
required EDS page number into the DSWPAG register,
and assigning the offset address to one of the W regis-
ters. Once the above assignment is done, then the
EDS window is enabled by setting bit 15 of the working
register, assigned with the offset address, and the
accessed location can be written.
Figure 4-2
generated for write operations.
When the MSBs of EA are ‘1’, the lower 9 bits of
DSWPAG are concatenated to the lower 15 bits of EA
to form a 24-bit EDS address for write operations.
Example 4-2
double-word to EDS.
The Page registers (DSRPAG/DSWPAG) do not
update automatically while crossing a page boundary,
when the rollover happens from 0xFFFF to 0x8000.
FIGURE 4-6:
EXAMPLE 4-2:
 2010-2011 Microchip Technology Inc.
; Set the EDS page where the data to be written
;Write a byte to the selected location
;Write a word to the selected location
;Write a Double - word to the selected location
mov
mov
mov
bset
mov
mov
mov.b
mov.b
mov
mov
mov
mov
mov.d
illustrates how the EDS space address is
Data Write into EDS
shows how to write a byte, word and
#0x0002 , w0
w0 , DSWPAG
#0x0800 ,
w1 , #15
#0x00A5 , w2
#0x003C , w3
w2 , [w1++]
w3 , [w1++]
#0x1234
w2 , [w1]
#0x1122 , w2
#0x4455 , w3
w2 , [w1]
8
EDS ADDRESS GENERATION FOR WRITE OPERATIONS
EDS WRITE CODE IN ASSEMBLY
, w2
DSWPAG Reg
w1
9 Bits
;page 2 is selected for write
;select the location (0x800) to be written
;set the MSB of the base address, enable EDS mode
;write Low byte
;write High byte
;
;
;2 EDS writes
Select
0
1
PIC24FJ128GA310 FAMILY
24-Bit EA
While developing code in assembly, care must be taken
to update the page registers when an Address Pointer
crosses the page boundary. The ‘C’ compiler keeps
track of the addressing, and increments or decrements
the Page registers accordingly while accessing
contiguous data memory locations.
Wn
Note 1: All write operations to EDS are executed
15 Bits
2: Use of Read/Modify/Write operation on
3: Use
performing Read/Modify/Write operations.
in a single cycle.
any EDS location under a REPEAT
instruction is not supported. For example,
BCLR, BSW, BTG, RLC f, RLNC f,
RRC f, RRNC f, ADD f, SUB f,
SUBR f, AND f, IOR f, XOR f,
ASR f, ASL f.
Wn<0> is Byte Select
the
DSRPAG
DS39996F-page 67
register
while

Related parts for MA240029