DF2211NP24V Renesas Technology / Hitachi Semiconductor, DF2211NP24V Datasheet - Page 123

no-image

DF2211NP24V

Manufacturer Part Number
DF2211NP24V
Description
H8S/2200 Series, 2212 Group, USB, RTC, HSS TNP-64B; Vcc= 2.7 to 3.6 volts, Temp= -20 to 75 C; Package: PVQN0064LB-A
Manufacturer
Renesas Technology / Hitachi Semiconductor
Datasheet
In order to write to a register containing write-only bits, set aside a work area in memory (in on-
chip RAM, for example) and write the data to be manipulated to it. After accessing and
manipulating the data in the work area in memory, write the resulting data to the register
containing write-only bits.
Figure 2.14 Example Flowchart of Method for Accessing Registers Containing Write-Only Bits
Example: Clearing pin 14 only of P1DDR for port 1
P1DDR is an 8-bit register that contains write-only bits. It is used to specify the I/O setting of the
individual pins in port 1. Reading produces invalid data. Attempting to read from P1DDR returns
undefined values.
In this example, the BCLR instruction is used to set pin 14 as an input port. To start, the initial
value H'F0 to be written to P1DDR is written ahead of time to the work area (RAM0) in memory.
MOV.B
MOV.B
MOV.B
Figure 2.14 Flowchart of Method for Accessing Registers Containing Write-Only Bits
(using either data transfer instructions
#H'F0, R0L
R0L,
R0L,
register containing write-only bits
register containing write-only bits
or bit manipulation instructions)
Write data from work area to
Write data from work area to
Access data in work area
Write data to work area
@RAM0
@P1DDR
Rev.7.00 Dec. 24, 2008 Page 69 of 698
Write initial value
Change value of register containing
write-only bits
REJ09B0074-0700

Related parts for DF2211NP24V