tmp88cs38ng TOSHIBA Semiconductor CORPORATION, tmp88cs38ng Datasheet - Page 48

no-image

tmp88cs38ng

Manufacturer Part Number
tmp88cs38ng
Description
Cmos 8-bit Microcontroller
Manufacturer
TOSHIBA Semiconductor CORPORATION
Datasheet
P4
(00004H)
P4CR
(0000CH)
2.2.3
PWM
P47CR
Note 1: i = 7 to 0.
Note 2: P4CR cannot used the read-modify-write instructions.
P47
Port P4 (P47 to P40)
one-bit unit under software control. Input/output mode is specified by the corresponding bit
in the port P4 input/output control register (P4CR). Port P4 is configured as an input if its
corresponding P4CR bit is cleared to “0”, and as an output if its corresponding P4CR bit is
set to “1”. During reset, P4CR is initialized to “0”, which configures port P4 as an input. The
P4 output latches are also initialized to “1”. Data is written into the output latch regardless
of the P4CR contents. Therefore initial output data should be written into the output latch
before setting P4CR.
output pin, the output pins should be set to the output mode and beforehand the output
latch should be set to “1”.
Note: Input mode port is read the state of input pin. When input/output mode is used mixed,
7
7
P4CR
Port P4 is an 8-bit input/output port which can be configured as an input or an output in
Port P4 is also used as a pulse width modulation (PWM) output. When used as a PWM
7
(Bit manipulation instructions such as SET, CLR, etc. and logical operation such as AND, OR, etc.)
P46CR
PWM
the contents of output latch setting input mode may be changed by executing bit
manipulation instructions.
P46
6
6
6
I/O control for port P4
Data output
P45CR
PWM
Data input
P45
5
5
STOP
OUTEN
PWMi
P4iCR
5
P44CR
PWM
Figure 2.2.4 Port P4 and P4CR
P44
Output latch
4
4
4
D
P43CR
Q
PWM
P43
88CS38-48
3
3
3
0: Input mode
1: Output mode
P42CR
PWM
P42
2
2
2
P41CR
PWM
P41
1
1
1
P40CR
PWM
P40
0
0
0
TMP88CS38/CM38A/CP38A
P4i
(Initial value: 1111 1111)
(Initial value: 0000 0000)
2007-09-12
Write
only

Related parts for tmp88cs38ng