PICAXE Popularity

IronJungle

Senior Member
Why isn't the PICAXE more 'mainstream'? When I decided to add uC programming to my hobby list most searches turned up Arduino this and Arduino that. It was like it is all Arduino all the time or something and Arduino is only logical choice for the hobbyist.

I learned about the PICAXE from the LMR site and felt that was the way to go. For me, the PICAXE has the Arduino beat in several areas (all that were important to me); easy to get off the ground with, easy to pull off a dev board (low min circuit requirements), tough as nails, crazy cheap in cost, and documentation that is written for real humans to read. After showing an Arduino pal of mine how quickly I can prototype a PICAXE project he saw the light and is changing platforms.

So what limitations am I missing that seem to make the Arduino so popular? Am I missing some magic features or something that the Arduino has or is it just better marketing?

Go PICAXE!!!
 

Haku

Senior Member
One of the major draws I see towards the Arduino are the numerous sheilds available for the main dev boards, but it's a double edged sword, sure you can build up a circuit very quickly but the setup you endup with is huge and a lot of people don't progress further than sticking some pre-made circuitboards together for the final iteration of a project (meaning large boxes needed to cope with the size). Whilst the Picaxe does have starter kits - I began with one so I was pretty much guaranteed a working circuit from day one instead of trying to debug a setup I didn't know on the chance a homebuilt circuit didn't run first time - a lot of people have figured out how easy it is to build their own Picaxe circuits so they tend to continue down that route because there's very little components needed for a fully working Picaxe including programming socket and it's much much cheaper than buying pre-made boards with a bunch of connectors & extras you might not be using.

The Arduino has the ability to cope with numbers that have decimal places, something which the Picaxe is sorely lacking, however there have been only one or two instances I truly wanted the ability to work with larger than 16bit numbers and numbers with decimal places, on the whole I've found it a fun challenge to get round the decimal place problem.

There almost seems to be a snobbery from some of the Arduino crowd regarding uC's that they perceive as less powerful, but in my (limited) experience the Picaxe is a very powerful and versatile uC that doesn't need to rely on library code to get basic things such as serial comms working.
 

Goeytex

Senior Member
Each platform has it's pros & cons and there is no "one size fits all" in the hobby microcontroller world.

I like the Picaxe for its relative ease of use and the high level BASIC programming. With some reading and experience, a person can have a relatively complicated program written and debugged in a few days or even in a few hours. But with the ease of use comes some limitations such as less programming space and much slower processing than for a comparable PIC. These limitations are not relevant in the majority of applications where raw processing speed ,intensive math calculations, large programs, etc are not needed. .

However, there are some applications where other platforms such as Arduino ( Atmel), PIC, 8051, ST7, et al may be a more appropriate and even necessary choice.

Arduino marketing may be some of the reason for it's popularity, but that's not the only reason. It is a good platform with good support and like the Picaxe is relatively inexpensive to get started with. It can process many times more instructions in a given period than the fastest Picaxe.

However the learning curve for a true beginner will be exponentially higher than with a PIcaxe. If you gave one programming newbie a Picaxe Starter Kit and and another an Arduino, and told them to make an Led flash at 1000 hz.... The Picaxe newbie might could have that done in a day or less while the Arduino newbie after a week or so might still be scratching his head.

I particularly like the Picaxe for rapid prototyping and proof of concept projects. Development time can be a fraction of that with some other platforms. And not to be forgotten is the Picaxe Community and the great support given here by Rev_Ed and by the many selfless volunteers willing to help solve just about anything that comes up that is even remotely related to a Picaxe.
 
Last edited:

premelec

Senior Member
I love the PICAXE....

I came to it via BASIC Stamp and Peter Anderson's mention of the PICAXE -sort of accidentally - I had been doing BASIC programming for many years on Commodores and PCs so was familiar with the basics of that... The stamp didn't have ADC and easy interface to PC etc... question -

Is the arduino programmable in any language other than C? - without too many convolutions in converters etc.

I have recommended PICAXE to many people as it's just so easy to get going and I think more people will continue if they accomplish their goals in a short time leading them on to more complexity. Go 'AXE!
 

MFB

Senior Member
The PICAXE is very quick to learn how to use, whilst its slow speed and lack of FP maths are not important limitations for many applications. However, the reason that I am (slowly) also getting to grips with the Arduino is to be able to use its range of software libraries. If you take a look at the SparkFun site you will see that they often provide Arduino interface code when introducing a new smart sensor or wireless device etc, but never include a PICAXE example.
 

MFB

Senior Member
Another advantage of starting to use the Arduino development environment is that it is becoming something of a cross-microcontroller standard. In addition to the original 8-bit AVR editor/programmer, there is now a 32-bit PIC version known as the chipKIT MAX32.

Anyway, only knowing one microcontroller is a bit like having a tool kit that only has a hammer. You approach every problem as if it was a nail!
 

eclectic

Moderator
snip
Anyway, only knowing one microcontroller is a bit like having a tool kit that only has a hammer. You approach every problem as if it was a nail!
A hammer?
Bit of an incomplete analogy there.

How about a Swiss Army knife?

e
 

srnet

Senior Member
How about a Swiss Army knife?
The same applies.

In my walking\climbing\weekendaway rucsac, I have a Swiss Army knife, the type one with the longer locking blade, so useful for the places you goto on Hols where the kitchen knives are blunt.

On my keyring I have a Leatheman Squirt, far superior to a similar size swiss army knife in that application.

Different tools for different applications.
 

MartinM57

Moderator
Agree with all the above - I use PICAXE, Arduino and AVRs programmed in CodeVision C or assembler, depending on the job to be done.
 

Dippy

Moderator
Haha ... I didn't put in a suffix number just in case PICKIT4 or 5 came out tomorrow - and some smarty said "How about PICKIT5" :)
The MELABS programmer has a nice facility for keeping your eye (records) on batch programming, but I reckon everyone knows that already.
 

Armp

Senior Member
Originally designed as an educational system for schools, the PICAXE system has now also been widely adopted by hundreds of thousands of 'hobbyists' due to its ease of use. Each year thousands of high school students are also introduced to electronics and microcontrollers via building a PICAXE project.
This is Rev Eds target audience, and I'm sure they dominate the market.

IMHO the Arduinos et al are used by more experienced programmers that want/need a modern structured programming environment, huge libraries of user code, and would run screaming from the room if you showed them code containing a single GOTO!

I use 68HC11, 9S12, ARM LPC2103 and recently PICAXE. The latter excels as a $4 solution for a smart LCD controller, but I get rapidly bogged down if the code exceeds 2 pages, or I need more than 20 variables, or arrays, or strings, or negative numbers... Then I turn to the $9 ARM breakout board and C compiler.

Horses for courses
 

SAborn

Senior Member
Most people see micros as "dont force it get a bigger hammer" approach, i personally like pushing the boundaries of the picaxe and find it more of a challenge than a box of bigger hammers.

I had recently had a program in picaxe of all of 10 lines of code, i asked a friend (not a picaxe supporter) to rewrite to to a pic, it took him a week or more and complained about how hard it was to replicate several commands in pic.

There has only been a few projects that i have done that fall outside the ability of a picaxe and it has always been due to the speed not any other reason.
 

tinyb

Member
As a teacher of micros and electronics for the last ten years, i found the picaxe by the silicon chip articles. it was about the time that i wanted easy interface with an LCD and use ADC commandsl. doing it with a native pic and corechart was a nightmare and it took at least a week of lessons to get kids to blink an led. I now get students to blink leds, control trafic lights and use a digital input in one introductory lesson (3 weeks in assembly).
As for Arduino, i have started to use them as they have some ready made solutions that we have used in prototyping our concept 2 creation projects but the students hate coding in C and usually just copy and paste and expect me to fix the bugs. With the new picaxe sheild base and the daisy picaxe (when is that to be released?) i have found it easier to marry the rapid solutions found for ardunio and get the students to build the picaxe equivalent.
Keep up the good work rev-ed. and keep up the great forum, thanks hippy, saborn, west aus, dippy and all the rest for your countless replies and suggestions, many answers can be found by doing a number of refined searches and this is a great teaching aid.

thats my 2c worth

tiny

edit: i like the fact that the picaxe goes from a small 8pin to a big 40pin and various sizes inbetween, i have used most over the years and the students find it easy to move between them infact enjoy deciding on which chip best suits their problem (usually the one i don't have at the time).
 

MFB

Senior Member
And thought it was just me who finds C an awkward language! Most Arduino books assume you already know C and just show how to cobble together ready made code. However, I can recommend "Beginning Arduino Programming" by Brian Evans because it starts from scratch. This book has at least made me understand the advantages of C for 'large' programmes but I still think anything under a couple of A4 pages worth of code would be quicker to implement in PICAXE basic, unless you need much in the way of maths.
 

premelec

Senior Member
More of my history w/PIC

I remember that I went to a 2 day seminar with Microchip guys in 1995 came away with a "Picstart" package which included simple programmer and lots of written material - I tried a few things and became convinced that unless I was going to devote a whole lot of time to it I was not going to get much done. In short if I was designing for production of thousands of widgets it was going to be worth while.... however I wasn't... so I put it aside where it still sits in a box on a shelf waiting for me to list it on ebay :)

I'm glad to hear that there is some book helping Arduino people who don't know C... I once read "From Basic to C" book which had lots of examples of code conversion to get the same result in C as BASIC. I asked friend who was a professional C programmer if it was worth my time to learn C [at age 60] and he said "no". I think we need an esperanto computer language... :) [I did some FORTH and 6502 assembler and am so happy that PICAXEs use mini BASIC...].

I've seen the trend to embedded PCs and so on... I hope none of these are running any nuclear reactors... Soon there'll be a chip with 1TB lines of embedded code that costs $2 in million lots and washes the dishes... and more! Brave new world...

Happy holidays and working coding to y'all
 

Goeytex

Senior Member
.... so I put it aside where it still sits in a box on a shelf waiting for me to list it on ebay :)
LOL, ..

I have 2 PIC programmers (never used), a Xilinx DSP Xtreme Development kit (new in box), An Actel Development Kit (never used) and Kits/Programmers for nearly for every ST Micro made. One of these days I'll ........
 

srnet

Senior Member
I think the real question is not why the PICAXE is not more Arduino like, but the other way around.

For the Arduino the software is given away and people make money out of selling the hardware. So the more hardware you sell the more money you make. Is C the right language to use if you want to maximise sales of hardware ?

Lets face it, whilst C may be a good language for large complex projects where performance is a key criteria, the vast majority of what people want to do, or could do, with Micros is not in that category at all. C is hardly an accessible language for the masses, or for schools. With decent compilers is there really a major differance between what a complied C program and a complied Basic program can do ? I suspect the differance is small, althopugh C zealots are unlikley to admit it.

So how much more popular would the Arduino platform be if it was available in an accessible language such as used in PICAXEes ?
 

Goeytex

Senior Member
So, what is stopping the development of BASIC for Arduino ?

I have PIC Basic Pro for the PIC, but admittedly never even tried it since discovering the Picaxe.
 

geoff07

Senior Member
IMHO the Arduinos et al are used by more experienced programmers that want/need a modern structured programming environment, huge libraries of user code, and would run screaming from the room if you showed them code containing a single GOTO!
There is no reason at all to use C if you want structured code (always a good idea). Picaxe Basic has all the necessary constructs so that gotos are never necessary (or desirable) for reasons I won't repeat. Picaxe Basic is a million miles away from what Basic started as, and really should have a new name altogether.

The key things to know are do/loop with all the options including exit; select/case/endselect etc. The only reason to use C that I have found after quite a few Picaxe projects, would be raw speed. But although I can code in C and have the necessary development kits I have never actually been tempted because there is almost always a way to do it with Picaxe with a bit of thought. Hardware interrupts and 64MHz clocks pretty much solve most things. And the avoidance of the C cycle is a major time saver in terms of development and maintenance. Many of the Picaxe commands are effectively a call to a complex library of high speed system functions that probably aren't much slower than C libraries anyway. Another advantage is that is is harder to write unintelligible code in Basic!

What Picaxe Basic lacks (for now at least) is floating point (or high level primitives to control an fpu without branching off into an entirely new learning curve); block structured code (local variables); functions and subprograms with parameter passing; simple arrays; etc. But these are hardly actually necessary and can be simulated. Perhaps the best improvement would be direct access to more of the memory, or some primitives to create lists in ram. But none of these is necessary for the rev-ed target market, so are unlikely when there is so much else to do.
 

Armp

Senior Member
With decent compilers is there really a major differance between what a complied C program and a complied Basic program can do ? I suspect the differance is small, althopugh C zealots are unlikley to admit it.

So how much more popular would the Arduino platform be if it was available in an accessible language such as used in PICAXEes ?
I agree there is little/no difference between compiled C and compiled Basic, but the comparison at hand is Compiled C vs Interpreted Basic. That's a big difference IMO.

As for your second point take a look at the Coridium ARMmite PRO family. http://www.coridiumcorp.com/ARMduino.php
I've used a significant number of these boards with compiled Basic, they are good value for money, but I suspect most users overwrite the Basic and use C. Why? Because the world IS C!

Merry Xmas to all from NY (but Pompey is still 'home')
 

Dippy

Moderator
Exactly. But you'll wear out your ";" button with C.

Ultimately the 'efficiency' and features are in the hands of the compiler authors. And there are a couple of BASICs I've come across that will give C a run for it's money but in a limited range of Micros.
C is old fashioned and clever all in one. It's kind of clumsy but it is the standard. Learn C and you can programme all popular Micros. Oh and the snobbery... dear Lord it's pathetic.

But wrt learning the basics to a reasonable level and at such a reasonable cost I can't think of anything better than PICAXE.
Throw in the Forum help and PICAXE really does stand out.
As Churchill didn't say; Never, in the field of human computing have so many people been able to write so many programmes for so few quid.

Move into professional circles and the story changes again.
C gives you 'access' to many more processors and there are so many variants designed towards specific apps.

Like we say over and over again; Horses for Courses.
 

nick12ab

Senior Member
Without intending to cause offense to PICAXE BASIC at all, but if there was no BASIC and no flowcharts would C be in the position BASIC is in now or would everyone have been scared away from microcontroller programming completely?
 

graynomad

Senior Member
Granted C is not an easy language, but the aforementioned flashing LED example on Aduino is as follows

Code:
void setup() {                
  pinMode(13, OUTPUT);     
}

void loop() {
  digitalWrite(13, HIGH);   // set the LED on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the LED off
  delay(1000);              // wait for a second
}
You can't get much simpler than that and it certainly won't take a week to get it going. You can't compare interpreted BASIC (especially a simple one like on the Picaxe) against C, they have nothing in common. They both have their place, but those places are not even in the same district.

One thing mentioned above is "why isn't the Arduino more like the Picaxe?" Very good point, why hasn't someone written a BASIC interpreter for the Arduino, Geoff Graham did one in 8 days for the Maximite.

One reason I think Arduino has taken off is that it's open source, Picaxe is not. Whether any conclusions can be dawn from that I''m not sure but I suspect it has helped. Add the options to write in raw C or even assembler, massive library support, a forum as good as this one, and increasing multi-platform support and you have a combination that's hard to beat.
 

eclectic

Moderator
"You can't get much simpler than that"
Code:
void setup() {                
  pinMode(13, OUTPUT);     
}
void loop() {
  digitalWrite(13, HIGH);   // set the LED on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the LED off
  delay(1000);              // wait for a second
}
Yer whaa?


I'm 12 and I see the above code.

Then I see Manual 2, p.260
Code:
main:
switch on B.7 ; switch on output B.7
wait 5 ; wait 5 seconds
switch off B.7 ; switch off output B.7
wait 5 ; wait 5 seconds
goto main ; loop back to start
Hmmm?
e
 

Armp

Senior Member
Try ARMBasic on the ARMmite PRO:

Code:
DO
  IO(15) = 0   ' turn on the LED
  WAIT(1000)   ' wait a second
  IO(15) = 1   ' turn off the LED
  WAIT(1000)   ' wait a second
UNTIL 0        ' loop forever
Or in C:

Code:
while(1){       // loop forever
  LOW(15);      // turn on the LED
  WAIT(1000);   // wait a second
  HIGH(15);     // turn off the LED
  WAIT(1000);   // wait a second
}
Not a whole lot of difference?
 

graynomad

Senior Member
Well I did say "You can't get much simpler than that", not "any" simpler :)

I agree that for a 12-year old the Picaxe example makes more sense, but the title of the thread is "PICAXE Popularity" not "PICAXE Popularity with 12-year olds" and I would argue that to any adult with an ounce of logical thinking ability the C example is only maybe 5% more complex and therefore easily understood.

Now if my example had been

Code:
for (i = 0; i < !x - ~(B1100110) + (y % 3); p++) *p = (z < (a << 4) == 3) ? c : d &= e; // pretty obvious, no comment required
I would agree :)
 

IronJungle

Senior Member
so I put it aside where it still sits in a box on a shelf waiting for me to list it on ebay :)
I had a FSL Tower Mech Dev Board for the 32-bit ColdFire. I simply gave it to a friend after doing this robot project as a learning exericse:
http://youtu.be/ciBoF8iUFgU

The Tower Mech/ColdFire was just *way* to complex for just plinking around. I know the ColdFire and the PICAXE are two totally different tools, so comparing them is not fair, but could an experienced PICAXEr get my project above to work with the PICAXE?
 

premelec

Senior Member
differences...

The fact that many codings are _similar_ is often the case - however the fact that there ARE differences and you have to remember _what_ they are for the code to work is the difficulty... You could reverse the accelerator and brake levers in two autos - a minor change - however driving those autos could be problematic for some of us... or perhaps another mechanical example of having some things assembled with left hand thread and some right hand [and on a bicycle pedal each side is different]... simple details yet in the way of facilitating operation. It would have been fine for me if various notations were standardized between programming languages [and I mentioned FORTH... ha] - some of these things were evidently simply to minimize keystrokes - which I often do in symbol definitions and am impressed when particularly long symbol definitions are used - and must be typed many times... Where the differences are functional - like bike pedals - keep them - otherwise why do it... This qwerty keyboard I'm using is an example of disfunctionality in a long accepted standard determined by mechanical typewriters little used at present - long live etaoin sherdlw! :)
 
Last edited:

srnet

Senior Member
Cant agree witht the only stupid people dont understand C type of argument.

There appears to be a Basic Complier of sorts for Arduino;

http://www.rhombus-tek.com/BC4Arduino.html

This is an interesting comment from that page;

"Six of the Arduino 'C' sample programs have been converted over to BASCOM and are available below. The resulting code is more compact, and when controlling I/O Pins runs faster than Arduino 'C'. Plus the absence of 'extra characters' makes it perfect for learning, but it is equally well suited to serious control applications"
 

graynomad

Senior Member
Re the Rhombus-tech examples, they are not being fair in the way they have displayed the two "smoothing" codes to indicate that the C is much more verbose. Here is a more consise version of exactly the same code.

Code:
#define NUMREADINGS 10
int readings[NUMREADINGS];
int index = 0, total = 0, average = 0, inputPin = 0;

int main() {
  Serial.begin(9600);
  memset (readings, 0, sizeof(readings));
  for (int i = 0; i < NUMREADINGS; i++) readings[i] = 0;
  while(1) {
    total -= readings[index];
    readings[index] = analogRead(inputPin);
    total += readings[index++];
    if(index >= NUMREADINGS) index = 0;
    average = total / NUMREADINGS;
    Serial.println(average);
  }
}
Note that this is much smaller in size than their C example and 3 lines shorter than the BASCOM equivalent albeit more characters. What I can't explain is the 3x larger code produced by the C. This compiles to 2356 bytes when the BASCOM example is apparently 860 bytes. However I think this is an indictment against the Arduino serial library not C per se.

If you remove the two calls to the Serial library the code compiles to 494 bytes, nearly half the BASCOM example (although that does include the printing), so I think the problem is with a bloated Arduino Serial library not with C. Truth is you could setup a UART and send a string with about 5 lines of code so I suspect those calls are pulling in a load of crap that's not needed for this example.

An alternative to DigitalRead/Write is already built into BASCOM and provides the high speed I/O Pin control mentioned above, but it does require a little understanding of Port registers.
DigitalRead/Write does not require any "understanding of Port registers". The Arduino "language" is a hardware abstraction layer (HAL), exactly the same code runs on several processors without modification. If you use the HAL calls you do take a performance hit, many of them are not known for their efficiency, but if you are happy to "understand the Port registers" you can manipulate pins as fast as using assembler code.

I had a look at the BASCOM docs, it seem pretty nice and I think a good upgrade path and/or alternative for Picaxe BASIC if you wanted play on a different platform. But it costs $112 when Picaxe BASIC and C/C++ are free.
 

hippy

Ex-Staff (retired)
Here's the equivalent PICAXE code for the example given in post #36. More 'definitions' required as we can't put them all on one line and include comments and don't have array definitions.

How to compare sizes on two very different, compiled versus interpreted, architectures ?

Perhaps the best way is percentage of memory used of what's available. Let's assume the target for C and BASCOM has 32KB so ...

C : 2356 / 32768 = 7.2%
BASCOM : 860 / 32768 = 2.6%
PICAXE : 54 / 2048 = 2.6%

Quite interesting and, of course, the percentage used would halve for an X2.

Code:
#Picaxe 08M2

Symbol NUM_READINGS  = 10

Symbol ADC_PIN       = C.1

Symbol value         = w0 ' b1:b0
Symbol previous      = w1 ' b3:b2
Symbol total         = w2 ' b5:b4
Symbol average       = w3 ' b7:b6
Symbol index         = b8

Symbol BYT_READINGS  = NUM_READINGS - 1
Symbol BYT_SPACE     = BYT_READINGS * 2
Symbol FIRST_READING = 10 ' b10
Symbol LAST_READING  = FIRST_READING + BYT_SPACE  

Do
  For index = FIRST_READING To LAST_READING Step 2
    ReadAdc10 ADC_PIN, value
    Peek index, Word previous
    total = total - previous + value
    Poke index, Word value
    average = total / NUM_READINGS
    SerTxd( #average, CR, LF )
  Next
Loop
 

srnet

Senior Member
How to compare sizes on two very different, compiled versus interpreted, architectures ?
Difficult, and my impression is that such comparisions may be used to demonstrate the favoured language of the author.

If C is so good, consider this, would the PICAXE be more or less popular if it used C ?
 

hippy

Ex-Staff (retired)
If C is so good, consider this, would the PICAXE be more or less popular if it used C ?
That's probably impossible to answer; would it have attracted its intended target audience so well ? Likely not, so would it even have existed ?

The thing with all comparisons are they are much more than about the choice of programming language; it's the entire package as a whole, its target audience and its purpose.

There has always been the option of "here's a micro, here's some software tools, here's an IDE, here's a hardware programmer, you figure it out and get on with it" and there have been many attempts to make that simpler, easier, cheaper and more accessible and the PICAXE seems to have got it right in what it aimed for. It has also attracted people like myself and others quite capable of handling more complicated environments when they must but appreciate not having to deal with that for a hobby or in having fun.

Popularity is a difficult measure; would Apple computers have been more popular if they'd used their famed design skills to produce the same hardware but running Windows ? Probably, but they wouldn't be "Mac" as we know them. It's often more about fulfilling needs and desires than absolute popularity.
 

VK5MW

New Member
I personally prefer the picaxe because I understand basic over C. I started with arduino and almost gave up on pic until P Anderson got me going in the picaxe direction. I can read pic basic and get some idea of what the code it doing without picking up a manual. It's like everything in life though. There always will be lovers and hater's out there.

As for the flashing LED

Start:
Toggle B.7
Pause 1000
Goto Start

How much easier can it be?
 
Last edited:
Top