EM6520 EM Microelectronic, EM6520 Datasheet - Page 17

no-image

EM6520

Manufacturer Part Number
EM6520
Description
MFP version of EM6620 Ultra Low Power Microcontroller 4x8 LCD Driver
Manufacturer
EM Microelectronic
Datasheet
6.4 Port B
The EM6520 has one four bit general purpose I/O port. Each bit can be configured individually by software for
input/output, pull-up, pull-down and CMOS or Nch. open drain output type. The port outputs either data,
frequency or PWM signals.
6.4.1 Input / Output Mode
Each port B terminal is bit-wise bi-directional. The input or output mode on each port B terminal is set by writing
the corresponding bit in the RegPBCntl control register. To set for input (default), 0 is written to the
corresponding bit of the RegPBCntl register which results in a high impedance state for the output driver. The
output mode is set by writing 1 in the control register, and consequently the output terminal follows the status of
the bits in the RegPBData register.
The port B terminal status can be read on address RegPBData even in output mode. Be aware that the data
read on port B is not necessary of the same value as the data stored on RegPBData register.
See also Figure 11 for details.
While the dynamic input comparator is selected ( PB0CompSel =‘1’) the PPB[0] input is cut off, a read on port B
PPB[0] returns ‘1’.
Copyright  2002, EM Microelectronic-Marin SA
Figure 11. Port B Architecture
Internal Data Bus
PWM, CK[16],
CK[11], CK[1]
Outputs are:
DB[n]
Multiplexed
Port B Direction Reg
PortB Data Reg
DDR[n]
DR[n]
RD
PB0CompEnable
Output Active
Multiplexed
Multiplexed
Output
PB0CompSelect for PB[0]
RD for PB[3:1]
SLEEP
MUX
17
Option Register
Pull-down
Dynamic Input
Control
Port B
Pd[n]
Comparator
I / O Terminal
PB[n]
4
1
Open Drain Option
www.emmicroelectronic.com
Register
OD[n]
EM6520
Active
Pull-down
Active Pull-up if
Mask Option
MPBPD[n]
Mask Option
MPBPD[n]
IRQPB0Comp
PB0CompResult
Open Drain
Mode
03/02 REV. D/449

Related parts for EM6520