User manual
17 Chapter 3 
3.2.3 Input/Output Control
A control word can be written to a port's configuration register (Base+3) 
to set the port as an input or an output port, unless the ports are set via the 
switch. Table 3-1 shows the format of a control word.
Table 3.1: Bit Map of Port Configuration Register
Bit Description
D0 Port C lower bits 0: output; 1: input
D1 Port B 0: output; 1: input
D2 Ignore 
D3 Port C higher bits 0: output; 1: input
D4 Port A 0: output; 1: input
D5 Ignore 
D6 Ignore
D7 HW/SW 0: SW; 1: HW
Note: A control word has no effect if the correspond-
ing port is set as an output port by the SMD 
switch SW2. D7 is a read only bit for identifying 
the SMD switch SW2 position 1 is ON or OFF. 
D7 = 0 means the I/O configuration is set by 
configuration register (SW); D7 = 1 means the I/
O configuration is set by SMD switch SW2 
(HW). When D7= 1, read the value of D4, D3, 
D1 and D0 mapping the SW2 location 3,4,5 and 
6, respectively.
Warning!  Before setting any port as an output port via 
software, make sure that a safe output value 
has also been set. An output voltage will 
appear at the pins immediately following the 
control word taking effect. If no output value 
was specified, the value will be indeterminate 
(either 0 or 1), which may cause a dangerous 
condition.










