PICAXE Popularity

graynomad

Senior Member
messed my cortex.
Oh no, don't bring ARMs into the discussion as well.

or did Santa not bring you what you asked for this year?
Well that's true, I was expecting a Due but no show :(

Documentation is verbose... including the SOURCE CODE for the entire Arduino family.
Of course code is good but it's not "documentation". One of my gripes with Arduino is that to find out what exactly "pin 17" is connected to I have to pull out the schematics and/or delve into the bowels of the core libraries and their associated lookup tables.

For example AFAIK there are no official pinout drawing for Arduinos. In an attempt to help I created this for the new Due.



IMO this sort of thing should be done by the Arduino team. OTOH maybe that's the point of open source and having a supporting community.

Another example from the official reference section

read()
Description

Reads incoming serial data. read() inherits from the Stream utility class.

Syntax

Serial.read()
No mention of return data type, you have to look at some code. Another example

write()
Description

Writes binary data to the serial port. This data is sent as a byte or series of bytes; to send the characters representing the digits of a number use the print() function instead.

Syntax

Serial.write(val)
Serial.write(str)
Serial.write(buf, len)
WTF data types are val, str, buf and len?

Just below that you have some explanation

val: a value to send as a single byte
str: a string to send as a series of bytes
buf: an array to send as a series of bytes
len: the length of the buffer
str: a string to send as a series of bytes -- technically it is not a "string", it's an array of char (or maybe bytes) with a NULL termination.
buf: an array to send as a series of bytes -- an array of what?
len: the length of the buffer -- is this a uint8, int, long, long long.

To be fair as this is C++ maybe the functions are overloaded to handle all possibilities, but I shouldn't have to trawl the source code to find out.

And although they do say to use the print() function to send characters I doubt a beginner will understand the implications and there's no mention of why code like

x = 5;
Serial.write (x);

Doesn't show anything on a terminal. That will stump a beginner for days. (Hint, 5 is not an ASCII printable character)

OK, rant over :) Sorry, I'm a bit of a documentation freak.
 

Haku

Senior Member
Well, Dippy, I thought you enjoyed over-clocked hyperbolic obfuscatory palaver - to vacillate lugubriously before choosing the ideal micro is stressful and I hope there will be better information for making the right choice... or is there a right choice? :) Yours from the lower throughput floor.... [I dropped it - it's there somewhere... ]
You sound like you know what you're talking about, could you possibly translate into lamens terms what this scientist is talking about?

http://www.wimp.com/buildit/

:D
 

graynomad

Senior Member
Not addressed to me but I'll have a go at translating that into "layman's" terms. Listen carefully...

It's bullshit, but brilliant bullshit.
 

premelec

Senior Member
@Haku - that's great! and he didn't even mention the ambihilical reverse monopoles that are required! Thanks for that! I recall there is also a site for code that runs but is impossible to tell what it's going to do until you run it [there were prizes for the best [worst] code....]

@graynomad... you've almost convinced me I have to have one of those so I can spend the rest of my time on earth figuring out how to flash a couple of LEDs - dis-ARM me now!
 

graynomad

Senior Member
ambihilical reverse monopoles
Well it's not my field but I thought the weak point in the whole demonstration was the fact the flange gaskets were totally ignored, your fancy ambihilical reverse monopoles won't even get off the starting blocks without a good flange gasket.

so I can spend the rest of my time on earth figuring out how to flash a couple of LEDs
A lifetime well spent if you ask me...better than frittering it away building something useful.

I recall there is also a site for code that runs but is impossible to tell what it's going to do until you run it
I found it here
 

mrburnette

Senior Member
Of course code is good but it's not "documentation". One of my gripes with Arduino is that to find out what exactly "pin 17" is connected to I have to pull out the schematics and/or delve into the bowels of the core libraries and their associated lookup tables.
Rob,
First, I love the Due diagram. Fantastic effort.

You are correct in that part of open source is relying on folks like you seeing the need for documentation and creating & sharing same with the community. In many regards, it is a small subset of the use community that drives the future products: some in it for the fun of it and other in it for the economic rewards... LadyADA (Adafruit) and Sparkfun comes to mind here.

In the PICAXE world, some of this forum's members here have made wonderful donations of their time and produced polished tools and documentation. Individual efforts do make a difference.

All of this goes to the a common point: no matter what hardware you elect to use, the end-user community and their support via forums and support sites adds a significant value to the overall hardware value.

- Ray
 
Last edited:

womai

Senior Member
I found Womai's succinct comments, on page 8, about Basic -v- 'C' very interesting and in line with my conclusions. That PICAXE Basic is efficient for short microcomputer programmes but 'C' should be considered for more than a few pages. I notice that he uses Mikroelektronica Basic and 'C' compilers and would like to know how he rates these compared with the PICAXE IDE. My first impression is that they look rather complex (and powerful?) development tools.
MFB, actually my point was the exact opposite: C is no better than modern Basic (e.g. VB or Mikrobasic) with regards to producing well-structured code (and as a result, make large programs well maintainable). It's only Picaxe Basic that does not have all the necessary ingredients (like functions with parameters).

MikroC, MikroBasic (and similar compilers/IDEs from competing vendors) are indeed a bit more complex (though not excessively so) than the Picaxe Programming Editor; that's also because they give you access to all the low-level settings and controls of the microcontroller. That said, Mikroelektronika provides a nice set of simple example projects; if you get one of their development boards (which are very well thought out yet inexpensive) then getting these examples to run is merely a question of "open the project, click Build&Program, done!", which takes about a minute after powering up the board. Been there, done that.

That said, I would still recommend the Picaxe to any beginner because after that initial success with the demo program the learning curve on "big compiler" is steeper than on a Picaxe (which stays simple), unless you already have a decent amount of programming & uC experience to begin with.
 
Last edited:

MFB

Senior Member
I specifically mention "PICAXE Basic" not modern Basics and was therefore agreeing with you. Thanks for the compiler information. I will probably buy the Mikroelektronika Basic compiler for some planned projects using the 28-pin version of the PIC 32.
 

srnet

Senior Member
I specifically mention "PICAXE Basic" not modern Basics and was therefore agreeing with you. Thanks for the compiler information. I will probably buy the Mikroelektronika Basic compiler for some planned projects using the 28-pin version of the PIC 32.
I have done one project, the lost model locator, in both PICAXE basic and Mikrobasic Pro.

I did not find the lack of a structured language in PICAXE a problem.

Space occupied, code size, in a 28X2\18F25K22 was about the same.

The PICAXE environment is easier to work with, a beginner with little or no knowledge of PIC hardware would find the PICAXE environment a LOT easier to work with.

The only difficulty with the PICAXE was the lack of math functions, floating point and trig.
 

womai

Senior Member
MFB,

note that Mikroelektronika offers fully functional demo versions of their compilers (only limited in the size of the compiled program); the demo limits are pretty generous and well sufficient for even quite advanced projects (unless you include functions from some of the more memory hungry libraries, e.g. LCD), so you can try before you buy.

If you don't care for the development board you could also get a Microchip Pickit 2 (around $30) and be done; the Pickit has standalone software (no need to install the full MPLAB) that can look at a HEX file and download it whenever it changes, which works nicely together with the compiler to automatically reprogram the chip whenever you compile. That solution (Pickit 2 + Demo Microbasic) about the lowest cost option overall to get started, and the Pickit can program a huge variety of devices, including PIC24F, dsPIC, and PIC32, which is more than any of the Devboards can do. (Also the Pickit allows to use a different vendor's compiler as well).
 

Dippy

Moderator
I was impressed with their Dev boards. Cost a few quid but i ended up with 3 for various things.
I wasn't a fan of the compiler or the IDE or the 'help'. I dumped it. But that was 5 years ago so the bugs and moans may have been sorted by now.
 

MFB

Senior Member
Many thanks for all the advice. The PicKit + demo compiler seems like a good low cost route, as I don't really need a full blown development board. I'm using the 28X2 shield and prototype boards for my current project (great value and a very flexible development system) but may have to migrate to the 28-pin Pic32 for the next.
 

ThierryP

New Member
... The only difficulty with the PICAXE was the lack of math functions, floating point and trig.
OK, these are not all built-in and easily accessible, but..
I have had a lot of fun on a Picaxe 20X2 with the Q16.16 fractional math library of Jeremy Leach, so, albeit with some extra effort and probably too slow for some applications, there is some more complex arithmetics available for Picaxe if really needed: see Link.

For X2´s there is also a minimal and not very accurate set of Math functions: Sin, Cos, Sqrt, Atan built in, or have I misread that? See Manual 2, page 25.
If there's a need for more accuracy, then for a particular function there's probably a suitable approximation to be found on this forum or on the internet that can calculate a function's value with the help of Integer maths or Q16.16 maths.
 
Last edited:

nick12ab

Senior Member
For X2´s there is also a minimal and not very accurate set of Math functions: Sin, Cos, Sqrt, Atan built in, or have I misread that? See Manual 2, page 25.
The X1 and X2 parts also support these unary commands
SIN ; sine of angle (0 to 65535) in degrees
COS ; cosine of angle in degrees
SQR ; square root
INV ; invert / complement
NCD ; encoder (2n power encoder)
DCD ; decoder (2n power decoder)
BINTOBCD ; convert binary value to BCD
BCDTOBIN ; convert BCD value to binary
NOB ; count number of set bits (X2 only)
ATAN ; calculate the arctan of a value (result 0-45 degrees) (X2 only)
 

graynomad

Senior Member
we EE's can be somewhat demanding on documentation... at least I am
Me to.

I use those silly little sticky chip top labels
They're not a bad idea really. I remember using them for 4000-series CMOS chips years ago.

Kind of hard to do that when the chip has more pins than I have fingers and toes!
Yeah I think a sticky label for a 217-pin QFP might be a problem.
 

womai

Senior Member
I was impressed with their Dev boards. Cost a few quid but i ended up with 3 for various things.
I wasn't a fan of the compiler or the IDE or the 'help'. I dumped it. But that was 5 years ago so the bugs and moans may have been sorted by now.
Yeah, the IDE underwent huge changes about 2 years ago; they basically rewrote both IDE as well as compilers. The IDE is much better now than it used to be (and finally the same across compilers and uC platforms!), and the compiler is blazingly fast.
 

IronJungle

Senior Member
The model for Arduino is different than PICAXE. On Arduino everything is open sourced. If you and I wanted to build and sell a cheaper "UNO" board we could go online and get the Eagle files, etc and go into business manufacturing our own. After spending some time with the Arduino I put in another order for 3 of the $9 Nano form factors. If the education and hobby market is driven by cost (which I would say is a big factor) then the market share lines are going to continue be redrawn for awhile.

IronJungle... I think the misconception of expensive derrives from the official "retail" pricing. The best Amazon price on the real UNO is around $20. I am a real believer in everyone purchasing at least one official product. Clones can come later as with homemade modules.

The same advice goes to PICAXErs... buy from Rev.Ed. or a licensed reseller.
 
Top