UPS PIco HV3.0A Firmware Code 040 Print Date 18.08.2017
Designed and Manufactured by PiModules and ModMyPi
www.pimodules.com www.modmypi.com
UPS PIco HV3.0 Serial Port(s)
The
UPS PIco HV3.0
is equipped with 2 serial ports. One of them is connected directly
to the Raspberry Pi ® Serial Port, and the second one is available for user applications.
Both Serial Ports are full programmable and the data rate can be set by user, as also
can be enabled or disabled. In addition, there is an internal routing option where one
port can receive and send data over the other one. This allows connecting the
Raspberry Pi® serial port to the external RS232 12V interface (via Terminals Blocks
PCB) or to 5V tolerant without any additional Jumpers or Cables. In addition the
second Serial port of the
UPS PIco HV3.0
can be used as a second serial port routed
directly to the I2C interface (this option is not unlocked yet, and will be available within
one of the next firmware update). The
UPS PIco HV3.0
by default is set OFF and
Raspberry Pi® Serial port can be used for any other applications. If it is needed it can
be set ON, as also the set the data rate. Setting the data rate sets it for both
UPS PIco
HV3.0
serial ports.
After any firmware update the
UPS PIco HV3.0
Serial Ports(s) must be set again. It is
done via PIco variable
rs232_rate
. The
following settings are available:
Setting Value
Meaning
0x00
UPS PIco HV3.0
Serial Port is
OFF
Default value
0x01
UPS PIco HV3.0
Serial Port is
ON
and
data rate is set to
4800
pbs
0x02
UPS PIco HV3.0
Serial Port is
ON
and
data rate is set to
9600
pbs
0x03
UPS PIco HV3.0
Serial Port is
ON
and
data rate is set to
19200
pbs
0x04
UPS PIco HV3.0
Serial Port is
ON
and
data rate is set to
38400
pbs
0x05
UPS PIco HV3.0
Serial Port is
ON
and
data rate is set to
57600
pbs
0x0F
UPS PIco HV3.0
Serial Port is
ON
and
data rate is set to
115200
pbs
Example of use
sudo i2cset -y 1 0x6b 0x02 0x00
Disable PIco RS232 and set tri state the TXD and RXD pins
sudo i2cset -y 1 0x6b 0x02 0x05
Enable the PIco RS232 and set the data rate to 57600 bps
sudo i2cset -y 1 0x6b 0x02 0x0F
Enable the PIco RS232 and set the data rate to 115200 bps