Download Print this page

Texas Instruments SimpleLink CC2620 Technical Reference Manual page 1196

Zigbee rf4ce wireless mcu simplelink cc13 series; simplelink cc26 series

Advertisement

Modules
17.4.1.5.2 I/O Access
For the sensor controller to access the other peripherals in AUX_PD (address range 0x400C 0000 to
0x400C FFFF), it must use the input and output instructions (in and out), using only the 16 lowest bits of
the 32-bit address.
Input and output instructions transfer data between an integer register and a peripheral register, the
address of which is determined by the current addressing mode.
Table 17-4
lists the input and output instructions available.
Syntax
Description
in Rd,[#addr]
Input direct
in Rd,(Rs)
Input indirect
out Rd,[#addr]
Output direct
out Rd,(Rs)
Output indirect
(1)
Flags: Zero (Z), Negative (N), Carry (C), and Overflow (V)
For instructions using direct peripheral register addressing, an 8-bit address is embedded in the instruction
supporting direct access to 256 I/O ports in the range 0 to 255. Using the prefix instruction, the direct I/O
address can be extended to 16. 16-bit addressing of I/O is also possible using indirect addressing.
17.4.1.5.3 I/O Bit Access
In addition to reading and writing I/O ports using the input and output instructions, individual bits in the I/O
ports can be directly set, cleared, and tested using single instructions. This allows very fast and code-
efficient implementation of common bit-manipulation functions without requiring the use of internal
registers.
Table 17-5
lists the input and output instructions available.
Syntax
iobclr #imm,[#addr]
iobset #imm,[#addr]
iobtst #imm,[#addr]
(1)
Flags: Zero (Z), Negative (N), Carry (C), and Overflow (V)
The clear and set instructions first perform an input operation from the addressed register, then modify the
selected bit only and output the resulting new value to the same register.
Note that it is only possible to select bits 0 to 7 in a register using the 3-bit immediate value encoded in
the instructions.
Because the instructions use only direct register addressing, an 8-bit address is embedded in the
instruction supporting direct access to 256 registers in the range 0 to 255. Using the prefix instruction, the
direct register address can be extended to 16-bit.
1196
AUX – Sensor Controller with Digital and Analog Peripherals
Table 17-4. Input and Output Instructions
Operation
Rd = reg[addr]
Rd = reg[Rs]
reg[addr] = Rd
reg[rs] = Rd
Table 17-5. Input and Output Instructions
Description
Operation
I/O Bit Clear direct
reg[addr] &= ~2^imm
I/O Bit Set direct
reg[addr] |= 2^imm
I/O Bit Test direct
reg[addr] & 2^imm
Copyright © 2015, Texas Instruments Incorporated
(1)
Z
N
(1)
Z
N
SWCU117C – February 2015 – Revised September 2015
Submit Documentation Feedback
www.ti.com
C
V
C
V
x

Hide quick links:

Advertisement

loading