Getting Started With
The PICAXE-08M Chip
by Ron Hackett
The PICAXE-18X Chip
Last month, we interfaced the 18X with a Hitachi
HD44780-based LCD display. Now we are ready to
add a 12- or 16-key matrix keyboard and a piezo
beeper to complete our I/O terminal. For those projects
that do not require user input (i.e., they only need the LCD for
program output), we will also discuss a simplified version of
our terminal program that will provide just the “serialized”
LCD for output, as we conclude this series.
The PICAXE-28X Chip
The PICAXE-40X Chip
Let’s begin by taking a look at
matrix keyboards; 12-keys (3X4
matrix) and 16-keys (4X4 matrix) are
the two most commonly-available
sizes. We will be using a Velleman
4X4 matrix keyboard (BGMicro part
#SWT1067; also available on eBay) in
our discussions, but you can just
as easily use a 3X4, if you prefer. In
FIGURE 1. Keyboard Adapter.
fact, because of the way the software
functions, you will most likely not
have to make any changes to accommodate the smaller keyboard.
When a key is pressed on a matrix
keyboard, a connection is made
between the column pin and the row
pin which correspond to the position
of the switch in the matrix. Later, we
will see how a microcontroller can be
used to determine which key has
been pressed, but first we need to
focus on the mechanics of interfacing
the keyboard to a microcontroller.
Our discussion will be limited to the
4X4 matrix, but 3X4 matrices function
in exactly the same way — just with
one less column pin.
A few matrix keyboards come with
cables already attached, but most simply have a row of seven or eight holes
into which you can solder a header for
connection to your project. The
options for interfacing keyboards are
similar to those discussed last month
when we were interfacing LCDs.
Essentially, you can solder a male header to the keyboard and either connect
it directly to your breadboard or use a
short 16-pin ribbon cable with 2X8
IDC connectors on each end to connect the keyboard header to a male
header plugged into the breadboard.
Some keyboards — such as the one