Yet another take of sharing the programming cable

vttom

Senior Member
I have yet another take on how to share the programming cable on parts like the PICAXE-14M which don't support serrxd. Below is a circuit diagram.

Code:
                   +----------+
                   |PICAXE-14M|
                   |          |
TX >--*--/\/\/-----+In4       |
      |            |          |
      +--/\/\/--*--+SI    Out1+--+
      |         |  |          |  |
      /         |  +----------+  |
      \         |                |
      /          \|              |
      \           |-----/\/\/----+
      |         |/|
     ---        *-
      -         |
               ---
                -
You need 2 lines of code at the top of your BASIC program to make it work:
Code:
pause 10000
high 1
Basically, what this does is when the PICAXE powers up, the output pins are low by default and the transistor is off, allowing serial data to reach the SI pin. But once the program runs and the 10000ms (10sec) delay is done, output pin 1 goes high, turning on the transistor and clamping the SI pin to ground, causing it to be ignored until the next time you remove power and reset the PICAXE. That means you are free to use serin or whatever on input pin 4 (I chose that because it's physically adjacent to the Serial In pin on the 14M) without worrying about resetting the part or corrupting the program.
 
Top