Arduino -> PICAXE

effinrobots

New Member
Hi everyone,
I'm a long-time user of the arduino platform, but I was recently reading up on the PICAXE and was considering picking one up. The pros for the PICAXE are ease and speed of prototyping, however I am a little concerned about a few points:

1. the lack of floating point maths- I find myself using this stuff for some of my arduino projects

2. the limited memory for variables- is it really as limiting as it sounds or am I just overestimating the need for variable space?

So, give me a reason to take the plunge! If anyone experienced with both platforms or with the points above could give a little insight, I would greatly appreciate it.
Thanks :eek:
 

BeanieBots

Moderator
I have no experience of the arduino, but I came from OOpic and hence had to make a similar sacrifice as well as losing object oriented.
Took a little getting used to but soon got the hang of it and that was before PICAXE had the if/then/else structure!
The benefits were MAJOR cost reduction and significantly smaller size.

From your user name (see mine) I'd guess that we are interested in similar topics.
I've not found the lack of variables to be too restrictive. It is possible to peek/poke into a reasonable amount of RAM, so you can re-use the variables.
Again, my transition was pre the 28X1 which has many more variables than the lesser beasts.
If you really,really,really need floating maths, there is a co-processor available. It also includes two 12-bit A2Ds. Saying that, you'd be surprised how a little thought can avoid the need for floating maths.
 

No0bert

Member
Picaxe run on many different chips, all from the company called Microchip.
They range from 8 to 40 pins, and is available in surface mount as well as ordinary housing

Many different pre-made project boards are available, and up to large 40 pins projects.

Picaxe has a built in Motor Driver IC (you provide the chip), and it must be the L293D or another of identical pins

Picaxe can run from 4 to 16 Mhz, but if you plan to use Picaxe Basic, you are best off using 4 Mhz and Arduino is only 16Mhz (speed is hardly an issue with robotics in my case though)

Picaxe is waaaay more of an easier programming language, but the Arduino does have a more powerful language

Picaxe is plug and play, better for prototyping, and quick and easy connecting

A picaxe 18 (smaller than 28!) can control 21 servos on a standard board
Arduino=only 20 :/

Arduino works on Mac as well as windows, however picaxe does not I believe

Arduino is more expensive
 

boriz

Senior Member
Welcome Effinrobots (great name BTW)

To elaborate a little on BB statement “It is possible to peek/poke into a reasonable amount of RAM”.

If you have ever done any machine code programming, you will know what magic can be achieved with just a hand full of registers. Well you can think of the built-in variables (B0-B13) as registers. In addition to these, the Picaxe has a useful amount of general purpose RAM (at least 46 bytes) that can be accessed directly by PEEK/POKE commands:

Addresses $50 to $7E - all Picaxes.
Addresses $C0 to $EF can also be used by PICAXE-18X.
Addresses $C0 to $FF can also be used by PICAXE-28X, 40X
Addresses $C0 to $EF can also be used by PICAXE-28X1, 40X1

There is also up to 255 bytes of EEPROM onboard, see DATA statement and READ/WRITE statements. This is of course permanent memory that will remember data while the Picaxe is powered down. The X parts have built in i2c commands if you need to add more memory / IOs or whatever.

Another quirk. No support for brackets or normal priority. All maths is evaluated directly left to right. EG:

B0 = 2
B1 = 2 + B0 * 3

Would put 12 into B1, NOT 8. Its fine once you get used to it though.

Once you try Picaxe, you will find it’s so easy/cheap, that you are unlikely to ever look for another format except for specialist floating point or high speed stuff maybe, but you can use external chips for that and keep the top level of control with the Picaxe.
 

Mycroft2152

Senior Member
At the 28 pin level, the Arduino and PICAXE are pretty much a wash.

The PICAXE comes out ahead with the 8, 14, and 20 pin chips that are excellent for smaller (and cheaper) projects.

Myc
 
Top