ST10R272L - SYSTEM PROGRAMMING
312/320
Note
The last entry in the table must be equal to the lowest signed integer (8000h).
18.7
Peripheral control and interface
All communication between peripherals and the CPU is performed either by PEC transfers to
and from internal memory, or by explicitly addressing the SFRs associated with the specific
peripherals. After resetting the ST10R272L, all peripherals (except the watchdog timer) are
disabled and initialized to default values. The required configuration of a specific peripheral
is programmed using MOV instructions of either constants or memory values to specific
SFRs. Specific control flags may be altered by bit instructions.
Once in operation, the peripheral operates autonomously until an end condition is reached,
then it requests a PEC transfer or a CPU service through an interrupt routine. Information
may be polled from peripherals through read accesses to SFRs or bit operations including
branch tests on specific control bits in SFRs. To ensure proper allocation of peripherals
among multiple tasks, a portion of the internal memory is bit addressable to allow user
semaphores. Instructions provide to lock-out tasks via software, by setting or clearing user
specific bits and conditionally branching based on these specific bits.
It is recommended that bit fields in control-SFRs are updated using the BFLDH and BFLDL
instructions or a MOV instruction, to avoid undesired intermediate modes of operation which
can occur when BCLR/BSET or AND/OR instruction sequences are used.
18.8
Floating point support
All floating point operations are performed using software. Standard multiple-precision
instructions are used to perform calculations on data types that exceed the size of the ALU.
Multiple-bit rotate and logic instructions can be used for masking and extracting of portions
of floating point numbers.
The following features decrease the floating point operation time.
The PRIOR instruction helps to normalize floating point numbers by indicating the position of
the first set bit in a GPR. This result can the be used to rotate the floating point result
accordingly.
An overflow (V) flag in the PSW helps to round the result of normalized floating point. This
flag is set when a ‘1’ is shifted out of the carry bit during shift right operations. The overflow
flag and the carry flag are then used to round the floating point result based on the required
rounding algorithm.
JMPR
cc_NET, LOO
; Test whether target is not found and
;the end of
t
able has not been reached
.
MOV
R0, #BASE
;Move table base into R0