I’m working on a new robot application for the BasicBoard from Beginner
Electronics.com. I chose one of the tractor type bases from
budgetrobotics.com

as seen in Figure 1. This is a great little base to build a robot from. In the process

of doing this, though, I wanted to get the expansion serial port on the BasicBoard

working for future add-on sensors and other future ideas. That extra serial port

connection ends up pointing to the front of the robot so this could be really handy.

The BasicBoard has a built-in serial port for
programming while this second serial port is a
four-pin header connected to the hardware serial port
peripheral pins of the Atom PIC16F877A chip. I tested this
port by making it talk to a PC running a terminal program.
This article will describe the simple example of how to use
the HSERIN and HSEROUT commands in Atom Basic to
control the hardware serial peripheral within the Atom
interpreter chip. The main advantage to these commands
and the hardware serial peripheral is the ability to send
and receive information in the background while the
BasicBoard’s main program is running.

The 40-pin Atom interpreter chip used in the BasicBoard
is actually a PIC16F877A with custom bootloader
programming software inside. The BasicBoard connects to
the programming pins of the Atom chip through the nine
pin DB- 9 connector at the top of the BasicBoard. You can
send messages out this port, but I wanted to use the
hardware serial port connections which are tied to the C6

Figure 1.
BasicBoard
Tractor
Robot.

Figure 2.

Serial Adapter.

and C7 pins of the PIC16F877A. These are brought out to
a four-pin connector on the side of the board. The pins are
5V, ground, transmit (Tx), and receive (Rx). The hardware
serial port transmits in true RS-232 mode which means the
port needs an RS-232 inverter chip to convert the signal to
+12V and -12V signalling. There are many of those types of
adapters available but I wanted a nice cable version. I created
one as shown in Figure 2 to connect to the serial port pins.

I built this adapter from some off-the-shelf parts. The
case is a simple DB- 9 shell that you can get at
Jameco.com
or even some RadioShack stores. I put a four pin connecter
at the end of the wires but the key component is inside the
case. It’s a small circuit board with an RS-232 inverter chip
designed in that I purchased from
HVWTECH.com. All the
components are surface mount, so the board is very small.

I had to modify the case a little to make the board fit but it
didn’t take much work. The screw holes ended up being
blocked by the circuit board so I had to use a piece of tape
on the sides to hold the case together. The circuit board is
shown in Figure 3.

The RS-232 board is advertised as
a TTL to RS-232 converter that allows
any Transistor Transistor Logic (0-5
volt) device — such as a microcontroller
— to communicate with true RS-232
(±12V) devices such as a PC. It’s
capable of speeds up to 115K baud
and is reported to be able to
communicate at distances of up to
several hundred feet. The module
costs under $10, which I found to be