EM6605 EM Microelectronic, EM6605 Datasheet - Page 12

no-image

EM6605

Manufacturer Part Number
EM6605
Description
4 bit Microcontroller
Manufacturer
EM Microelectronic
Datasheet
6.3. PortB
The EM6605 has one four bit general purpose I/O port. Each bit PB(0:3) can be separately configured by
software to be either input or output by writing to the corresponding bit of the CIOPortB control register.
The PortB register is used to read data when in input mode and to write data when in output mode. On
each terminal Pull-Up/Down resistor can be selected by metal option when input.
Input mode is set by writing 0 to the corresponding bit in the CIOPortB register. This results in a high
impedance state with the status of the pin being read from register PortB. Output mode is set by writing 1
to the corresponding bit in the CIOPortB register. Consequently the output terminal follows the status of
the bits in the PortB register. At initial RESET the CIOPortB register is set to 0, thus setting the port to an
input. Additionally, PB0 can also be used as a three tone buzzer output. For details see section 7.
6.4. PortB registers
Table 15.PortB input status register - PortB
Table 16.PortB Input/Output control register - CIOportB
Figure 7.Port B
If metal mask option 5Y (Input blocked when Output) is used and the port is declared as the Output
(CIOPortB = 1111b) the real port information cannot be read directly. In this case no direct logic operations
(like AND PortB) on Output ports are possible. This logic operation can be made if an image of the Port saved
in the RAM which we store after on the output port. This is valid for PortB, PortC and PortD when declared as
output and the metal Option 5Y is used. In the case of metal option 5N selected direct logic operations on
output ports are possible.
If metal mask option 6Y (Output Hi-Z in SLEEP mode) the active Output will go Tristate when the circuit goes
into SLEEP mode. In the case of 6N output stay active also in the SLEEP mode.
© EM Microelectronic-Marin SA, 02/99, Rev. B/243
12
Bit
3
2
1
0
Bit
3
2
1
0
Name
PB3
PB2
PB1
PB0
Name
CIOPB3
CIOPB2
CIOPB1
CIOPB 0
Reset
-
-
-
-
Reset
0
0
0
0
R/W
R/W
R /W
R/W
R /W
R/W
R/W
R/W
R/W
R/W
PB3 I/O data
PB2 I/O data
PB1 I/O data
PB0 I/O data
PB3 Input/Output select
PB2 Input/Output select
PB1 Input/Output select
PB0 Input/Output select
Description
Description
EM6605

Related parts for EM6605