This is only a preview of the November 2009 issue of Silicon Chip. You can view 34 of the 112 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "WIB: Web Server In A Box, Pt.1":
Items relevant to "Twin-Engine Speed Match Indicator For Boats":
Items relevant to "High-Quality Stereo Digital-To-Analog Converter, Pt.3":
Items relevant to "GPS Synchronisation For Clocks With Sweep Hands":
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
PICAXE
Update
Many SILICON CHIP readers enjoy using the PICAXE range of
microcontrollers within their projects because of their low cost
and ease of use. Clive Seager, Revolution Education’s Technical
Director, takes us through the recent PICAXE updates and new
releases, including the eagerly anticipated new PICAXE-20X2.
AXE027 PICAXE USB download cable
AXEpad software
When the PICAXE system was first developed over ten years ago the ‘9 way
serial port’ was the conventional way
of connecting the computer to external
devices, such as digital cameras.
The now-familiar PICAXE ‘3.5mm
jack plug/socket’ connection was
selected as (1) it is robust and
(2) many early digital cameras used exactly the same
serial download cable,
meaning the cables were a
low-cost mass produced item!
USB has now taken over this role
and most modern laptops now only have
USB-style connectors.
Unfortunately, the USB protocol is far
more complex than the serial RS232 protocol; in fact it is
not possible to implement the USB protocol on low-cost,
limited-memory devices like 8 and 14-pin PICAXE microcontrollers. There simply isn’t enough memory space to implement both the USB protocol and the PICAXE firmware!
Therefore an alternate approach is required and that is
to use a separate ‘intelligent’ USB cable with an embedded
USB-to-serial converter chip, such as those made by FTDI.
This gives the best of both worlds – a USB connection to
the computer and a serial connection to the PICAXE chip
itself.
As you can see,
the AXE027 download cable contains
a complete miniature circuit moulded into the USB connector.
This allows the cable to work via USB on all Windows,
Linux and Mac computers.
To support PICAXE users who wish to use Linux or Mac
computers to develop their PICAXE BASIC programs the
new cross-platform AXEpad software is now available
(Windows users should still use the Programming Editor
software).
When combined with the AXE027 USB download cable
AXEpad provides a complete development system for Linux
and Mac users.
AXEpad has been deliberately designed with a small
footprint and so will also work well on low-cost flash drive
Linux ‘netbook’ computers such as the eeePC.
As you would expect AXEpad supports all the common
PICAXE features such as colour highlighting of BASIC
programs and in-built testing features such as the ‘Debug’
and ‘Terminal’ functions.
AXEpad is completely free of charge and will operate
with:
• Linux – any modern x386 distribution with GTK2.8+
• Mac – OSX (10.3 or later) on PowerPC or Intel machines
siliconchip.com.au
November 2009 63
Logicator flowcharting software
Current PICAXE chip lineup
Logicator is a flowcharting application widely used
within UK schools and colleges for over twenty years for
developing control programs.
Over the years PIC microcontroller technology has vastly
improved, resulting in more memory capacity and features.
This has enabled the PICAXE chips to be enhanced with
additional commands, more RAM variables and additional
memory capacity, all at a lower cost!
The full PICAXE lineup is shown below:
Current PICAXE range
Entry
Intermediate
(100-200 lines) (600-2000 lines)
08M
14M
18M
18X
20M
28X1
40X1
Enhanced
(2000-3000 lines)
20X2
28X2
40X2
New X2 range
All program development is performed graphically by
joining flowchart shapes together, and so is simpler for
younger students to use than BASIC style ‘textual’ programming languages.
Recently Revolution took over the Logicator product
and have spent the last 12 months bringing it up to date
to support all the current
PICAXE chips.
The software is now also
distributed as unrestricted
‘shareware’ and so anyone
can download it from www.
picaxe.co.uk and try it out
without charge. So if you
have always been a bit daunted by BASIC programming
why not give flowcharts a go!
Logicator is very easy to
use and also supports onscreen simulation that allows
simple testing of flowchart
operation.
If desired the flowcharts
can also be automatically
converted into BASIC program listings.
X2 Enhancement Summary:
• Each pin can now be individually configured as input or output
• Up to 12 internal ADC channels available
• Up to 256 general purpose RAM bytes
• Up to 1024 additional bytes in the RAM scratchpad
• Indirect RAM access to support easier use of arrays
• Clock speed ups to 64MHz, 16x faster than 4MHz!
• Wider operating voltage range (1.8 - 5.5V), ideal for 3V systems
• Up to 4 internal program slots – allowing up to 10,000 lines of
code with 1000 sub-procedures!
• Also supports up to 32 more program slots stored in
external EEPROM chips
• Support for UNI/O brand EEPROM chips using a single i/o line
• New hardware interrupt pins
• New comparator functions to compare 2 ADC channels
The new PICAXE X2 range (20X2, 28X2 and 40X2) is a
complete new generation of the PICAXE chip, making use
of the advanced features and architecture of the newly
released PIC18F series of microcontrollers.
The entire PICAXE core has been completely rewritten
to provide a more flexible and higher specification tool for
more advanced projects. Although the features and memory
capacity have greatly increased, prices have not – for instance the new 20X2 is the same price as the older 18X part!
Pinout comparison between the new “X2” PICAXE chips. As you can see,
functionality has been preserved (as much as possible) between the chips.
X2 chips can easily be used to upgrade existing projects.
64 Silicon Chip
siliconchip.com.au
X2 Enhancements
• RAM
• I/O Pin Flexibility
One of the key new features of the X2 series is that almost
every pin is configurable as input or output. This creates
much more flexibility with circuit design as you are not
fixed to a pre-defined ratio of inputs to outputs on any
chip size. Naturally the pins can also be configured to the
‘traditional’ PICAXE layout if desired.
• Analog Inputs
Many more ADC channels, up to 12, are now available
on a number of the i/o pins. This again provides greater
flexibility with circuit design. New comparator features
also allow two analog channels to be compared, so that an
interrupt can occur if one analog value exceeds another.
• Greater Processing Speeds
The 20X2 can operate at up to 64MHz via it’s internal
resonator. This is a vast speed improvement – for instance a
program that took 2 minutes to process on an 18X at 4MHz
will now take less than 8 seconds! This is ideal for systems
that need rapid response times, such as persistence-ofvision LED display systems.
• Increased Voltage Operating Range
The 20X2 will function from 1.8V all the way up to 5.5V,
making the single part ideal for both 3 and 5V systems. This
large voltage range is quite a technical breakthrough, and
is achieved via a new innovative design – a 3V silicon core
combined with an internal integrated low dropout regulator.
This means that the 3V core, which would normally only
tolerate 1.8V to 3.3V, can be used all the way up to 5.5V
because the internal regulator ‘kicks-in’ when required
and constantly maintains the internal core voltage at 3V.
• Hardware Interrupt Pins
The X2 range has up to 3 pins that can be configured as
hardware interrupt pins. When configured, these pins continuously background scan for an edge based trigger, even
during sleep. When this trigger occurs a flag is set which can
be used to trigger a special ‘interrupt’ section of BASIC code.
The X2 parts have a much greater RAM capacity, 256
bytes on the 20X2 and 1280 bytes on the 28X2/40X2. This
increased memory capacity allows much more complex
calculations and programs. X2 parts also accept indirect
memory access via pointers (<at>ptr, <at>ptrinc, <at>ptrdec), which
is ideal for building arrays of data.
• Program Slots
The 20X2 has 1 program slot, the 28X2/40X2 have 4
internal program slots. Each X2 program slot can contain
approximately 2000-3000 lines of BASIC code. When the
microcontroller is reset the program in slot 0 automatically
starts running. The other programs can then be started by
using a ‘run’ command.
• External Slots
As well as the internal memory slots, 4 additional slots
can be used by connecting an external I2C EEPROM chip.
As up to 8 different I2C chips could be used on the same
I2C bus, this gives a theoretical 32 additional program slots
with over 64,000 lines of BASIC code!
• UNI/O Support
The X2 support communication with external Microchip
UNI/O EEPROM memory chips. The advantage of uni/o
memory is that it only requires 1 microcontroller pin, as
opposed to I2C which requires 2 and SPI which requires 3.
Summary
As you can see 2009 has been a very busy year for us at
Revolution Education and we hope you enjoy using the
new PICAXE software and parts. As ever, if you have any
feedback or new feature requests please do not hesitate to
contact us via www.picaxe.co.uk – almost all new PICAXE
features are the direct result of PICAXE community feedback!
All software described in this article can be downloaded
free of charge from www.picaxe.co.uk, while PICAXE
cables and chips are available in Australia from www.microzed.com.au and in New Zealand from www.sicom.co.nz.
They are also available from several electronics stores. SC
JOIN the teChNOLOgy age NOW WIth
PICaXe
Developed as a teaching tool, the PICAXE is a low-cost “brain” for almost any project.
Easy to use and understand, professionals & hobbyists can be productive within minutes.
Free software development system and low-cost in-circuit programming.
Variety of hardware, project boards and kits to suit your application.
Digital, analog, RS232, 1-Wire™, SPI and I2C.PC connectivity.
Applications
include:
Distributed in
Australia by
1[Datalogging 1[Robotics 1[Measurement & instruments 1[Motor & lighting control
1[Farming & agriculture 1[Internet server 1[Wireless links 1[Colour sensing 1[Fun games
Microzed Computers Pty Ltd
Phone 1300 735 420
Fax 1300 735 421
www.microzed.com.au
siliconchip.com.au
www.siliconchip.com.au
NEW X2
HIPS
now in sC
tock!
November 2009 65
2009 67
|