Maxim-integrated MAXQ622 Manual do Utilizador Página 53

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 255
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 52
MAXQ612/MAXQ622 Users Guide
Maxim Integrated 3-17
the current WBSn selection. Data pointer increment and decrement operations only affect those bits specific to the
current word- or byte-addressing mode (e.g., incrementing a byte-mode data pointer from FFFFh does not carry into
the internal high-order bit that is used only for word-mode data-pointer access). Switching from byte- to word-access
mode or vice versa does not alter the data pointer contents. Therefore, it is important to maintain the consistency of
data-pointer address value within the given access mode.
move DPC, #0 ; DP[0] in byte mode
move DP[0], #2345h ; DP[0]=2345h (byte mode)
; internal bits 15:0 loaded
move DPC, #4 ; DP[0] in word mode
move DP[0], #2345h ; DP[0]=2345h (word mode)
; internal bits 16:1 loaded
move DPC, #0 ; DP[0] in byte mode
move GR, DP[0] ; GR = 468Bh (looking at bits 15:0)
3.9.2 Data Pointer Activation
The three pointers share a single read/write port on the data memory and, thus, the user must knowingly activate
a desired pointer before using it for data memory read operations. This can be done explicitly using the data-
pointer select bits (SDPS[1:]0; DPC[1:0]) or implicitly by writing to the DP[n], BP, or OFFS register, as shown below.
Additionally, any write operation sets the SDPS bits, thereby activating the write pointer as the active source pointer.
move DPC, #2 ; (explicit) selection of FP as the pointer
move DP[0], src ; (implicit) selection of DP[0]; set SDPS1:0=00b
move DP[1], DP[1] ; (implicit) selection of DP[1]; set SDPS1:0=01b
move OFFS, src ; (implicit) selection of FP; set SDPS1=1
Once the pointer selection has been made, it remains in effect until:
The source data-pointer select bits are changed through the explicit or implicit methods described above (i.e.,
another data pointer is selected for use)
The memory to which the active source data pointer is addressing is enabled for code fetching using the instruction
pointer, or
• A data-memory write operation sets the SDPS and activates the pointer used for writing as the active source pointer.
move DP[1], DP[1] ; select DP[1] as the active pointer
move dst, @DP[1] ; read from pointer
move @DP[1], src ; write using a data pointer
; DP[0] is needed
move DP[0], DP[0] ; select DP[0] as the active pointer
To simplify data pointer increment/decrement operations without disturbing register data, a virtual NUL destination has
been assigned to system module 6, subindex 7 to serve as a “bit bucket.” Data-pointer increment/decrement opera-
tions can be done as follows without altering the contents of any other register:
move NUL, @DP[0]++ ; increment DP[0]
move NUL, @DP[0]-- ; decrement DP[0]
The following data-pointer-related instructions are invalid:
move @++DP[0], @DP[0]++
move @++DP[1], @DP[1]++
move @BP[++Offs], @BP[Offs++]
move @--DP[0], @DP[0]--
Vista de página 52
1 2 ... 48 49 50 51 52 53 54 55 56 57 58 ... 254 255

Comentários a estes Manuais

Sem comentários