Two Picaxes, One programming cable

beb101

Senior Member
I have been searching the forum for a couple of hours and can't find the answer to the question:

Is it possible to have two Picaxes on one board and have the ability to program them selectively without a switch?

Baxter
 

nick12ab

Senior Member
Is it possible to have two Picaxes on one board and have the ability to program them selectively without a switch?
You can have two download sockets instead. This eliminates the need for switches.

But on a more serious note, if you can use a 9-pin serial cable instead of just the three pin programming cable, then you can use the DTR and RTS signals to control transistors, 4066 analogue switches or an analogue multiplexer. That is, providing that these signals can be set then a download can be run at the same time.
 

Goeytex

Senior Member
Baxter,

Please explain a little better what you are wanting to do and why.

I have a breadboard with 2 Picaxe chips on it. Each Picaxe has it's own USB cable. So when I am writing code in the Program Editor and have two programs open ( one for each Picaxe) I use a #Com directive at the top of each program. This way the right chip gets programmed and I don't have to change cables or serial ports.

=============
'// Program 1
#picaxe 18m2
#Com 1

do
More code here
loop
=============

=============
'//Program 2
#picaxe 08m2
#com 2

do
More code here
loop
=========
 

hippy

Ex-Staff (retired)
Is it possible to have two Picaxes on one board and have the ability to program them selectively without a switch?
As Goetex says, a fuller description of what you want to achieve would help.

It wouldn't be easy apart from using separate download leads or without using a switch of some sorts. There are ways it could potentially be done using logic gating instead of switches but could be error prone ( or more nuisance than help ) and need additional hardware.
 

beb101

Senior Member
Thanks for your answers. I wasn't trying to achieve anything exotic. I am using the Goetex 74HC14 inverter circuit and was simply trying to avoid hooking up another pair of inverters from the 74HC14 and the hassle of another cable. I thought it might be possible to connect both Picaxe serrxds (at the resistor input) to the inverted cable TXD and also both inverted sertxds to the cable RXD. Then through the PE, select the correct Picaxe, 20X2 or 08m2. I further assumed that if the 08m2 was selected, the 20X2 would not accept programming and I could program the 08m2.

I was uncertain about all of this which is why I asked the question. From your answers, this appears to be impossible.

Regards,

Baxter
 

westaust55

Moderator
Other than the #PICAXE directive within the Programming Editor, which will flag if the wrong PICAXE type is conencted it is not possible two have two PICAXE chips in parallel on a download cable - even if theya were the same type/size. During program download the SerialOut line on each PICAXE chips is sending data abck to the PE for checking that the download is happening correctly.

I have not given this much thought as to design or workability but there may be a way to use the switching contacts within the standard 3.5mm stereo programming socket.
There are in the Ground and SerialIn circuits but not the Serial Out circuit. I have used this stereo switching capability in the past with an 74HC sereis hex inverter IC and pull up resistor for a MicrcoMega FPU chip so that it operated "normally" when the programming lead is not inserted into the socket and the switching action allows me to program function blocks in the uM FPU chip when the lead is inserted.

Maybe if you draw a circuit of what you would be trying to achiev with a switch then we can see if it is possible using the stereo socket internal switching contacts.
A link to the Goetex 74HC14 inverter circuit to save others having to search may also be helpful.
 

beb101

Senior Member
Other than the #PICAXE directive within the Programming Editor, which will flag if the wrong PICAXE type is conencted it is not possible two have two PICAXE chips in parallel on a download cable - even if theya were the same type/size. During program download the SerialOut line on each PICAXE chips is sending data abck to the PE for checking that the download is happening correctly.
Thanks westaust55,

From your explanation, you have pretty much put this idea to bed as not workable; however, it would be nice to have this capability. As for the switch, I was thinking along the lines of my repy post here, but with inverted logic (e.g. press a button on one Picaxe to turn the other off),

http://www.picaxeforum.co.uk/showthread.php?20702-Latching-Circuit

I think I will just move on and only work with one Picaxe at a time. The link to the Goetex 74HC14 inverter circuit is here,

http://www.picaxeforum.co.uk/showthread.php?18940-USB-communication-and-power&highlight=Goeytex+CP2102

and his new circuit,

http://www.picaxeforum.co.uk/showthread.php?20704-OPAMP-Inverter-for-USB-Adapters

Baxter
 
Top