Home and Links
 Your PC and Security
 Server NAS
 DVD making
 Raspberry Pi
 PIC projects
 Other projects
 Next >>
The exorbitantly priced PIXEXE USB to serial download cable uses a stereo plug at the PICAXE end. This means it is limited to Rxd, Txd and Gnd only. The 'in circuit' (breadboarded) PICAXE being programmed needs it's own power +5v supply (at least no other voltages are required) ! The PICAXE itself could be run from the USB +5v, however a typical application will likley involve a mix of voltages and current draw in excess of the USB limit to power motors and the like. Limiting the serial link to 3 wires helps to protect your expensive PC from errors in construction. On the other hand, a 3.5mm stereo plug is (typically) used with Gnd on the 'tip', Serial out of PICAXE is on the sleeve (which is Gnd on normal cables) and Serial into PICAXE (10k to Gnd, followed by 22k to pin) is on the ring. I would personally recommend using 0.1" flying leads, Red for PC Txd (PICAXE Rx), Blu for PC Rxd (PICAXE Tx) and Black for Gnd. These can be plugged straight into the typical 0.1" breadboard matrix used fror prototyping. NB. It's a good idea to install at least one LED, fitted from any pin via 330 ohms to Gnd, and have your program 'flash' that LED to indicate all is well :-) Note that the PIXAXE serial data lines are inverted compared with RS232 standard, specifically, a logic '1' is +5v, a '0' is Gnd. A pair of NPN BRT transistors are all that is needed. These are fitted at the USB converter end. A pull-up on Txd is required only if one is not already fitted on the USB <> serial converter pcb. The RS232 specification requires all pins to be either positive between +3 and +15 volts or negative, -3 to -15 volts, with +/- 12 being the norm. The range +3 to -3 is thus invalid, however many PC's cut corners and some used +5v (OK) and 0v (not OK). For this reason, almost all modern serial converters have no 'invalid' band, accepting 0v as negative, and any +ve. The 'idle' state, for the data lines (Txd, Rxd) is the -ve voltage, however data logic '1' was also negative. So the 'start bit', a logic 0, is +ve, the data bits are 'inverted' ('0' is +ve or +12v, '1' is -ve or -12v) and the end or 'stop' bit is -ve (same as idle). For the PICAXE, data inverters are fitted. This means PIXAXE data idle will be +ve. A pull-ups at the PICAXE on the incoming Serial In will ensure idle when the cable is removed. At the USB<>serial end, a pull-up on the inverter will ensure the converter sees a low voltage level. The control signals have the opposite polarity. The asserted state is the positive voltage and the de-asserted or inactive state is the negative voltage. The standard 9pin serial socket on older PC's (Data Terminal Equipment, or DTE) is defined the following pins :- 1 - DCD, Data Carrier Detect (input), +12 when the terminal (DCE) is ready 2 - Rxd, Serial Data (input) 3 - Txd, Serial Data (output) 4 - DTR - Data Terminal Ready, (output), +12 5 - Gnd. 6 - DSR, Data Set Ready (input), +12 when the terminal (DCE) is ready 7 - RTS, Request to Send (output), +12 when the PC is transmitting, else -12 8 - CTS, clear to Send (input), +12 when the terminal (DCE) is ready 9 - RI - Ring Indicator (input) - sometimes not present, +12 when the terminal (DCE) is ready On a PC, often all inputs other then Rxd will be 'pulled up' (using a 1k or higher value resistor) to 12v, whilst Rxd will be 'pulled down' (to -12v). This allows the PC is operate with 2 or 3 wire DCE serial equipment, where the unused pins are left to float. Many serial link cable sockets link pins 1,4,6,8 and 9 together. This pin combination, plus a (Schottky) diode link to pin 7 (and even pin 3) may be used to obtain power, via a +3v3 or +5v regulator (or even a DC-DC inverter to get -5v) to power the DCE unit.

Next page :- Better PIC instruction set - (mnemonics)