The PICAXE Processors



The PICAXE may not be the biggest, fastest, or best processor around, but it does offer excptionally good value for money



The PICAXE processors are remarkable beasts; Basic Stamp like clones in single chip packages at a ridiculously low price. They have some very nice features, and, although designed for the educational market, should appeal to hobbyists, and professional developers alike.

Of course, there has to be a catch, but which processors don't have a catch somewhere ?

The only potential problem with the PICAXE processor is its limited program and data memory capabilities, but that is only a problem if your program is too big to fit inside the chip. For small, or simple projects, the PICAXE offers a low cost, fast-track route to getting your code up and running.

The PICAXE can interface to PC serial ports with extreme ease, and without the need for additional components beyond a couple of resistors, and will often be an excellent choice for those wishing to create interfaces to control robots, or any other hardware for that matter, as well as for those who want to control their robots, or something else, directly.

The PICAXE-28 is particularly interesting as it can provide eight, continuous and simultaneous, servo outputs, making it particularly useful in robot and model engineering. All PICAXE's include analogue input capabilities, along with digital input and output, making them very flexible devices.

There is a dearth of information on the internet about the PICAXE processor, other than that which the manufacturer and supplier provide ( which in itself is incredibly comprehensive ), and although it has been used widely within the UK in education, the target market for which it was designed, it is almost unknown to roboteers, other hobbyists and professionals.

This is a real shame, as the PICAXE does present a lot of opportunities to those wishing to undertake serious microcontroller projects on the cheap, and this article will, hopefully, encourage a greater use of the processor - let's just hope that the supplier can keep up with demand !


Why Choose a PICAXE ?

There are a variety of microprocessors and microcontrollers available, all specifically designed for the job of controlling hardware.

Every processor has its pro's and con's; whether it requires additional chips to make it work or if it is self-contained, the amount of program memory and data storage available, how it is programmed, what development tools exist, and for the hobbyist, how easy they are to get hold of and use, and what is their low quantity cost.

A robust defence can be mounted in support of using any particular processor, but in practical terms, for the hobbyist, the choice is usually between Microchip PIC, Ubicom SX ( formerly Scenix ), Parallax Basic Stamps, OOPic and BasicX processors.

The PIC, SX and AVR are low cost, high performance chips, but require a hardware programming device to get programs into them. The Stamps, OOPic and BasicX processors ( or perhaps more correctly, in some cases, modules ), are pre-programmed with an interpreter, so a program can be downloaded using nothing more than a serial lead, effectively as source code, and the program will run immediately. The downside is usually higher cost and limited program and data storage.

Everyone who is looking at designing a microprocessor solution, will at some time have to decide which processor to choose, and the decision is not easy.

I have a lot of experience using PIC's in a commercial development environment, but that is somewhat different to trying to use them on the kitchen table. Although 'Flash' devices have made life a lot easier, there's still a steep learning curve for the newcomer, and more time can be spent on getting the programmers and software working than getting on with solving the problem in hand. The same applies to the AVR's. I know, I've been there.

The advantage of pre-programmed devices, is that once the development software is installed, the devices can usually be connected up to a serial port, the code downloaded, and the chip runs the code. No hassle, no messing about, and the programming language, often a variant of BASIC, is much simpler to learn than native assembler.

The problem is cost versus performance. Unprogrammed PIC's and AVR's are dirt-cheap and are extremely powerful. Pre-programmed systems with interpreters built-in are expensive and seem severely crippled in their capabilities; limited everything, and slow speed of operation.

Ignoring the cost of purchase, the big advantage these pre-programmed devices have is the minimal cost in getting a solution up and running. More often than not, all that's needed is a suitably wired download cable which connects to a serial port. The purchase cost itself is often the prohibitive factor; it's a choice between a cheap and potentially nasty path, and an expensive but simple one.

The PICAXE range of processors created by Revolution Education Ltd, and sold through Tech-Supplies, are pre-programmed, interpreter devices, which, although having a few limitations, are extremely cheap. At the price ( 2.94 GBP for the PICAXE-18, and 3.80 GBP for the PICAXE-28, including VAT ), the trade-off in performance against price certainly starts to makes them a viable solution.


The PICAXE Processors

The PICAXE-18 is an 18-pin device, with eight digital output lines, five input lines, primarily digital, three of which can also be used for low resolution analogue input. It uses an in-built 4MHz RC oscillator, so the basic chip can be used with just three resistors, a power supply, a serial link, and the free software development package.

The limitation of the PICAXE-18 is its 128 byte program and 13 byte data variable memory, and an analogue input converter which only handles 16 analogue steps and ignores the top 30% or so of a 0 to 5v input.

While the analogue input may be limiting in some applications, it's better to have some analogue input capability than none at all, and many other devices of a similar nature will allow only digital input and output, or, if you want to have an analogue input, it has to be done by charging up, and discharging a capacitor.

The PICAXE-28 is the 28-pin, big brother of the PICAXE-18, having eight digital input lines, eight digital output lines, four high resolution analogue inputs and extends the program memory to 256 bytes, but the 13 byte data variable maximum remains. The PICAXE-28 requires an external resonator, but allows full servo control on eight channels simultaneously and full 256-step resolution analogue input over the complete 0 to 5v input. It is slightly larger than the PICAXE-18 and takes up more circuit board real estate. The PICAXE-28 is supplied with a 4MHz, 3-pin, resonator which requires no additional components to use it.

In the pipeline is the PICAXE-18A, a PICAXE-18 on steroids. This pin compatible device takes the program memory capacity up to 256 bytes, matching the PICAXE-28, and offers full 8-bit, 256-step, high resolution analogue inputs.

Also added in 2002 was an 8-pin PICAXE-08, with 128 byte program memory, five digital input or output pins, of which one can be used as a low resolution, 4-bit, analogue input. With an quantity retail price of 1.00 GBP, the PICAXE-08 will make those simple PC to LED and relay interfaces I've been planning impossible to put off.

Further down the line, there are plans to introduce a version of the PICAXE with 1024 bytes of program memory.


The Software Development Environment

To compliment the hardware, the PICAXE has a software development environment; the Programming Editor.

This is available for free requiring only that the user registers to download. Registering also creates account details ready for when you come back to order components from Tech-Supplies. The download is around 6MB in size, but the Programming Editor software can also be purchased on CD-ROM.

The Programming Editor is Windows compatible only software, running on 95, 98, ME, NT, 2000 and XP, and supports not just PICAXE programming, but also Basic Stamp programming, native PIC Assembly Language programming, and has the ability to program blank PIC chips ( using an additional programming adapter ) with the BASIC interpreter and your program.

The ability to program blank PIC's this way is an excellent concept and looks like it could be extremely useful, despite there being no support for the SERIN, BUTTON or DEBUG commands. Not having SERIN unfortunately prevents this technique from being used to create interfaces that are to hang off PC serial lines.

The Programming Editor also provides limited support for converting BASIC programs into assembler. The conversion is rather limited in scope at present, but extra capabilities are promised in the future.

The Programming Editor downloaded, and installed, without any problem, and is complete and ready to use once installed, whether you have any PICAXE chips or not. The download brings with it a comprehensive set of documentation. Some PIC device data sheets are not included in the download, presumably to keep the size down, but this will not generally be a problem, and they are freely available for download from the Microchip site if you need them.

The download includes the Microchip MPASM software for Windows used to compile PIC Assembly Language, and the software for connecting to the optional PIC programmer. Example code is also included, along with details of complete projects.

On top of all this, the Programming Editor allows programs to be entered as flowcharts, using an on-screen, graphical editor, and allows the flowcharts to not only be converted to source code, but also simulated. This method of entering code isn't very suitable for large projects, but is a great way to introduce people to flowcharting, microprocessor control and understanding how flowcharts can be turned into program source code. Watching the flowcharts being simulated is fascinating.

The amazing thing about the Programming Editor is that such powerful software is made available free of charge. A new version is due out to support the forthcoming introduction of the PICAXE-18A and PICAXE-08 devices, this will also include the ability to download the latest documentation from the internet, simply and quickly.

There are few companies who are willing to give away complete, uncrippled, development software, and back their product up with equally free, and very comprehensive, documentation. It's almost impossible to create perfect documentation, but Revolution Education Ltd have done a remarkably good job, and are continually working on improving what they have, and correcting any errors which do occur. To their credit, there have been very few indeed.


Programming the PICAXE

All PICAXE processors are programmed using a language which is a variant of BASIC, which is almost identical to that used to program the Basic Stamp 1; programs written for the BS1 should run on the PICAXE with only a few alterations, although the reduced memory capacity may be a problem.

When I started developing with the PICAXE, I decided to go for the PICAXE-18 for three reasons; they were almost half the price of PICAXE-28 chips in 10 off quantities, didn't require fitting a resonator on the circuit board, and I reckoned that if one chip couldn't do the job, it was cost effective to just connect a few together until they could.

Naive ? Yes, but you often only learn things by trial and error, and there's not a lot of independent information about real use of the PICAXE out there - one of the main reasons for writing this article.

I had a number of applications in mind for the PICAXE-18 when I chose it, robotics, and PC serial interfacing to LCD's, relays and LED's. Having got my first chip installed on a prototyping breadboard, interfacing the chip to a robot, the Cybot which comes with Real Robots Magazine, just happened to turn into the first project; there's nothing like diving in at the deep end to find what's good and bad about a device.

Having never used a Basic Stamp or anything like it, the programming language was unfamiliar, but the software development environment includes manuals in PDF format, and provides a lot of useful information. The manuals are also available online, which is where you should go to get the latest versions.

Most manuals are dedicated to the PICAXE, and where documentation currently refers to non-PICAXE processors, plans are in hand to clarify what applies to a particular processor.

The manuals, and example programs, provide enough information to get started quickly, so, having scanned the documentation, looked at the example code, I decided to dive-in. I wired up a LED and a piezo transducer to two output pins and got stuck in to making the LED flash and the piezo beep. This turned out to be remarkably easy ! There's nothing more satisfying than seeing something work immediately.

After that, it was just a case of running through the Basic Commands manual, writing a short test program for each command to see how it worked.

It was during this time, as programs got increasing more complex and esoteric that I started to notice how much of the program memory was being eaten away by my code. Very simple programs seem to use very little, but anything that was of medium complexity pushed memory use to the limit; there seemed to be no middle ground.

Having just 128 bytes is actually pretty limiting, and I would seriously suggest going for the PICAXE-28 ( or PICAXE-18A when it is released ) with 256 bytes of memory from day one, if your goal is just to become familiar with these devices; a simple serial to 7-segment display driver ate up almost 64 bytes.

The PICAXE-18 is a fairly memory constrained device, and it's sometimes necessary to start thinking laterally when writing programs; trying different combinations of statements which achieve the same thing may save a byte of two, avoiding 'if' and 'for..next' statements whenever possible, and keeping arithmetic operations to a minimum.

I've previously written assembly language code where I've spent hours trying to cut program execution down by a microsecond, and this is similar stuff. It's fine if you have it in you to do it, but not something a beginner will understand or appreciate. It's probably a bit of a shock to those used to 128MB desktop PC's, but something you will probably have to do when using any pre-programmed interpreter device at some time.

The PICAXE-18 is however perfectly suited to its target market, for use in school education, so it is perhaps a little harsh to criticise if for failing to do something beyond the role it was aimed to fulfil, which it does admirably.

Using the PICAXE-28 will help alleviate the memory problems, but I'm still not sure how much of a 'real program' will fit. The only time you are likely to find out is when you write the code, although, luckily, the development environment allows code size to be determined without a processor attached, so I'd recommend getting the software, writing your program and getting an idea of how big it is, even if you can't actually run it or test it. This is of course easier said than done; those familiar with the Basic Stamp should have no problems, but newcomers may well find that just buying the chip and trying it is the easiest route to take, and not that expensive.

The PICAXE FAQ suggests that the PICAXE-18's 128 byte memory will handle approximately 40 lines of source code, the PICAXE-28's 256 byte memory about twice that.

Having checked all the programs I've written for the PICAXE-18, I have to agree that they are spot on. I had two extreme cases where it looked like the PICAXE-18 would handle less than 30 lines, and another over 60. In the first case, there's a lot of maths going on to shift bits around, and in the second, it was a simple input-lookup-output loop. The rest showed between 36 and 44 lines, with the average being 39.

It's nice to see a company quoting honest and accurate benchmarks, and not skewing the results by using specific test cases.

Another limitation on the PICAXE-18 is the number of input lines. Having eight outputs is okay, but the five inputs can be a bit limiting, especially as the three analogue inputs are overlaid on those inputs. Having the full eight digital and an additional four analogue inputs on the PICAXE-28 makes it much more flexible.

I mentioned the limitation of the low resolution analogue input on the PICAXE-18 earlier, but, in real use, I found them to be perfectly satisfactory for determining if light was present using LDR's ( Light Dependent Resistors ), and which was illuminated more, when processing 'robot eye' inputs. If you need better resolution, the PICAXE-28 ( or PICAXE-18A ) will be required.

Execution of code on the PICAXE appears to be slow, which is common with all the pre-programmed devices, although instruction timings haven't been measured at all. In practice, this isn't really a problem, but if you're silly enough to want to build a serial network of PICAXE processors with a PWM motor controller, you have to start being creative - I did mention that I was going to dive in at the deep end, didn't I ?

Being single chip devices, the PICAXE range use internal EEPROM or Flash to store their programs. This means that they should be executing their code much quicker than those devices which use external, additional, EEPROM chips. Using on-chip storage also maximises the number of inputs and outputs available to the user.


The PICAXE-18 Chip The PICAXE-28 Chip and Resonator The Programming Editor in Action
The PICAXE-18 Chip

The PICAXE-28 Chip
and Resonator

The Programming
Editor in Action
The PICAXE-18 Starter Pack The PICAXE-28 Starter Pack The Download Cable
The PICAXE-18
Starter Pack

The PICAXE-28
Starter Pack

The Download
Cable

The PICAXE Experience

I spent a week playing with the PICAXE-18, and I thoroughly enjoyed myself. The simplicity of taking a chip out of the box, connecting it up and downloading the program into it so easily was a delight to see. Having a LED flash and a piezo beep, without spending days trawling through data sheets or wondering why the programming interface didn't work was immensely satisfying.

It has been frustrating at times, but then I had no real knowledge of what could, and could not, be done with the chips before I went out and bought some. Most of the problems were of my own making; the Cybot interface I planned to design was far from simple, and it's a credit to the PICAXE-18 that I achieved what I wanted at all, and that it took such little time.

At the end of the day, I don't think that programming the PICAXE was any harder than any other solution, and the ability to use a high level programming language shaved days of the development time.

I only ran into two problems, and neither of these appear to be a problem with the PICAXE itself. There is a known problem with the DEBUG command on some computers, where values which should be in the range 128 to 188 ( binary 10xxxxxx ) are mis-reported, and using the bit0 = commands, which don't exist on the PICAXE, didn't produce a compiler warning.

The DEBUG problem has been under investigation, and an updated version of the Programming Editor cured the problem on my PC. A complete fix is expected to be found in the next release of the Programming Editor software. It has to be stressed that this isn't a problem with the PICAXE or Programming Editor, but something to do with serial communications timing, which only affects some computers.

The simplistic 'Error in this line' during compilation isn't always a lot of help, but most error messages are much more informative. I've finally got used to writing if .. then rather than if ... goto which has reduced the appearance of error messages considerably.

Because I was too tight fisted to buy an assembled download cable, and wanted to wire straight up to a 25-way serial port, it took a bit of effort to work out how to wire one up ( the required wiring details are included later ). If you buy the download cable, have a 9-way serial port, or use a 25-way to 9-way adapter, you won't have any problem at all.

For those who don't want to make up their own prototyping boards, but want to experience using the PICAXE, Starter Kits are available which include a processor, ready assembled PCB, a CD-ROM containing the development software and manuals, a 9-way download cable, and connectors to support battery powering of the PCB. Suitable mains power supplies are sold separately.

Despite the minor problems I encountered, I have no hesitation in advocating the PICAXE for use in robot control or any other application where the programming required is fairly simple. The PICAXE is perhaps the cheapest and easiest way to interface PC and Personal Digital Assistant ( PDA ) serial ports to the outside world.

I recommend starting with the PICAXE-28 ( or PICAXE-18A ) as it is more powerful than the PICAXE-18, and once the coding and hardware interfacing is complete, moving it onto a PICAXE-18 ( or even PICAXE-08 ) if the design will fit, and work. It must be borne in mind that the PICAXE-28 is much more likely to have a more stable operating frequency with its 4MHz resonator than the PICAXE-18 will, with its internal 4MHz RC oscillator.

With the price of the PICAXE-18 and PICAXE-28 being so low, it isn't going to break the bank to buy a chip or two and have a play. Compared to the price of the Basic Stamps, OOPic and BasicX alternatives, I still think it's a cost effective solution to some problems, and there's also a special bonus, which I'll tell those of you who have read this far ...

The PICAXE-18 is actually a PIC 16F627 supplied with the interpreter built-in, and the PICAXE-28 is a PIC 16F872. This means that the PICAXE can be erased and used as a normal PIC if required, and, if you've got your hardware design right, you can re-program the chips using native assembly language as your skills evolve, allowing much more complex program designs on the same hardware. The price of the pre-programmed PICAXE processors, isn't much more than the price of the unprogrammed PIC parts themselves.

The beauty of using the PICAXE is that, if your solution becomes limited by what the PICAXE provides, you don't have to throw the chips out, just buy a programmer and re-use what you already have. The advantages that the PIC 16F872 offers over the 16F627 is another good reason to get straight into development with the PICAXE-28. As all PICAXE's are pin compatible with PIC devices, you can just drop a suitable PIC replacement straight into your existing circuit if you want to.


The PICAXE in Action

Waxing lyrical about how good the PICAXE looks on paper and in theory is well and good, but how does it measure up in reality ?

Having bought just the first four parts of Real Robots Magazine, my Cybot robot was crying out to have some computing power added to bring it to life, so the first project became controlling the Cybot with PICAXE-18 processors.

I wanted to create an interface to the provided motor controller board so the motors couldn't accidentally be set to try and move forward and backwards at the same time; something which will blow the drive transistors up. This seemed to be a perfect application for a one chip solution; one serial input, and four digital outputs.

The first coding of Motor Controller worked brilliantly, and I soon added my rough and ready form of Pulse Width Modulation ( PWM ) to provide four speed motor control, although it took the PICAXE-18 near to its limits of its program memory.

Putting the 'Brain' software into another PICAXE-18 had always been my plan as it simplified the overall design; the Motor Controller sends out a serial byte, the Brain receives it, sends back its requests for motion and speed, and the cycle continues. The serial loop allows fairly accurate system clock timing for the PWM control.

The Brain software was fairly straight forward; a simple random motion and speed generator which would cause movement for equally random periods of time was the basic concept. This behaviour is overridden when light is detected on either of two Light Dependant Resistors connected to analogue input lines, and the Cybot then heads off in the direction of the light. I also used a digital input connected to a microswitch to detect collisions and stop the motors dead, to prevent stall currents destroying the drive transistors.

The serial connection to the Motor Controller from the Brain allows another PICAXE to monitor the serial line, and show the requested motion as patterns on a seven-segment LED display; ideal when tethered to the PC whilst developing software, and the motors are disabled.

So in the end I had a three PICAXE-18 system, two controlling Cybot and one reporting what was happening, and all were doing a thoroughly decent job. The only failure being that the slowest speed causes motor judder, as the PWM isn't quite fast enough.

Designing and building the Veroboard ( stripboard ) circuit was the most time consuming part, as space within the Cybot is very limited. Requiring very few additional components helped get two 18-pin PICAXE-18's, two programming interface, two LED's, a 1A 5v regulator, capacitors, and a bank of Molex screw terminals on a board which was 31 holes by 21 in size, just over 3" x 2", with four mounting holes in the middle of it. Knocking up a Veroboard circuit for the Motion Monitoring extended the time.

All the PICAXE's run off a single set of six AA-sized NiMH batteries, through the 5v regulator. The Motor Controller and Brain are tied to a common reset button to synchronise them, and get them into programming mode.

The board for the Motion Monitor doesn't have the programming fitted; it's removed and placed into one of the other processor's socket for programming, and has just two components alongside the PICAXE and display; a pull-up resistor for reset, and a resistor between the display's common cathode and 0v. Using only a single resistor means the segments dim when two or more are on at the same time, but not too noticably. Each display segment anode is connected directly to a PICAXE-18 digital output.

One thing which you must do, when designing a PICAXE circuit without the programming interface fitted, is to connect the Serial In line used for programming to 0v, or use a pull-down resistor. Unless you do this, your program may not run, or may behave strangely.

Designing serial loop networks can be difficult at the best of times, and the unfamiliar PICAXE programming language meant I had to go and read the manuals to see what syntax I should be using as I went along. And I was doing a lot of playing around; trying out different commands to see how they worked, and which were the most memory efficient. Playing tunes on the piezo transducers I'd added was childish, but fun, but did add to the development time.

Despite this being my first experience with the PICAXE and distracting myself, I had my initial versions of the software running in just a few hours. Having added a LED and piezo transducer to each controller was a great help, if for no other reason than letting me know the programs were running, looping and doing what they were meant to.

I had the software completed in under a day, which is a phenomenal achievement, and it's not just my own experience and skills which made it possible. The ability to write some code, download the program, and instantly test it is a great help. Although professionals advocate designing the code in its entirety, downloading and watching it run perfectly the first time, as the best way to developing, incremental coding does have its place. It is certainly preferable to writing what you think is completed code, only to watch it crash and burn when the time to run it arrives.

The experience was thoroughly pleasant, most of the time. The DEBUG problem got in the way at one point, but that's been fixed now. The rest of the problems were all of my own making; just the usual logic error type things which you can stare at for hours without seeing what you've done wrong.

I can't say that anything about the PICAXE or the Programming Editor got in the way of development. I can say, the combination did help development move along smoothly.

The project was an almost complete success. The problems with lowest-speed motion stems from the limited 2400 baud rate for the serial links, and the time it takes to execute the instructions in between, giving a minimum 32mS loop for the four phase PWM.

Most people recommend running PWM for motor control at thousands of Hertz, at less than 30Hz, it's not surprising there are some problems. The issue is only with 25% duty ( 8ms on / 24mS off ) though, at 50%, 75% and, of course, 0% and 100%, everything is fine, so at least three speed control has worked. And I had no idea if PWM would work or not when I started.

Implementing PICAXE control of the Cybot was a tremendous success. Not just in terms of the completed hardware and software, but in terms of time taken to get there and the ease with which the software was created. Although I used many components I already had, the entire project could probably have been built for around 10 GBP.

Using the PICAXE-18's in a genuine application proved just how useful they can be. They certainly met my expectations of them.

Cybot with three PICAXE-18 processors fitted   Cybot's PICAXE-18 Controller Board

Modified Cybot : It may not look pretty but it's certainly powerful

Although it's been an almost complete success, I can see ways of improving what I have created. Using a PICAXE-28 would allow the Motor Controller and Brain software to be combined on a single chip. Additional PICAXE's could also be inserted into the serial communications loop, to extend the Cybot's behaviour, providing the PWM timing isn't overly affected ( each additional processor would add some 4mS to the overall system, and PWM phase, timing ).

It would be interesting to see if the PICAXE-28's SERVO command could be used to provide individual speed control of each motor. This would allow smoothly ramped acceleration and deceleration of the motors.

It's probably true to say that if the PICAXE-18 can do all that I have asked of it, the PICAXE-28 could do even better. Having used the PICAXE in anger, at least I can put on the, "Been There. Done That", T-shirt, and wear it with pride and confidence.

Source Code for PICAXE Control of Cybot

The PICAXE-18 software used for controlling Cybot is available for download. You are free to take the code and use it in your own project, as it is, or in a modified form.

  The Motor Controller Software
  The 'Brain' Software
  The Motion Monitoring Software


 

WARNING

Overclocking a PICAXE is done entirely at your own risk.

Neither I, Revolution Education Ltd or Tech-Supplies will take any responsibility whatsoever if you blow your PICAXE up, anything else up, damage it or anything attached to it, or for any other problems you may experience. Overclocking instantly invalidates any warranty you have, and could prove expensive if you don't know what you're doing. There is no guarantee that overclocking will work with all chips, or may be done without causing damage.

If you're in any doubt about overclocking; don't do it !

Overclocking the PICAXE

Although it's not recommended by the manufacturer of the PICAXE-28, the 4MHz resonator could be replaced with a 16MHz part, or anything in between. This will not only allow your programs to run up to four times faster, but allows serial input and output at up to 4800 baud, at 8MHz, and 9600 baud, at 16MHz.

There is, however, a penalty to be paid; all the commands which rely on having a 4MHz clock for timing will be affected. You are likely to encounter problems with the BUTTON, INFRAIN, LCD, NAP, PAUSE, PULSIN, PULSOUT, PWM, SERIN, SEROUT, SERVO, SLEEP, SOUND and WAIT commands at the very least.

You will also need to switch back to using the 4MHz resonator for program download and when using the DEBUG command. You can save the effort of continually switching resonators by fitting your target hardware with the required resonator, and building a programming jig with the 4MHz part fitted, moving the processor between the two as required; don't forget to turn off the power first !

Overclocking can't be done on the other PICAXE processors, as they all use internal RC oscillators, and are fixed to operate at 4MHz.

I haven't tried overclocking a PICAXE-28 myself, but I have heard reports that it can work. Once again though, I must re-iterate; if it doesn't work, or causes damage or other problems - don't blame me, the manufacturer or supplier.


In Conclusion

The PICAXE is a superb product, which fits the role it is designed for perfectly. If you can live within the limitations it has when using it for other purposes it can be an excellent choice for a number of reasons -

  • Incredibly cheap; you can buy five PICAXE-18's for the cost of the cheapest Basic Stamp.

  • Single chip design, requiring few external components. Easy PC serial port interfacing.

  • A choice of PICAXE processors, with two new variants on the horizon, and more planned for the future.

  • Erasable to standard PIC parts, and replaceable by standard PIC's.

  • Free software development environment, with comprehensive manuals, plus code and project examples. It supports PICAXE, Basic Stamp, native PIC assembler programming, flowchart entry and simulation.

By now, you've probably guessed that the PICAXE gets my vote. I have been so impressed that I just had to spread the word.

If you decide to use the PICAXE, I hope you'll be as satisfied as I am. It may not be a 'killer processor', but in its price class, measuring value for money, I reckon it's the best of the breed.


And Finally ...

I'd like to thank Tech-Supplies and Revolution Education Ltd, in particular their Technical Director, for all the help provided while I have been writing this article, and the provision of, and permission to use, images from their site.

It has been an extremely pleasant experience dealing with companies and people which are open and frank about their products, and have been willing to help when I've needed clarification.

Am I biased towards them ? Yes, you can bet I am, but I can assure you that I have no link to them other than as a happy and satisfied customer. I only discovered the PICAXE range by accident, but have been so impressed that I believe praise needs to be made.

I can only thank Tech-Supplies and Revolution Education Ltd for making the PICAXE range available, and wish them all the best for the future,


PICAXE Commands

PICAXE-18 and PICAXE-28 Native Commands

BRANCH
BUTTON
DEBUG
EEPROM
END
FOR ... NEXT
GOSUB
GOTO
HIGH
IF ... THEN
LOOKDOWN
LOOKUP
LOW
NAP
PAUSE
PEEK
POKE
PULSIN
PULSOUT
PWM
RANDOM
READADC
READ
RETURN
SERIN
SEROUT
SLEEP
SOUND
SYMBOL
TOGGLE
WRITE
 
 
PICAXE-18 and PICAXE-28 Pseudo Commands

BACKWARD
FORWARD
HALT
LCD
SWITCH ON
SWITCH OFF
WAIT
 
 
Additional, PICAXE-28 only, Commands

IF INFRA ... THEN
INFRAIN
READMEM
SERVO
WRITEMEM
 
 
 


Processor Comparison

Please see the separate PICAXE Comparison page.


Download Cable Configuration

PC
Signal
9-way Socket 25-way Socket Cable
Colour
Molex
Header
PICAXE
08 18 & 18A 28
RX Pin 2 Pin 3 Orange Pin 1 Pin 7 Pin 2 Pin 7
TX Pin 3 Pin 2 Red Pin 2 Pin 2 * Pin 3 * Pin 6 *
GND Pin 5 Pin 7 Brown Pin 3 Pin 8 Pin 5 Pins 8
and 19

* Via resistor network. See the PICAXE-08, PICAXE-18 and PICAXE-28 manuals for further details


PICAXE-28 Baud Rates when Overclocking

Baud Rate specified by
SERIN / SEROUT command
Resonator Fitted
4MHz 8MHz 16MHz
T2400 / N2400 / OT2400 / ON2400 2400 4800 9600
T1200 / N1200 / OT1200 / ON2400 1200 2400 4800
T600 / N600 / OT600 / ON600 600 1200 2400
T300 / N300 / OT300 / ON300 300 600 1200


Purchasing PICAXE Processors

PICAXE processors, and a variety of other electronic and robot engineering components, can be purchased online from Tech-Supplies in the UK.

Orders can be accepted from within the UK, the EU and internationally. Payment can be made using all internationally recognised credit and debit cards, as well as by cheque.

Automatic credit account facilities are available to all schools and colleges registered in the UK, and Credit Terms are available to other business customers subject to status and annual estimated purchases.

For full details, please see the Tech-Supplies web site.


Links

Processors

PICAXE Data Sheets and Other Information

There are a large number of comprehensive PICAXE Data Sheets, Project Example information and other information available for free download from -

PIC Data Sheets ( PDF Format )

UK Based Processor Suppliers

Real Robots Magazine

Cybot Dedicated Sites

Other Sites with Significant Cybot Related Content


Basic Stamp is a registered trademark of Parallax Inc. PICAXE is a trademark of Revolution Education Ltd. PICmicro is a registered trademark of Microchip Inc. Windows and Windows NT are registered trademarks of Microsoft Corporation. PICAXE and other images provided by, and used with permission of, Tech-Supplies.





Associated Articles

  PICAXE News
  PICAXE Questions & Answers
  PICAXE Comparisons
  PICAXE Pinouts
  PICAXE Serial Interfacing
  PICAXE Infra-Red Interfacing
  PICAXE Wireless Interfacing
  PICAXE LCD Interfacing
  PICAXE LCD Interfacing
  A Real-Time Clock for the PICAXE-18X
  PICAXE Optimisations
  The PICAXE Birthday Box Project
  PICAXE Telephone Exchange Simulator
  The Brainf**ked PICAXE
  The PICAXE Extended Programming Interpreter
  Build Your Own Basic Stamp
  Tech Toys



Sites to Visit

  PICAXE Home Page
  Revolution Education Ltd

  Tech-Supplies Ltd



Site Navigation

  Home Page
  What's New
  Search
  Add Bookmark
  Have Your Say
  Guestbook



The PICAXE Processors © 2002-2004, The Happy Hippy


First published on Tuesday the 23rd of April, 2002 at 10:59:47
Last upload was on Monday the 23rd of August, 2004 at 00:20:47