
Maxim Integrated 2-8
MAX31782 User’s Guide
Revision 0; 8/11
2.4.3.2 Frame Pointer
The frame pointer (BP[OFFS]) is formed by the 16-bit unsigned addition of the 16-bit frame pointer base register (BP)
and the 8-bit frame pointer offset register (OFFS). The method the MAX31782 uses to access data using the frame
pointer is similar to the data pointers. When increments or decrements are used, only the value of OFFS is incremented
or decremented. The base pointer (BP) remains unaffected by increments or decrements of the OFFS register, includ-
ing when the OFFS register rolls over from FFh to 00h or from 00h to FFh. Following are examples of how to use the
frame pointer.
moveBP,#0100h ;setbasepointertoaddress100h
moveOFFS,#10h ;settheoffsetto10h,
moveAcc,@BP[OFFS] ;readdatafromlocation0110h
move@BP[OFFS],Acc ;writedatatolocation0110h
moveAcc,@BP[OFFS++] ;incrementOFFSafterread
moveAcc,@BP[OFFS++] ;decrementOFFSafterread
move@BP[++OFFS],Acc ;incrementOFFSbeforewrite
move@BP[--OFFS],Acc ;decrementOFFSbeforewrite
2.4.4 Data Memory Mapping
The MAX31782’s pseudo-Von Neumann memory map allows the MMU to read data from each of the three memory seg-
ments (flash, SRAM, utility ROM). The MMU can also write data directly to the SRAM memory segment. Data memory
can be written to the flash memory segment, but because writing to flash requires the use of the utility ROM routines,
this is not a direct access. The logical mapping of the three memory segments as data memory varies depending upon:
• from which memory segment instructions are currently being executed
• if data memory is being accessed in word or byte mode
In all cases, whichever memory segment is currently being used as program memory cannot be accessed as data
memory.
When the program is currently executing instructions from either the SRAM or utility ROM memory segments, the flash
memory is mapped to half the data memory space. If word access mode is selected, both pages (32KWords) can
be logically mapped to data memory space. If byte access mode is selected, only one page (32KB) can be logically
mapped to half of the data memory space. When operating in byte access mode, the selection of which flash page is
mapped into data memory space is determined by the code data access bit (CDA0):
The next three sections detail the mapping of the different memory segments as data memory depending upon from
which memory segment instructions are currently being executed.
CDA0 SELECTED PAGE IN BYTE MODE SELECTED PAGE IN WORD MODE
0 P0 P0 and P1
1 P1 P0 and P1
Comentários a estes Manuais