Electronic – arduino – Programming a PICAXE with an Arduino
arduinopicaxe
Can you program a PICAXE microcontroller with an Arduino Duemilanove
Maybe with the ICSP (6 pin) header?
Best Answer
This post on the Adafruit Forum would suggest not. I've used PICAXE's a bit, but not extensively (I felt restricted using BASIC) but usage boils down to the following.
PICAXE's contain bootstrap code which simplifies programming of them, basically as long as they have power being supplied you need three wires to program them, here's a diagram for an 08 chip:
The USB cable which they supply (AXE 027) contains a circuit in the molded USB plug which converts the signal to what the circuit needs (I think the Serial version doesn't require any conversion).
The software supplied (either the Windows based Programming Editor or the AxePad Editor which works on Linux too) allows for programming in BASIC, which it then converts to Hex. This is then loaded onto the chip using the cable/bootstrap code, whichever editor is used the type of chip is detected prior to the Hex being uploaded, probably prior to it being compiled in fact.
Programming a PICAXE using a normal programmer will erase the bootstrap code thus reverting it to being a standard PIC.
If you can find a way of using the Duemilanove to program a PIC then you may be able to modify this to enable PICAXEs to be programmed the same way (since PICAXEs are just PICs plus the bootstrap code). I've had a quick Google for it and nothing obvious leaps out.
EDIT In response to Tom Hargrave's question, the PICAXE website is here: http://www.rev-ed.co.uk/
They have lots of different options, there may be something there that meets your requirements, if not then post back here and we'll see what we can do. I have an Experimenter Kit which was about £30 or £40 and can take most if not all sizes of PICAXE, setting up the programming circuit on a breadboard is quite straightforward though and the cables are quite cheap.
Do you mean standard i2c speeds or something specific to picaxes or blinkM?
"The standard clock (SCL) speed for I2C up to 100KHz. Philips do define faster speeds: Fast mode, which is up to 400KHz and High Speed mode which is up to 3.4MHz."
Adding your own ICSP header is easy, however your solution will work just fine, you are just using the Arduino board as a socket with an ICSP already wired up. If your programmer will supply power to the ATMega then do not power the Arduino board any other way (do not connect USB).
Further to Davr's answer - you must always attach ground, but you can leave the V+ free if your board is powered independently.
Best Answer
This post on the Adafruit Forum would suggest not. I've used PICAXE's a bit, but not extensively (I felt restricted using BASIC) but usage boils down to the following.
PICAXE's contain bootstrap code which simplifies programming of them, basically as long as they have power being supplied you need three wires to program them, here's a diagram for an 08 chip:
The USB cable which they supply (AXE 027) contains a circuit in the molded USB plug which converts the signal to what the circuit needs (I think the Serial version doesn't require any conversion).
The software supplied (either the Windows based Programming Editor or the AxePad Editor which works on Linux too) allows for programming in BASIC, which it then converts to Hex. This is then loaded onto the chip using the cable/bootstrap code, whichever editor is used the type of chip is detected prior to the Hex being uploaded, probably prior to it being compiled in fact.
Programming a PICAXE using a normal programmer will erase the bootstrap code thus reverting it to being a standard PIC.
If you can find a way of using the Duemilanove to program a PIC then you may be able to modify this to enable PICAXEs to be programmed the same way (since PICAXEs are just PICs plus the bootstrap code). I've had a quick Google for it and nothing obvious leaps out.
EDIT In response to Tom Hargrave's question, the PICAXE website is here: http://www.rev-ed.co.uk/
They have lots of different options, there may be something there that meets your requirements, if not then post back here and we'll see what we can do. I have an Experimenter Kit which was about £30 or £40 and can take most if not all sizes of PICAXE, setting up the programming circuit on a breadboard is quite straightforward though and the cables are quite cheap.