
Appendix C
Page
41
Blue Chip Technology Ltd.
01270146.doc
Page 41
To convert from a LOGICAL address to a PHYSICAL address use the following
formula:
PHYSICAL ADDRESS = (SEGMENT * 16) + OFFSET
Most programming languages allow access to the SEGMENT and OFFSET
addresses of variables in memory. For example, in QUICK BASIC the
following commands can be used:
DIM dat%(1000)
seg = VARSEG(dat%)
offs = VARPTR(dat%)
In this example, the variables “seg” and “offs” would contain the SEGMENT
and OFFSET addresses of the array “dat%”. In order to pass this address to the
DMA controller the segment and offset values need to be converted into
DMAPAGE and DMAOFFSET addresses as follows:
PhyAdd = (seg * 16) + offs
DMAPAGE = (PhyAdd / 65536) AND 15
DMAOFFSET = PhyAdd AND 65535
DMA Limitations
The DMA controller is only capable of incrementing or decrementing the
DMAOFFSET address, the DMAPAGE value is fixed throughout the transfer.
This means that a maximum of 64K bytes can be transferred in one operation.
Summary of Contents for AOP-12D
Page 1: ...AOP 12D Multi Function Analogue Output Card User Manual...
Page 2: ......