HD6433640 HITACHI [Hitachi Semiconductor], HD6433640 Datasheet - Page 62

no-image

HD6433640

Manufacturer Part Number
HD6433640
Description
H8/3644 Series Hardware Manual
Manufacturer
HITACHI [Hitachi Semiconductor]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
HD6433640RA78H
Manufacturer:
HITACHI/日立
Quantity:
20 000
Part Number:
HD6433640RB90H
Manufacturer:
RENESAS/瑞萨
Quantity:
20 000
2.9.2
The BSET, BCLR, BNOT, BST, and BIST instructions read one byte of data, modify the data,
then write the data byte again. Special care is required when using these instructions in cases
where two registers are assigned to the same address, in the case of registers that include write-
only bits, and when the instruction accesses an I/O port.
Order of Operation
1
2
3
Bit Manipulation in Two Registers Assigned to the Same Address
Example 1: timer load register and timer counter
Figure 2.18 shows an example in which two timer registers share the same address. When a bit
manipulation instruction accesses the timer load register and timer counter of a reloadable timer,
since these two registers share the same address, the following operations take place.
Order of Operation
1
2
3
The timer counter is counting, so the value read is not necessarily the same as the value in the
timer load register. As a result, bits other than the intended bit in the timer load register may be
modified to the timer counter value.
52
Read
Modify
Write
Read
Modify
Write
Count clock
Notes on Bit Manipulation
Figure 2.18 Timer Configuration Example
Operation
Read byte data at the designated address
Modify a designated bit in the read data
Write the altered byte data to the designated address
Operation
Timer counter data is read (one byte)
The CPU modifies (sets or resets) the bit designated in the instruction
The altered byte data is written to the timer load register
Timer load register
Timer counter
Reload
R
W
Internal bus
R:
W:
Read
Write

Related parts for HD6433640