数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

D301 数据表(PDF) 56 Page - Microchip Technology

部件名 D301
功能描述  16-Bit General Purpose Microcontrollers with 256-Kbyte Flash and 16-Kbyte RAM in Low Pin Count Packages
PDF  416 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  MICROCHIP [Microchip Technology]
网页  http://www.microchip.com
标志 MICROCHIP - Microchip Technology

D301 数据表(HTML) 56 Page - Microchip Technology

Back Button D301 Datasheet HTML 52Page - Microchip Technology D301 Datasheet HTML 53Page - Microchip Technology D301 Datasheet HTML 54Page - Microchip Technology D301 Datasheet HTML 55Page - Microchip Technology D301 Datasheet HTML 56Page - Microchip Technology D301 Datasheet HTML 57Page - Microchip Technology D301 Datasheet HTML 58Page - Microchip Technology D301 Datasheet HTML 59Page - Microchip Technology D301 Datasheet HTML 60Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 56 / 416 page
background image
PIC24FJ256GA705 FAMILY
DS30010118D-page 56
 2016-2018 Microchip Technology Inc.
4.2.5.2
Data Write into EDS
In order to write data to EDS, 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 registers. 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-5 illustrates how the EDS address is generated
for write operations.
When the MSbs of EA are ‘1’, the lower nine 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
double word to EDS.
The Data Space Page registers (DSRPAG/DSWPAG)
do not update automatically while crossing a page
boundary when the rollover happens from 0xFFFF to
0x8000. While developing code in assembly, care must
be taken to update the Data Space 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.
FIGURE 4-5:
EDS ADDRESS GENERATION FOR WRITE OPERATIONS
EXAMPLE 4-2:
EDS WRITE CODE IN ASSEMBLY
Note 1: All write operations to EDS are executed
in a single cycle.
2: Use of Read/Modify/Write operation on
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.
3: Use
the
DSRPAG
register
while
performing Read/Modify/Write operations.
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



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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