Picaxe 20X2 download problem

umoharana

Member
Hi,
I am a new bee. I have just beginning to learn and got stuck in the first place.
This first time I am trying to assemble and program a micro controller. My project is for a high speed photography device.
My lap top is Vista and does not have a serial port.
I bought a 20X2 picaxe chip and wired and soldered as per the manual. Prepared a serial down load cable. Since I do not have a serial port I bought one usb to serial converter.
Computer and as well as the programming software recognise the port . But when I connect to the board and power on the board, it does not recognise the hardware.

I have double checked my connections and the soldering. All are perfectly okay. Can some one help me out.

Thanks in advance.
 

westaust55

Moderator
Welcome to the PICAXE forum

Which USB to serial converter are you using.
What chips set does it use?

Some USB adapter chipsets do not recognise the "break" signal generated by the Programming Editor software and thus while the PE can see the USE to serial adapter it will not function as needed.

Please confirm that you have the two resistors shown in the PICAXE manuals for the programming circuit to the PICAXE chip SerialIn pin.


EDIT: Prolific PL2303 chipset is one that from past reports on this forum works well with the PICAXE system.
 
Last edited:

inglewoodpete

Senior Member
Which USB to serial converter are you using.
What chips set does it use?
To determine the USB-to-Serial converter chipset, set to your computer's Hardware Manager and search through the available USB ports to find one that says it is a COM port. Post what it says back on the forum.
 

umoharana

Member
Thanks for the reply.
The USB to serial converter I have, uses a FDTI chip set. I do not know whether this chipset can recognise "break" command.

1) I have soldered a 20PIN socket for the 20X2 PICAXE. The PICAXE controller chip is inserted.
2) Two resistors are also connecged as per manual.
3) I have connected 3 LEDs in source mode.
4) I have prepared a down load cable with 3.5 steri pin at one end and 9 pin D-connector in other end.
PINs are cooected as per manual.

When I connect and run the programming editor it syas no HW found.
In PE there, when I perform test the port, as per instruction. I get 0.8 v when "on" a 0.3 v when off.

Need help to understand , where is the proble ?
Should I go ahead and buy AXE-027 cable ??

Thanks
 

hippy

Ex-Staff (retired)
The USB to serial converter I have, uses a FDTI chip set ... In PE there, when I perform test the port, as per instruction. I get 0.8 v when "on" a 0.3 v when off.

Should I go ahead and buy AXE-027 cable ??
FTDI chipsets should support the break command but the voltages are incorrect whether the polarity is correct or inverted.

Double check that you have everything wired correctly, remove all extraneous components such as LED's, test again and if still not working then post a clear picture of your full configuration.

We recommend the AXE027 as that is preconfigured for use with the PICAXE and problems will usually be easier to solve.
 

inglewoodpete

Senior Member
OK. The FTDI chip is the same as is used in the AXE027. The output should switch between 0v and +4.5v or 5v (roughly).

I am running a 20x2 on a 5v regulator (good batteries will do just as well). With my AXE027 (which incorportates an FTDI chip) lead plugged into my Toshiba laptop, I get very close to 0v when the green test "LED" is dull. When I click on the test "LED" button, I get about +4.9V on the programming pin.

If I unplug the programming lead from the PICAXE circuit, I get similar voltages between the serial and common connections on the 3.5mm plug (tip and ring if you understand the terminology).

Check the voltages you get from your lead when you unplug it.
 

umoharana

Member
Thanks for all the advice. My problem still remains.
I did following experiment again.

1) I removed the 3.5 pin socket and soldered terminal posts.
Now I have free ends instead of 3.5 pin.
PIN 19 of PICaxe is connected to PIN 2, 9-pin D-connector of Serial port.
PIN 2 of PICaxe is connected to 22k Resistor and then to PIN 3 of D-connector
PIN 20 of PICaxe is connected to PIN 5 of D-connector.
PIN 20 is connected to "0" v.
10k Resistor is also connected as per manual.
PIN 1 of PICaxe is connected to +4.5 v of battery pack.
I have checked the tracks for any solder bridge.
2) The PICAXE chip is powered through 3X 1.5 v AA batteries.

When I run scan for usb cable it comes back with the message that no AXE027 cable found but you can still keep using Port14.
In my lap top, This usb to serial converter is recognised as serial port.

3) Make of USB to serial converter is Z-TEK. Since USB to serial coverter has male connector and my 9 9 pin D-connector is also male connector, I use female to female converter in between.

I can not figure out where I am going wrong.
Need help to proceed further. May be I should go ahead and order a AXE027 cable.

Thanks in advance.
 

inglewoodpete

Senior Member
~sigh~ to quote myself....
Check the voltages you get from your lead when you unplug it.
Tell us the voltages you get out of the serial end of the USB-to-serial cable. Then we have a chance of knowing which way to guide you.

To put it simply, the AXE027 does work. Your cable may work if you help us to help you.
 

umoharana

Member
Picaxe 20X2 down load problem

Thanks for advice. Here are the voltage readings.

1)PICAXE Connected and powered on.
Voltage between "0" v (Pin 20 ) and serail In Pin (Pin 2)

Button clour Dark Green= -0.52 V
Button colour light green= -0.22 V

2)1)PICAXE Connected and powered on, but serial in / out wires interchanged.
Voltage between "0" v (Pin 20 ) and serail In Pin (Pin 2)

Button clour Dark Green= +5.5 V
Button colour light green= +0.53 V

3)PICAXE is not connected. USB to serial connected and voltage is measured between PIN-5 and
Voltage between "0" v (Pin 20 ) and Serial In (Pin 3). These PIN numbers refer to 9 pin D-connector pin when looked from behind.
Button clour Dark Green= -6.45 V
Button colour light green= +5.73 V

I have attached a pdf file with complete connection diagram and the readings.

Thanks again.
 

Attachments

Technical

Technical Support
Staff member
As Hippy said in post 6 your FTDI porlarity is inverted. You also had the cables around the wrong way to start with - the 0.5 to 5.5V is the correct swing, but inverted.

The FTDI chip can be programmed to 'invert' the signals, and your test 2 (test 3 in the diagram) proves your FTDI chip in the adapter is currently programmed to the wrong polarity. It will never work unless corrected.

As you have been short circuiting the PICAXE output against the FTDI output when doing the wrong tests (when you get the two very low voltage readings) you may well have damaged either (or both). The wires 2-3 are reversed because of the strange female-female adapter setup you have been using.

Buying an AXE027 is so much simpler....
 
Last edited:

umoharana

Member
As Hippy said in post 6 your FTDI porlarity is inverted. You also had the cables around the wrong way to start with - the 0.5 to 5.5V is the correct swing, but inverted.

The FTDI chip can be programmed to 'invert' the signals, and your test 2 (test 3 in the diagram) proves your FTDI chip in the adapter is currently programmed to the wrong polarity. It will never work unless corrected.

As you have been short circuiting the PICAXE output against the FTDI output when doing the wrong tests (when you get the two very low voltage readings) you may well have damaged either (or both). The wires 2-3 are reversed because of the strange female-female adapter setup you have been using.

Buying an AXE027 is so much simpler....
Is there a way to correct the programming FTDI chip ?
I have checked the female to female connector. The conversion is one to one.
Does it mean it may have damaged the PICAXE chip also ?

I would go ahead and order the AXE027. But it would take a while to for me to receive that from UK. I am in Singapore. In Singapore price is more than double.

Thanks.
 

umoharana

Member
You can reprogram the ftdi chip with FT-PROG.
Attached: Readme file for ftdi-prog (links to software to.).
Thanks. In the mean time I could search in net and found FT_prog and did the necessary reprogramming.

1) If I connect as per manual. I get same result.No change in result.
2) If I inter cahnge the RX/TX wires as per my previous posting I am getting correct voltage swing.

Dark Green = 0.5 volt
Light Green= 5.5 volt.

But the problem is the device is still not recognised.

I am puzzled.

Thanks.
 

inglewoodpete

Senior Member
1) If I connect as per manual. I get same result.No change in result.
2) If I inter cahnge the RX/TX wires as per my previous posting I am getting correct voltage swing.

Dark Green = 0.5 volt
Light Green= 5.5 volt.

But the problem is the device is still not recognised.
Good news! What happens to the voltages what you connect the programming lead to the PICAXE?
 
The scan for usb-cable is only for the axe027 cable. If it say that you can use the com14, then find it on the list and click on it and press apply.
 

hippy

Ex-Staff (retired)
I must admit I am completely confused.

It seems to me you have a USB to 9-way D interface, and if that 9-way D is meant to be PC and RS232 compatible it should already have idle low and active high signalling, which would be compatible with a PC, RS232 and PICAXE.

The diagram in the manual is correct for connecting a PC or RS232 signal on a 9-way to a PICAXE.

In post #10, looking at 3 ( cable disconnected from PICAXE, reading the 9-way D pins ), the voltages would seemingly confirm that to be the case and working.

As the FTDI chip only puts out 0V/5V, seeing -6.45V/+5.73V suggests the cable includes an RS232 line driver.

In post #10, looking at 1 ( cable connected from PICAXE, reading leg 2 of the PICAXE, Serial In ), seeing -0.52V/-0.22V for -6.45V/+5.73V input suggests the -6.45V is being clamped by the internal diode to around -0.5V as expected, but the +5.73 input is being pulled below 0V; that doesn't make a lot of sense.

The only thing I can imagine is that things are not wired as you think they are, there's a short somewhere, something is pulling a 0V to some other voltage, or voltages are being measured with the meter 0V to a non-0V point.

Personally, I think getting an AXE027 is the simple and practical way forward. Once you have that working you can do comparative testing with known correct connections to try and determine why the USB to 9-way D and/or 9-way D to PICAXE cables are not working.
 

umoharana

Member
Hi all,

Thanks for all your quick support and advice. My lap top is able to communicate to the PICAXE now. I could identify the problem.

The problem was with the female to female connector. This connector configuration is not 5+4 to 5+4 but 5+4 to 4+5. I should have used a female connector itself for making that cable. I made that cable assuming that my lap top has a serial port, without checking. Hence I had used a male connector. It continued then onwards.

(5+4) side of the F/F converter connected to usb / serial port. Other side for the F/F connector is in ((4+5)... upside down) configuration. When I was connecting the cable I have to make it upside down. Hence PIN 5 of D-connector was becoming pin-1. Like wise pin 2& 3.

Now I corrected the pin connection on the serial cable.
Earlier I had reprogrammed FTDI for inversion. I removed the inversion. It works perfectly now.

Thank you all your support. Now I will be posting for programming guidance for my actaul work My first hurdle is over.

Regards,
 
Top