Long story short, I'm replacing the stereo jack connector on the Picaxe Usb Programming Cable with Female Headers. Which wires inside the cord are serial in, serial out, and ground?
Inside the Picaxe Usb Programming Cable, there are six wires. Black, yellow, orange, green, brown, and red. Only three are needed for communication. Black goes to ground. Orange goes to serial in. Yellow goes to serial out. Thank you everyone for your assistance.
On the AXE027 datasheet, It shows that the only connections going out from it are TXD, RXD, and Ground. So there were just extra, unused wires in the cable, or six wires are being used for TXD, RXD, and Ground.
If there's 6 wires inside the cable there's probably other RS232 signal wires in addition to RX and TX. I'd guess at least RTS and CTS. You can try elimination to figure out which is which. Use your multimeter to test wires. NOTE: THIS IS NOT A 100% RELIABLE AND SAFE WAY TO FIGURE OUT THOSE WIRES. You'll probably end up frying your cable and computer and burning down your house. DO THIS AT YOUR OWN RISK.
Take ground first because that should be easy. Picaxe programming cable's datasheet shows that ground is connected to USB connector's shield so you can use the shield or the ground pin of the USB A connector for testing. You can check the pinout of USB A connector from Wikipedia. Connect one multimeter probe to the shield or ground pin and find the ground wire(s) with the other probe. Check all wires in case there are multiple ground wires. Mark all ground wires.
Next find out which wires are inputs and which are outputs of FT232R (the chip inside the Picaxe programming cable). FT232R's datasheet saves the day here. Starting on page 18, table 5.3 it says that UART output voltage low minimum is always greater than zero. Output voltage's minimum level depends on Vccio and drive level but +5V is my guess in this case. If Vccio is +5V (or if it's greater than +1.8V) FT232R's UART outputs should have at least +0.3V on every output. Note that there's a voltage divider on at least TX pin (see programming cable's datasheet) so the voltage is a bit lower (but not much). I checked my cable and got 0.201 volts between ground and TX. That's a little lower than what I expected but it'll do (maybe my el-cheapo multimeter just sucks).
To find out which wires are FT232R's outputs and inputs plug the cable to USB port and check the voltage on all remaining wires. At this point we are making following assumption: Wires that have about +0.3V (or more if they are high) are outputs and wires that have 0V are inputs. Mark all assumed inputs and outputs so you can tell which is which.
If there's only one wire that has about +0.3 voltage that is FT232R's TX pin (mine had +0.201V). In case there's more than one wire that has about +0.3V (or more if they are high) do this: By looking at the RS232 pinout here you can tell that there's 3 possible outputs from FT232R. Possibilities are DTR, RTS and TxD. I'm not that familiar with RS232 comms so I can't tell which states to expect from these wires (high or low). Only thing that I'm sure of is that if you send something from your computer the TxD line is the one that carries the data. You could try to find TX pin by sending data from terminal to serial port and testing which one of the assumed output wires changes between low and high. A logic probe would be handy on this but a multimeter should do too. Multimeter should show a bit higher voltage on the wire if it's voltage (pin state) changes rapidly. If there's only one wire among assumed output wires that has rapidly changing voltage when you send data to a serial port that is the TX wire.
If there's only one pin among assumed input wires that has 0V that is the RX pin. If there's multiple wires that have 0V (not counting ground wires) then I suggest following: If you have already figured out the TX wire (see above) connect ground and TX to your Picaxe. For each assumed FT232R input wire connect it to Picaxe and try "Check Firmware Version..." button on Picaxe Programming Editor's "Options..." window. If the Programming Editor can read the firmware version of your Picaxe chip you have found the RX wire. If you are not yet 100% certain which of the assumed output wires is TX then you just have to try every possible combination of output and input pins. Make sure you don't connect any FT232R output to Picaxe's output (because if one goes low and the other goes high you may see blue smoke). One by one try to connect each combination to your Picaxe and try "Check Firmware Version..." button on Picaxe Programming Editor's "Options..." window. If the Programming Editor can read the firmware version of your Picaxe chip you have found RX and TX wires.
Thank you so much. I think I'm getting closer to figuring this out.
Don't see 6 wires on this.
Have you thought of making an adapter? That way you can have both 3,5mm stereo plug and pin headers. I made one for myself. Only difference is that I used male headers so I can use it on breadboard. Here's a picture of my creation:
I have tried this with ATMega8 USART and it works just fine even though baud rate topped at 78.6k (maybe because of breadboard and/or my wiring). Manual 1 page 7 will help you if you end up making an adapter.
Edit: Note that Picaxe programming cable uses inverted RX and TX signals. So if you use it with other chips you must invert signals. You can do it with hardware or you can try FT_PROG from FTDI to configure the chip inside the Picaxe cable. I used HW approach just because I didn't have guts to mess with my only Picaxe programming cable :-)
I have an seril picaxe cable, and I want to use it to program an arduino. If i understand it right, I can make an adapter that will connect the 3.5mm plug, to an inverter chip ( http://www.frys.com/product/1003353) and then connect that to the ardruino. And I Should be good right?
I have never used Arduino so I can't tell for sure. If Arduino uses serial programming without any hardware flowcontrol (meaning only RX and TX wires are used) then I guess it should work.
Patrick did it the other way around so you'd probably want to check out his "Programming a Picaxe with a Arduino FTDI Cable" post too (http://letsmakerobots.com/node/21245).
Take the stereo connector you cut off. Grab your continuity tester and simply see what section of the stereo conector is connected to which wire. That's it.