Clive Seager, developer of the PICAXE system. You can see my CV at my invitation request, and thanks to Ichan for the invitation.
http://www.sonsivri.to/forum/index.php?topic=45505.0This (lengthy) post is not to advertise or to talk about cracking/code protection. Anyone knows it is possible to crack or break any system, some easily, some with a bit more effort. With Microchip PIC’s code protection it is not actually that hard. Just Google or find the right person. What I do want to explain is the educational ethos of PICAXE instead.
The PICAXE system is unique in that it was never intended for the users of this Sonsivri forum. It was designed for 13 years olds in the school classroom. Rather than an expensive software compiler (e.g. Swordfish or PICBasic ) or a relatively expensive ‘module’ (like a BASIC Stamp or Arduino) the idea is that students in schools can learn about electronics at a very low cost by simply taking a microcontroller chip and placing it in a circuit, ideally one they solder together themselves. That way we actively encourage and create the electronic engineers of the future.
... I like my pic chips and just could never bring myself to paying more for the same chip just so I could use their IDE software as I'm plenty proficient with other compilers...
The PICAXE system is not for you. We’ve never made any secret of that, why use the PICAXE system when you already have more advanced skills? PICAXE is for beginners, those who don’t have any PIC programmers or technical knowledge such as what a configuration fuse is. Education never ends, so I am delighted that we also have both 8 and 80 year old users and can get them easily started in the world of microcontrollers. Once they outgrow the PICAXE many do then move on to other systems. Or become engineers, which is what we want:
http://www.picaxe.com/Teaching/Inspiring-Engineers-of-the-Future/Our most popular product, the one of which I am most proud of (as it has introduced hundreds of thousands of school students to their very first microcontroller project) is a ‘PICAXE chip and PCB’ for 99p (about US$1.20) We have maintained this same price for over ten years, simply because if the price wasn’t this low, schools couldn’t afford to do the projects with their students. When you take into UK duties, warehousing and staff costs this product actually make no profit at all. Yet it is our best seller!
http://www.picaxe.com/Teaching/PICAXE-in-Education/Hence I’m not overly bothered about a public domain hex file not generating a few pence/cents ‘royalty’ on a preprogrammed PICAXE chip, everybody knows a companies profit are in dev kits/modules, not on individual chips. Hence the reason that Arduino and BASIC Stamp are far more profitable than PICAXE. In fact for the 08M we already give these hex files away completely free to educational development partners in India and South America. The hex file extracted from a code protected chip is still copyrighted, and hence any unauthorised use is still taking without permission, but that is not the main issue. The main issue we have is with providing our award winning educational support to a modified chip.
First some technical background:
On 12f683 where is the program / token stored?... but doesn't the 12f pic can not write it's own flash memory?...
a 12F683 can ...
No it can’t. That is exactly why the PICAXE firmware works the way it does. Ten years ago no 8 pin PIC chip could re-write its own program memory without an external programming circuit like a PIC Kit. So the PICAXE firmware is preprogrammed into the program memory area and the compiled ‘lookup table’ of the user’s BASIC is programmed into the 2048 bits of data memory. So a PICAXE 08M ‘new download’ only programs the data memory, not the program memory. Incidentally my use of bit not byte is deliberate.
So the PICAXE compiler does not generate hex, it generates a lookup table that interacts with the preprogrammed firmware. And the firmware in intensively optimised to fit in the space available, layer upon layer of hand crafted assembly optimisation to get it to fit in the very limited space available in those early small memory PIC devices. C was never an option, it’s way too bulky for a 1024 or 2048 word device.
Which leads me to the main reasons we don’t release the source of the firmware:
1) It is intensively optimised hand crafted assembler. Unless you are a very experienced assembler program it will mean nothing to you, and even if you are it will take a very long time to understand all the optimisations. It even takes me a very long time to rework some items!
2) The compiler interacts extensively with the firmware, for instance by poking bits of specific registers. You can’t simply take the PIC source and expect it to work on a different PIC. You would also need to make extensive modifications to the compiler as well.
3) We don’t want inferior non-fully working clones in the educational market
Would have been fun to port it to a dsPIC, for instance.
As point 2 above, that simply won’t work. Microchip have this annoying habit of moving bits in registers (even ones that have the same name), which would instantly break the compiler/firmware interaction when you move to a different part. To do this you would also have to rewrite the entire compiler, not just modify the firmware. Remember with PICAXE we are not talking about a BASIC>assembler/hex based system at all.
So here is the educational problem – and our main market is schools, not hobbyists. We cannot possibly provide our award winning, free, technical support to hacked hex files. Somebody takes the 12F683 file and modifies it to partly work on a 12F675, purely because it is a few cents cheaper. Trouble is then half the functions won’t work as expected. Somebody else does something else on a different chip, and eventually you end up with a situation where no one company can ever provide proper detailed support to every possible variation and clone.
Later this year we will be releasing version 6 of our PICAXE software, which will already convert an entire PICAXE BASIC program to visible raw assembler code. And that code is specifically written to be user readable – with our educational ethos of encouraging the engineers of the future.
Or in other words anyone can download a completely free advanced PICAXE BASIC to assembler compiler. This will enable anyone, without any cost, to download our IDE and generate a raw assembler language equivalent of their PICAXE program to use with a PIC Kit2 or similar programmer on the PIC of your choice. We have a limited version of this function already in our software, but the new version will be far better and much more powerful, supporting every PICAXE command (where technically possible). So even if you don’t have a PICAXE chip (or any other PICAXE product) you can still use our BASIC language, for free, on almost any PIC chip.
So my request is simple, if you want to use a free BASIC system on any PIC chip, simply wait for our free software update later this year. Don’t go hacking the firmware files of the existing PICAXE chips, you will just dilute a product to the point where it is no longer supportable. And that would be a real, real problem for the schools and educational market we work in.
I’ll try to answer honestly any comments, but to pre-empt any questions that may arise:
1) Revolution is a small company, two full time employees and several part time staff for support/admin/warehouse. Yes, of course any loss of income also really hurts us, but sales of chips themselves are not the main income.
2) I personally take a salary of about 50% of what I would earn as a high-level microcontroller engineer in a UK company. But I do this because I love it. The PICAXE system makes a real difference to the teaching of electronics in schools in a large number of countries.
3) Are the hex files accurate. Yes, of course, seeing so they have just been read out of a production chip. They are however not the latest release for that chip.
4) Will we now consider putting these hex file on our website, yes. But first we need to build a proper structure to support questions about use of, for instance, PIC Kit2. Will we get them removed from depositfiles etc - yes as well. And of course attaching to a message in this forum is also a clear violation of this forum rules – read the footer on any page…
Clive Seager
18 June 2012