h8s-2158 Renesas Electronics Corporation., h8s-2158 Datasheet - Page 104

no-image

h8s-2158

Manufacturer Part Number
h8s-2158
Description
Renesas 16-bit Single-chip Microcomputer H8s Family/h8s/2100 Series
Manufacturer
Renesas Electronics Corporation.
Datasheet
Section 2 CPU
2.9
2.9.1
The TAS instruction is not generated by the Renesas H8S and H8/300 series C/C++ compilers.
The TAS instruction can be used as a user-defined intrinsic function.
2.9.2
The BSET, BCLR, BNOT, BST, and BIST instructions read data from the specified address in
byte units, manipulate the data of the target bit, and write data to the same address again in byte
units. Special care is required when using these instructions in cases where a register containing a
write-only bit is used or a bit is directly manipulated for a port, because this may rewrite data of a
bit other than the bit to be manipulated.
Example: The BCLR instruction is executed for DDR in port 4.
P47 and P46 are input pins, with a low-level signal input at P47 and a high-level signal input at
P46. P45 to P40 are output pins and output low-level signals. The following shows an example in
which P40 is set to be an input pin with the BCLR instruction.
Prior to executing BCLR
Rev. 3.00 Jan 25, 2006 page 52 of 872
REJ09B0286-0300
Input/output
Pin state
DDR
DR
Usage Notes
Note on TAS Instruction Usage
Note on Bit Manipulation Instructions
P47
Input
Low
level
0
1
P46
Input
High
level
0
0
P45
Output
Low
level
1
0
P44
Output
Low
level
1
0
P43
Output
Low
level
1
0
P42
Output
Low
level
1
0
P41
Output
Low
level
1
0
P40
Output
Low
level
1
0

Related parts for h8s-2158