PICAXE To PIC

Goeytex

Senior Member
About two years ago I given given a (legal/original) copy of PicBasicPro, and an ICD2 Debugger/Programmer. Last week I found myself needing a small/fast program that the Picaxe just couldn't do. I also wanted to program some PICs with the NKM2401 hex code provided by Rev Ed. So I gathered up the stuff from storage and downloaded the proper version of Microchip MPLAB and began reading all of the documentation. I then built a little programming board for 8 & 14 pin 12F and 16F PICS.

After 2 days of reading, experimenting and head scratching, I was finally able to communicate with and erase an old Picaxe 14M (PIC 16F684). After another 2 days, I was able to get an LED flashing. And I am guessing that it will take at least another day or so to figure out how to set the option bits to setup the 16F684 micro to use a 20Mhz crystal oscillator and an external MCLR/ reset switch.

In contrast, when I received my first Picaxe, It took me less than 1 hour to have an LED up an blinking. Another few minutes and it was sending serial data to the terminal. In another hour or so I had it detecting/ reading pulses sent from a 555 timer.

This recent experience makes me better appreciate the Picaxe system and the background work done by the Picaxe software & firmware. Kudos for the Picaxe.

I am not a Picaxe worshiper ( Complete Agnostic in regards to Micros) and sometimes I am quick to point out deficiencies, so I though it was appropriate to share my recent experience and say something really nice.
 

geoff07

Senior Member
Fully agree. Also true of 'C', which apart from floating point and speed (neither of which are critical for most projects) has little to commend it. One Picaxe Basic statement can be equivalent to a whole bunch of 'C' calls, assuming you can learn enough from the 500-page PIC datasheets to make them work. If you have ever tried to drive PIC peripherals (such as the MSSP) in 'C' you will know what I mean, as compared to one-line HSPIIN/OUT commands, for example.
 

nick12ab

Senior Member
Also true of 'C', which apart from floating point and speed (neither of which are critical for most projects) has little to commend it. One Picaxe Basic statement can be equivalent to a whole bunch of 'C' calls
The opposite can also be true and your statement "has little to commend it" is a total insult to the C language.

The PICAXE language might be much quicker to get started with than C or even BASIC compilers for PIC but you can't do operations (e.g. shift bits, mask bits, etc to a variable before comparing it with another) in IF statements (if bit is not a proper alternative) and there aren't even proper arrays.
 

premelec

Senior Member
Please - let's not go into the "my language is better than yours"... again; C is no doubt better than sliced stacks... and I use PICAXEs for my fun...
 

Technical

Technical Support
Staff member
This recent experience makes me better appreciate the Picaxe system and the background work done by the Picaxe software & firmware. Kudos for the Picaxe.

I am not a Picaxe worshiper ( Complete Agnostic in regards to Micros) and sometimes I am quick to point out deficiencies, so I though it was appropriate to share my recent experience and say something really nice.
Thanks for the thanks.
 

Goeytex

Senior Member
@Technical, ====> Your welcome :)


@Everyone Else

My point was not about Basic vs C or compiled vs interpreted or assembly vs whatever. It was more about ease of use and particularly about how the Picaxe IDE/Software integrates all of the background stuff and makes it transparent to the end user. No linker files to deal with, no programmers, no configuration bits/ fuses , and so on.

This guy reflects my view about fanboys and programmers that get stuck on one thing vs another.
Skip to about 11:40 in the video.

https://www.youtube.com/watch?v=iHFm-kVTXW8

Then this:

https://www.youtube.com/watch?v=DBftApUQ8QI
 
Last edited:

Rick100

Senior Member
I think your experience is pretty typical of getting a new tool chain going. The problem of digging through the datasheet to set up all the registers, gets worse the more features they add to the chip. Mplab X has a Code Configurator Plugin that generates C code for setting up the peripherals. I installed Atmel Studio a few months ago. It went pretty smooth but I still spent a few hours getting an led to blink on an Attiny85. It took a couple more hours to figure out why my blink program wouldn't work in the simulator. I saw a tweet by Dave Jones of the eevblog complaining that he couldn't get Atmel Studio to work with his Atmel Dragon programmer. I don't think it's just pics.
 

Billo

Senior Member
Hmm, I didn't have that much trouble with PicBasic Pro, but I agree, PICAXE is hands down the simplest and easiest way to get going in microcontrollers.
 

mpgmike

New Member
I design and build controllers for automotive applications (not professionally). Recently I took the plunge into the PIC platform. After a couple months, I'm getting accustom to the Special Function Registers and all. What I did notice is that if you pull the data sheets for the PICAXE chips, they are capable of more than they do in PICAXE (at least in PIC format). I am so grateful for the start I received from the PICAXE platform, the ease of the language, the ease of programming, etc. As I recall, the PICAXE site refers to the program as "educational". That it has certainly been. Thanks again!

Mike

PS, I'm here posting now so I haven't given up on PICAXE just yet.
 
Top