Cermetek Microelectronics, Inc Page 12 of 42
Document NO. 607-00xx Revision A (12/13)
1.4.4. TCPB Function
The CH232BGN supports 2 network connections. The second network connection, TCPB, works only
as a TCP client and can be configured only through the AT commands as follows. For detailed AT
command descriptions refer to Chapter 4.
AT+TCPB=on,
Enable TCPB function;
AT+TCPPTB=<port>,
Set TCPB port number;
AT+TCPADDB=<IP or domain>,
Set TCPB’s server address;
AT+TCPTOB=<time>,
Set TCPB timeout;
AT+TCPLKB,
Query TCPB link status;
After TCPB is enabled the two network interfaces work as a multiple TCP link. All data from each TCP
connection will be transmitted to the serial port in sequence and all data from user serial port will be
duplicated and broadcast to both TCP connections.
1.4.5. GPIO Function
The CH232BGN module supports two General Purpose Input-Output (GPIO) configurations, GPIO-1
and GPIO-2. In GPIO-1 the user defines TXD, RXD, CTS, and RTS as GPIO lines; the nReady, nLink,
and nReload pins serve has functional pins. In GPIO-2, all seven I/O pins (TXD, RXD, RTS, CTS,
nLink, nReady, and nReload) act as GPIO. With either of the GPIO modes selected the module does
not support serial communications.
GPIOn IN: Sets GPIOn as an input;
GPIOn OUT 0: Sets GPIOn as output equal to a logic 0;
GPIOn OUT 1: Sets GPIOn as output equal to a logic 1;
GPIOn PWM m1 m2: Sets GPIOn output to a square wave where m1 is
the duration ‘high and
m2 is the duration
’low’ in milliseconds. The minimum duration is 10 milliseconds;
GPIOn GET: commands the CH232BGN to read the status of GPIOn, responds with I0 (input
low), I1 (input high), O0 (output low), or O1 (output high).
Notes: Pins 3, 4, 5, 6, 8, 9, 10 can be used as GPIO. Pins 4 and 10 can only be defined as inputs,
while Pin 3 can only be defined as an output.
The CH232BGN responds with GPIO OK if the I/O signal is active and GPIO NOK if the I/O
signal is not active.
The command GPIO READ returns the current status of all current IO status.