HD6412240 RENESAS [Renesas Technology Corp], HD6412240 Datasheet - Page 109

no-image

HD6412240

Manufacturer Part Number
HD6412240
Description
Renesas 16-Bit Single-Chip Microcomputer H8S Family / H8S/2200 Series
Manufacturer
RENESAS [Renesas Technology Corp]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
HD6412240FA13
Manufacturer:
HITACHI
Quantity:
8 831
Part Number:
HD6412240FA13V
Manufacturer:
HITACHI/日立
Quantity:
20 000
Part Number:
HD6412240FA20
Manufacturer:
HITACHI
Quantity:
12 388
Part Number:
HD6412240FA20V
Manufacturer:
LT
Quantity:
3 220
Part Number:
HD6412240FA20V
Manufacturer:
RENESAS/瑞萨
Quantity:
20 000
Part Number:
HD6412240TE13
Manufacturer:
Renesas Electronics America
Quantity:
10 000
Part Number:
HD6412240TE13
Quantity:
33
Part Number:
HD6412240TE13V
Manufacturer:
RENESAS
Quantity:
15 090
Part Number:
HD6412240TE13V
Manufacturer:
RENESAS
Quantity:
1 000
Part Number:
HD6412240TE13V
Manufacturer:
RENESAS/瑞萨
Quantity:
20 000
The BSET, BCLR, BNOT, BST, and BIST instructions perform their operations in the following
order.
1. Read the data in byte units
2. Perform the bit manipulation operation according to the instruction on the data read
3.
Example: Using the BCLR instruction to clear only bit 4 in the port 1 P1DDR register.
The P1DDR register consists of 8 write-only bits and sets the I/O direction of the port 1 pins.
Reading this register is invalid. When read, the values returned are undefined.
Here we present an example in which P14 is specified to be an input port using the BCLR
instruction. Currently, P17 to P14 are set to be output pins and P13 to P10 are set to be input pins.
At this point, the value of P1DDR is H'F0.
To switch P14 from the Output pin to the input pin function, the value of P1DDR bit 4 must be
changed from 1 to 0 (H'F0
P1DDR bit 4.
BCLR
However if a bit manipulation instruction of the type shown above is used on P1DDR, which is a
write-only register, the following problem may occur.
Although the first thing that happens is that data is read from P1DDR in byte units, the value read
at this time is undefined. An undefined value is a value that is either 0 or 1 in the register but reads
out as an arbitrary value whose relationship to the actual value is unknown. Since the P1DDR bits
are all write-only bits, every bit reads out as an undefined value. Although the actual value of
P1DDR at this point is H'F0, assume that bit 3 becomes a 1 here, and the value read out is H'F8.
I/O
P1DDR
I/O
P1DDR
Read value
Write the data back in byte units
#4,@P1DDR
Output
Output
P17
P17
1
1
1
Output
Output
P16
P16
H'E0). Here we assume that the BCLR instruction is used to clear
1
1
1
Output
Output
P15
P15
1
1
1
Output
Output
P14
P14
1
1
1
Rev.3.00 Mar. 26, 2007 Page 67 of 772
Input
Input
P13
P13
0
0
1
Input
Input
P12
P12
0
0
0
REJ09B0355-0300
Input
Input
P11
P11
Section 2 CPU
0
0
0
Input
Input
P10
P10
0
0
0

Related parts for HD6412240