Moving From BS1 to PIC
by William Smith
A high school teacher recently sent me an email asking for advice on the best
path to move from the BASIC Stamp 1 (BS1) module to Microchip PICs. He had
his students programming the BS1 Project Board (Figure 1) which is a very nice
board for the price. He was happy with that board as an entry point, but the next
step in the BASIC Stamp world was moving to the BS2 Homework Board, which is
a $45 development board. He hoped to keep it below $25. He thought maybe
programming a PIC microcontroller directly might be the best option since the
BS1 is based on that same family of microcontroller ...
With all the various
programmers, tools, and
compiler options though, he
was getting confused. He wanted to
be able to program blank PICs, not
another company’s chip where you
have to buy from a limited number of
sources. This ruled out the Basic
Atom, the PICAXE, and a few others.
What I hope to show you in this
article is the same thing we
emonstrated to the high school.
You can put together a great starter
package for under $25 using mostly
free samples and free downloads
from the Internet.
Requirements
The BS1 has an 80 command
limit, but the high school teacher
stated that many of the projects his
students worked on were very simple
and didn’t require a lot of code space.
On the other hand, he wanted an
upgrade path to offer more space and
definitely more speed to his advanced
students. He also wanted to be able
to access the PIC’s built-in features
such as A/D and timers. As a simple
test, he asked if we could recommend
a package and offer a simple example
for driving an LCD module as a basic
demonstration. This took many lines
of code in the BS1, so he either needed
to use an expensive serial LCD module
or move up to a larger part like the
BS2 to do more with it. He stated that
he’d seen sample code with a single
LCD control command that simplified
driving an LCD and wondered if the
PIC had that option built in. That was
the challenge he placed before me.
Based on these requirements, I
told him that we could show him
an LCD example with very little
effort, using a BASIC compiler
that will easily convert over his
existing code and offer an easy
upgrade path to full professional
PIC programming for his
students down the road. He
was very interested so he wanted
more detail.
for him involved several key
components:
• PICBASIC PRO compiler, sample
version
• MicroCode Studio IDE
• EZPIC JDM style serial port
programmer
• WINPIC programmer software
• PIC16F690 microcontroller plus
4 MHz resonator with capacitors
• 2x16 LCD module
• Breadboard and wires
FIGURE 1. BS1 Project Board.
Package Details
The package I put together
SERVO 08.2008 67