![Sino Wealth SH69K55A Скачать руководство пользователя страница 20](http://html1.mh-extra.com/html/sino-wealth/sh69k55a/sh69k55a_manual_1283061020.webp)
SH69P55A/K55A
20
PORTA.3 - 0 can be shared with SEG4 - SEG1 signal output for LCD or LED display, KEY_I4 - KEY_I1 input for automatic
key scan.
PORTB.3 - 0 can be shared with ADC AN3 - 0 input channel.
PORTC.0 can be shared with PLL_C (code option), if PLL is enabled, a RC network must be connected with this port.
The OSCO pin can be shared with PORTC.1 if the SH69P55A/69K55A uses the external clock or the RC oscillator as the
system oscillation.
The OSCI pin can be shared with PORTC.2, if the SH69P55A/69K55A uses the internal RC oscillator as the system
oscillation.
The RESET pin can be shared with PORTC.3 controlled by the code option. PORTC.3 is open-drain output.
PORTD.3 - 0 can be shared with COM1 - COM4 signal output for LCD or LED display, KEY_O1 - KEY_O4 output for
automatic key scan.
PORTE.3 - 0 can be shared with COM5 - COM8 or SEG20 - SEG17 signal output for LCD display, and PORTE.3 - 2 can be
shared with COM5 - 6 signal output for LED display.
PORTF.3 - 0 can be shared with SEG8 - SEG5 signal output for LCD or LED display, and PORTF0 can be shared with
KEY_I5 input for automatic key scan.
PORTG.0 can be shared with PWM output.
PORTG.1 can be shared with TONE output or ADC AN9.
PORTG.2 can be shared with T0 input or external ADC V
REF
input.
PORTG.3 can be shared with T2 input or ADC AN8.
PORTH.3 - 0 can be shared with SEG16 - SEG13 signal output for LCD display.
PORTI.3 - 0 can be shared with SEG12 - SEG9 signal output for LCD display.
PORTJ.3 - 0 can be shared with ADC AN7 - 4 input channels.
IMPORTANT:
In 32pin package, PORTH.0, PORTH.1 and PORTI - K must be selected to be output ‘0’ (Port Control Register (PCR):
$394 = xx11B, $395 - $396 = 1111B, $397 = 0011B and Port Data Register (PDR): $38F = xx00B and $390 - $391 = 0000B,
$392 = 0000B).
In 28pin package, PORTD, PORTF, PORTH, PORTI.3 - 2 and PORTK must be selected to be output ‘0’ (Port Control
Register (PCR): $1B $1D, $394 = 1111B, $395 = 11xxB, $397 = 0011B and Port Data Register (PDR): $0B $0D, $38F =
0000B, $390 = 00xxB, $392 = 0000B).
In SH69P55A/69K55A, each output port contains a latch, which can hold the output data. Writing the port data register
(PDR) under the output mode can directly transfers data to the corresponding pin. All input ports do not have latches, so
the external input data should be held externally until the input data is get from outside. The contents of the port control
register (PCR) determines each bi-directional I/O port to be an input or output port, where writing ‘0’ to port control register
(PCR) represents the input mode and ‘1’ for the output mode. When a digital I/O port is selected to be an output port, the
value of the associated port bit actually represents the value of the output data latch, not the voltage on the pin. When a
digital I/O port is selected to be input, the value of the associated port bit represents the status on the corresponding pin.
The output data latch can be written all the while, regardless of the state of the port control register (PCR). Therefore, when
using ports in a mixture of input and output modes, the contents of the output latches for those ports that are selected as
inputs may be rewritten by execution of logical instructions. So it is strongly recommended that writing proper data to the
port data register (PDR) before changing the corresponding bits in the port control register (PCR) from the input mode to
the output mode can avoid glitches on the relevant pins.