| Electronic Components Datasheet Search |
|
PIC24FJ256DA206 Datasheet(PDF) 73 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC24FJ256DA206 Datasheet(HTML) 73 Page - Microchip Technology |
|
73 / 408 page ![]() 2010 Microchip Technology Inc. DS39969B-page 73 PIC24FJ256DA210 FAMILY 4.2.5.2 Data Write into EDS Space 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 illustrates how the EDS space address is generated for write operations. FIGURE 4-6: EDS ADDRESS GENERATION FOR WRITE OPERATIONS When the MSBs of EA is ‘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 shows how to write a byte, word and dou- ble-word to EDS. EXAMPLE 4-2: EDS WRITE CODE IN ASSEMBLY DSWPAG Reg Select Wn 8 15 Bits 9 Bits 24-Bit EA Wn<0> is Byte Select 1 0 ; Set the EDS page where the data to be written mov #0x0002 , w0 mov w0 , DSWPAG ;page 2 is selected for write mov #0x0800 , w1 ;select the location (0x800) to be written bset w1 , #15 ;set the MSB of the base address, enable EDS mode ;Write a byte to the selected location mov #0x00A5 , w2 mov #0x003C , w3 mov.b w2 , [w1++] ;write Low byte mov.b w3 , [w1++] ;write High byte ;Write a word to the selected location mov #0x1234 , w2 ; mov w2 , [w1] ; ;Write a Double - word to the selected location mov #0x1122 , w2 mov #0x4455 , w3 mov.d w2 , [w1] ;2 EDS writes |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |