would stop the processing of the data. Using hserinptr
removes that limitation and allows us to transmit any data
value — including 0.
What’s Next?
At this point, we’ve covered the basics of receiving
serial input in the background while our program is
executing other tasks. Hardware serial input is a powerful
technique that’s available on all
current M2- and X2-class PICAXE
processors. So far, we’ve been
experimenting with its capabilities
by manually sending data strings
from a terminal program running on
a PC, but now we’re ready to move
on to using a “master program” on
the PC to communicate with a
PICAXE project.
As I mentioned in the first
installment of our PICAXE-PC serial
communication project, Python is an
ideal programming language for this
purpose. We’ve already covered the
basics of Python programming in
our PICAXE-Pi projects, and Python
is freely available for all three major
PC operating systems. In fact, some
version of Python comes preinstalled on OS X and most Linux
distributions. Windows users,
however, will need to download and
install Python on their PC.
Even if you already have Python
installed, you may want to update to
the latest version. It’s probably also
a good idea to install the latest
releases of both Python2 and
Python3 — especially if you haven’t
yet decided which version you want
to use. A quick search for “install
Python” will locate many resources,
but I can also recommend either of
• The “official” python site
( python.org): Click on the
“Downloads” tab, and then choose
the latest Python releases for your
operating system. Also, see the
Beginner’s Guide under the
“Documentation” tab.
• “The Hitchhiker’s Guide to
Python!” ( docs.python-guide.org):
This site contains good information
on downloading and installing Python, as well as
guidelines for writing Python code.
In the next Primer installment, we’ll experiment with a
couple of simple Python “master programs” that will
request data from a PICAXE project, and update the data
in real time on the PC. Before then, you may want to
make sure you have the latest versions of Python installed
on your PC, so that we can hit the ground running!
In the meantime, have fun ... NV
September 2015 15
PALSTAR Customer Support: 1-800-773-7931 Fax: (937) 773-8003
High-Power Analog Autotuner
The HF-AUTO is a microprocessor controlled
fully automatic stand-alone tuner with a power
rating of 5 Watts to 1800 Watts that will work with
any transmitter built from the 1940s to the present.
HF Bands: 160m to 6m. Three antenna outputs:
SO239 coax. Dimensions: 12. 5” W x 6. 5” H x 16. 5”
D. Weight: 25 lbs. ( 11. 4 kg).
www.palstar.com
HF-AUTO-R Remote unit
Operate from 500’ distance
t
t
o
a