M-V850E-IA4 Renesas Electronics America, M-V850E-IA4 Datasheet - Page 160

no-image

M-V850E-IA4

Manufacturer Part Number
M-V850E-IA4
Description
KIT EVAL V850E IA4 UPD70F3186
Manufacturer
Renesas Electronics America
Datasheets

Specifications of M-V850E-IA4

Lead Free Status / RoHS Status
Lead free / RoHS Compliant
4.7.2
of the output latch of an input port that is not subject to manipulation may be written in addition to the targeted bit.
158
P21 to P27
When a 1-bit manipulation instruction is executed on a port that provides both input and output functions, the value
Therefore, it is recommended to rewrite the output latch when switching a port from input mode to output mode.
<Example>
Port 2 latch
0
Cautions on bit manipulation instruction for port n register (Pn)
P20
0
0
When P20 pin is an output port, P21 to P27 pins are input ports (all pin statuses are high level), and
the value of the port latch is 00H, if the output of P20 pin is changed from low level to high level via
a bit manipulation instruction, the value of the port latch is FFH.
Explanation: The targets of writing to and reading from the Pn register of a port whose PMnm bit is
1 are the output latch and pin status, respectively.
A bit manipulation instruction is executed in the following order in the V850E/IA3 and V850E/IA4.
<1> The Pn register is read in 8-bit units.
<2> The targeted one bit is manipulated.
<3> The Pn register is written in 8-bit units.
In step <1>, the value of the output latch (0) of P20 pin, which is an output port, is read, while the
pin statuses of P21 to P27 pins, which are input ports, are read. If the pin statuses of P21 to P27
pins are high level at this time, the read value is FEH.
The value is changed to FFH by the manipulation in <2>.
FFH is written to the output latch by the manipulation in <3>.
0
Pin status: High level
Bit manipulation instruction for P20 bit
<1> P2 register is read in 8-bit units.
<2> Set (1) P20 bit.
<3> Write the results of <2> to the output latch of P2 register in 8-bit units.
Low-level output
0
Figure 4-27. Bit Manipulation Instruction (P20 Pin)
• In the case of P20, an output port, the value of the port latch (0) is read.
• In the case of P21 to P27, input ports, the pin status (1) is read.
0
0
CHAPTER 4 PORT FUNCTIONS
0
User’s Manual U16543EJ4V0UD
Bit manipulation
instruction
(set1 0, P2[r0])
is executed for
P20 bit.
P21 to P27
Port 2 latch
1
P20
1
1
1
Pin status: High level
High-level output
1
1
1
1

Related parts for M-V850E-IA4