
Another point here is that these pins can be independently set to be used as control output pins with the PORT I/O set
command. The ports are selected with the lower 4 bits of the one byte of data. The one byte of data corresponds to
P0, P1, P2, and P3 starting with the low order bit. This command has the two-byte command format (RWC set once).
One byte data + $DB
PORT I/O SET
dn = 1 ... Sets Pn to be an output pin.
dn = 0 ... Sets Pn to be an input pin.
n = 0 to 3
Ports set up to be output pins can be independently set to output either a high or low level. The low order 4 bits of the
one byte of data correspond to those ports. The one byte of data corresponds to P0, P1, P2, and P3 starting with the
low-order bit. This command has the two-byte command format (RWC set once).
One byte data + $DC
PORT I/O SET
dn = 1 ... Outputs a high level from Pn, which is set up for output.
dn = 0 ... Outputs a low level from Pn, which is set up for output.
Note that the LC78625E adds a general-purpose I/O port function that shares the ASDACK, ASDFIN, ASDEPC, and
ASLRCK pins. Applications that use the LC78625E with antishock mode turned on must set the P0 (ASDACK), P1
(ASDFIN), P2 (ASDEPC), and P3 (ASLRCK) pins to input mode by issuing a port I/O switching command
($DB0x). But in this case,Pins P0 to P3 cannot be used as input pins. In the default state following a reset, the pins P0
to P3 are set up to be input ports. The only data that can be handled by this circuit as a digital data input interface in
antishock mode is data that has a 48fs bit clock rate, a 16-bit data length, an MSB-first format, and a back-packed
format. The figure below shows the timing.
No. 5502-27/35
LC78625E
23. General-purpose I/O ports; Pin 38: P0, pin 39: P1, pin 40: P2, pin 41: P3
When antichock mode is not used, pins 38 to 41 can be used as the general-purpose I/O ports P0 to P3. After a reset,
all these pins are set up as input ports. Unused ports must be either left set up as input ports and connected to 0 V or
set up as output ports and left open.
The port data can be read out in the order P0, P1, P2, and then P3 from the SQOUT pin is synchronization with
falling edges on the CQCK pin by issuing a PORT READ command. This command has the one-byte command
format.
Code
COMMAND
RES = L
$DD
PORT READ
$DB
PORT I/O SET
PORT I SET
$DC
PORT OUTPUT