Selectively programming 2 P1s with 1 Plug
escher
Posts: 138
in Propeller 1
I have two P8Xs but only one Prop Plug, so I would like to be able to manually switch between sending the 4-bit programmer signal to Prop A or Prop B with a physical switch which will switch an "enable" signal between outputting to A vs B.
I should(?) be able to accomplish my goal by using two 4-bit tri-state buffers to the output data bus, with the switch's output serving as the enable signal driver.
Two of these 74HC126s seem perfect.
Two of these, with the 4 output enable pins connected to one pole of a physical switch which pulls them high (with a pull down resistor to ground for the OFF position), in my mind does what I'm trying to accomplish.
Is this solution over-engineered? Is there a more obvious way to do this? Thanks!
I should(?) be able to accomplish my goal by using two 4-bit tri-state buffers to the output data bus, with the switch's output serving as the enable signal driver.
Two of these 74HC126s seem perfect.
Two of these, with the 4 output enable pins connected to one pole of a physical switch which pulls them high (with a pull down resistor to ground for the OFF position), in my mind does what I'm trying to accomplish.
Is this solution over-engineered? Is there a more obvious way to do this? Thanks!
Comments
If you want to talk to both P8X's over the link, then a dual-uart like CP2105 would allow that - no mux needed at all.
Simplest shared connection HW would be to use a COM device with both RTS and DTR to drive one reset each, & custom programming SW, but that assumes only one P8X ever communicates during run.
You could OR wire the outputs, if you know only one-at-a-time was managed.
I think the CP2105 is definitely overkill, and I'm definitely not writing custom software to accomplish a task that is tantamount to moving the Plug to a different header when I want to program a different uC haha.
Here's my use case:
I'll be writing and modifying code for both uCs at potentially the same time, and they will be running at the same time. So simply ORing the outputs wouldn't do the trick. So I need to be able to selectively program one or the other at will and leave the other running unaffected.
This is why I'm leaning towards the tri-state buffer and switch technique. Thoughts?
Yes, that's all Prop Plug is - a USB to Serial cable.
@jmg So do I still need the FT232RQ or equivalent? Or should that be built into the USB-RS232 adapter?
That's the part that does USB-UART(TTL), so yes, you need an equivalent.
Cheapest module at Digikey is CP2104-MINIEK @ $4.56, next is Adafruit CP2104 FRIEND @ $5.95, then UMFT234XF @ $6.22 etc & CP2102N-MINIEK @ $8.50
eBay has CH340 and CP2102 version modules for rather less.
Ah, the items I've linked above are all PCB modules, so have USB connector and 0.1" connectors - not bare chips.
Jeeze at that point I might as well just drop the other $10 and get another Plug. Thanks again for all the help!
Of course 2 propplugs are easier.
BTW if you are using PropTool, you can run two copies connected to two separate PropPlugs on the one PC. Makes development easier for different code.
If you really want to control two from one usb adapter,why not disconnect one of the LEDs and use it to switch the output (there might even be an unused output you could use for that). Then you can do it under software control.But I agree,your better off buying another adapter. They are only a couple bucks on ebay. I keep a handful of them around.