Replacing picaxe programmer cable ?

I hope you may give me advice on the following subject:

----------------------------------------------------------------
REPLACING PICAXE PROGRAMMER CABLE ?



I tried to replace the PICAXE 027 USB/serial cable
with the TTL-232R-PCB module by "ftdichip"
for
a project that needs a permanent "not-too-long-wire"connection
to my circuit.

It did not work -
the pcb was recognised by PICAXE's macaxepad
but
it displayed "strange" letters & it would not program
(message: "xxxxxxx is not connected/could not be found"
or similar when hitting the "program" button)

Different *settings (baude rates etc.) did not have*
any impact on the result.


May you please give me any advice on ...
- what how i should proceed/what i did wrong ?
- what other/similar TTL/232 Module i should use to replace the programming cable ?


----------------------------------------------------------------
MY TRIES

(please see http://imageshack.us/photo/my-images/571/01tries.jpg/)

version 1

TTL-232R-PCB to picaxe chip (08m2)

RXD ----- serial out (pin # 7)
TXD ----- serial in (pin # 2)

on TTL-232R-PCB:
CTS# ---- RTS
... because the PICAXE PROGRAMMER Cable
has the same connection (pls see circuit as listed below)


version 2

TTL-232R-PCB to picaxe chip (08m2)

RXD ----- serial out (pin # 7)
TXD ----- serial in (pin # 2)


----------------------------------------------------------------
RESULTS

(please see http://imageshack.us/photo/my-images/845/02results.jpg/)

though TTL-232R-PCB was recognised
(a check within mac's terminal window confirmed
that it was accepted as usb device)
i did receive strange messages
within macaxepad's terminal window
with a "blank" 08M2 chip
(the default message is smthng like "hello this is your xxx chip")

i tried different baude rates, the result was the same


----------------------------------------------------------------
CIRCUITS


circuit PICAXE PROGRAMMER CABLE
http://www.picaxe.com/docs/AXE027.pdf
page 16


circuit TTL-232R-PCB
http://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_TTL-232R_PCB.pdf
page 12
 

Andrew Cowan

Senior Member
Solution!

The reason that it doesn't work, is that PICAXE chips are designed to work with RS232 style ports with a resistor interface.

In other words, they need inverted data - so 0v is a logic one, and 5v is a logic zero. You are feeding in the opposite.

You have two options:
1) Invert both lines in hardware, using a transistor invertor (or similar).
2) Invert both lines in software by reprogramming your USB-Serial adaptor. This can be done using FTDI's configuration utility (which was called MPROG last time I checked).

Andrew
 
...
You have two options:
1) Invert both lines in hardware, using a transistor invertor (or similar).
2) Invert both lines in software by reprogramming your USB-Serial adaptor. This can be done using FTDI's configuration utility (which was called MPROG last time I checked).
...

hi Andrew,
Thanks for your immediate reply!

I have to admit that i am quite a Newbe to Picaxe & electronic circuits -
May i ask how/where i need to embed the transistor invertor,
which specifications (ohm ...?) i need to get it ?

any help would be greatly appreciated!
best regards
marc
 

manuka

Senior Member
Rev. Ed's esteemed AXE027 USB programming cable (which sell for ~£10) is known to always work,and should be an automatic choice given your apparent skill level ! However the AXE027 can be very costly outside the UK (outlets here in NZ try to charge x3 the UK price for it...), & alternatives are worth considering. Some months back Australian users pointed out the Nanjing Qinheng Electronics HL-340 "blue" offering, which sells on Ebay etc for just a few Euros. I've sourced several via NZ TradeMe outlets,& when the ch341ser.exe driver is downloaded can personally confirm these Chinese cheapies are "out of the box" PICAXE friendly. Stan.
 

Attachments

thanks, stan, for the hint:
yes, definitely - it's true ... now that i outed myself attaching my sketches it is obvious that i got a below-beginners level of electronic skills;
hence a standard picaxe cable programmer would be my weapon of choice -
the reason why i started this is that i ...
- want my circuit to be plugged straight into the laptop/computer (there is no serial connection on my macbook pro)
- would love to use as few parts as possible (it would avoid the audio plug and audio plug connector)
- plan to use more than 1 copy (which then would probably be cheaper than using the programmer cables)

will have to do some more research on andrew's solution which at least might help to gather more knowledge on my behalf
or really choose the programmer cable and cut the wires

anyhows:
apologies, again, for posting all this -
being a (probably not too fast) beginner i thought i might find a reasonable easy solution (from my point of view)
... not considering that it needs some (more-than-my) expertise to execute them
 

manuka

Senior Member
I'm all PC here so can't confirm that "blue cable" works with a Mac. Anyone?

FWIW I've long been advising folks to just grab an old serial fitted laptop for intro PICAXE programming- so much frustrating time can be wasted with USB-D9 cables that just won't work! This adapter need of course is not unique to PICAXEs, as numerous serial devices (GPS, dataloggers, instruments, marine electronics etc) still insist on serial.

Given the availability of cheap XP netbooks (new ~US$300 & available used in NZ for ~US$100),I'm considering focusing on the likes of "obsolete" single core HP minis for future PICAXE work. Aside from their compactness & light weight they've an extremely bright screen. Unless workrooms can be suitably darkened (not always easy with our "downunder" sunshine!), the dim screens on older laptops can become a eye straining pain for extended daytime work. Stan
 
Last edited:

Goeytex

Senior Member
Your diagram won't work. With the hardware inversion, both signals need to be inverted like in the attached diagram.
The transistors I use are 2n3904. Others will work just as well.

I think the better solution is to download the FTPROG utility from FTDI and program the USB to Serial Chip
to invert the signals.
 

Attachments

Andrew Cowan

Senior Member
Goey - FTPROG, that's the one. It used to be MPROG, but then a FTPROG replaced it.

Mark - FTProg is the easiest option, although if you'd rather do it in hardware, then the top diagram in 'solution.jpg' is almost right. The top inverter (connected to serial out) needs to be flipped horizontally - so serial out is connected to 'in' and RXD is connected to 'out'.

(Just noticed that Goey showed that in his attachment). However note that you don't need the 22K resistor with this method - although leaving it in won't cause any problems to anything.

Regards,
Andrew
 
Thanks so much for all of your patience & advice
-
now even i -being a PICAXE /electronics novice-
do understand how to proceed on this !!!

I will give all of your suggestions a try ...
using Goey's circuit with/without 22k resistor
&
(beforehand) asking a friend to let me use his
windows computer in order to FTPROG my module.

Thanks, again!

marc
 

Andrew Cowan

Senior Member
Just to clarify, you only need to do one of these - you can either use Goey's circuit, or your can reprogram your adapter.

For me, reprogramming the adapter is easiest, but if you don't have easy access to a PC, then Goey's circuit sounds like the best solution.

Andrew
 

Goeytex

Senior Member
As far as the resistors go ....... I kept them at the standard/ recommended values to avoid confusion. It works fine that way.
However the 22k can be eliminated, and the 10K could be changed to 15k to get the voltage closer to 5v.
 
Last edited:
Top