tmp86ch47ug TOSHIBA Semiconductor CORPORATION, tmp86ch47ug Datasheet - Page 61

no-image

tmp86ch47ug

Manufacturer Part Number
tmp86ch47ug
Description
8 Bit Microcontroller Tlcs-870/c Series
Manufacturer
TOSHIBA Semiconductor CORPORATION
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
tmp86ch47ug-5JP0
Manufacturer:
TOSH
Quantity:
2 478
Part Number:
tmp86ch47ug-5JP0
Manufacturer:
TOSH
Quantity:
1 000
5.4 Port P3 (P37 to P30)
(000EH)
(0003H)
control. Port P3 is also used as an analog input. Input/output mode is specified by the corresponding bit in the port P3
input/output control register (P3CR), and AINDS (bit 4 in ADCCR1). During reset, P3CR are initialized to “0” and
AINDS is set to “1”, therefore port P3 is configured as an input.
“0”. When AINDS is “0”, the pin which is specified as an analog input is used as analog input independent on the
value of P3CR and P3DR.
“0”. and the data of port which is not selected as an analog input is read “0” or “1”, depend on the voltage level.
Data can be written into the output latch regardless of P3CR contents, therefore initial output data should be written
into the output latch before setting P3CR.
cuted to keep a precision. In addition, a variable signal should not be input to an adjacent port to the analog input
during AD conversion.
P3DR
P3CR
R/W
Port P3 is an 8-bit input/output port which can be configured as an input or an output in one-bit unit under software
When used as an analog input, set an analog input channel to SAIN (bit 0, 1, 2 in ADCCR1) and clear AINDS to
When used as an input port, the corresponding bit of P3CR is cleared to “0” without specifying as an analog input.
When the AD converter is enabled (AINDS is “0”), the data of port which is selected as an analog input is read
When used as an output port, the corresponding bit of P3CR is set to “1” without specifying as an analog input.
The pins not used as analog input can be used as an input/output port. But output instructions should not be exe-
Note: Ports set to the input mode read the pin states. Ports set to the output mode read the output latch. When input pin and out-
put pin exist in port P3 together, the contents of the output latch which is specified as an input mode may be rewritten by
executing the bit manipulation instructions.
AIN7
P37
P3CR
7
7
Data output (P3DR)
Data input (P3DR)
AIN6
P36
Analog input
P3CRi input
6
6
I/O control
(Specified for each bit)
OUTEN
AINDS
P3CRi
STOP
SAIN
AIN5
P35
5
5
Output latch
Output latch
AIN4
P34
4
4
D
D
Figure 5-5 Port 3
Q
Q
AIN3
P33
0: Input mode
1: Output mode
3
3
Page 51
AIN2
P32
2
2
AIN1
P31
1
1
AIN0
P30
0
0
(Initial value: 0000 0000)
(Initial value: 0000 0000)
P3i
Note: i = 7
to
0
TMP86C845UG
R/W

Related parts for tmp86ch47ug