Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:58 17 Sep 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PICAXE problem

     Page 2 of 2    
Author Message
Chrisk

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 135
Posted: 11:38pm 10 Sep 2025
Copy link to clipboard 
Print this post

I tried the initial wiring from the FTDI site as ElectroPI suggested.
That didn't work so then I tried the wiring from the picaxe manual, that too didn't work.
I also tried using another Picaxe08M chip thinking it might be the problem and that still didn't get it working

I now have measured measured the voltages at the 3.5mm audio plug and I get 5V at the tip WRT the sleeve.

I then sent the program, and found it went Low for a duration and then back to High.
This seems to agree with what Phil99 says how it should work but unfortunately it's still not working.
I will continue to battle on until we all get an answer.

What should the COM speed for communication be?. I have it set to 9600.

 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2712
Posted: 12:35am 11 Sep 2025
Copy link to clipboard 
Print this post

  Quote  I now have measured measured the voltages at the 3.5mm audio plug and I get 5V at the tip WRT the sleeve.
Ok so the sleeve is ground and the tip is probably Tx and the ring Rx, as indicated by @ElectroPI.
Previously I mentioned cutting the cable to swap the wires but if this is on a breadboard swapping the connections on the breadboard would be better.
  Quote  I then sent the program, and found it went Low for a duration and then back to High.
So that is standard TTL Serial but the PICAXE requires Inverted TTL Serial.
@ElectroPI also showed it may be possible to re-program the FTDI to deliver inverted TTL.
If that doesn't work inverting the signals with hardware will. In my previous post I setup  a MicroMite to use Inverted TTL and proved the transistor inverters will work.
You could also use logic chips as previously mentioned. Use whatever you have in the toybox.

Re baudrate - from PICAXE website:-
  Quote  Name: sertxd
Syntax: SERTXD ({#}data,{#}data...)

Data - are variables/constants (0-255) which provide the data to be output.

Description: Serial output via the serial out programming pin.

The sertxd command is similar to the serout command, but acts via the serial output pin rather than a general output pin, and at a fixed baud rate. This allows data to be sent back to the computer via the programming cable. This can be useful whilst debugging data - view the uploaded data in the PICAXE>Terminal window.

There is an option within View>Options>Options to automatically open the Terminal windows after a download.

The # symbol allows ASCII output. Therefore #b1, when b1 contains the data 126, will output the ascii characters "1" "2" "6" rather than the raw data 126. The # symbol can also be used with word, bit and input pin variables.

Serial Baud Rate and Output Format

The baud rate at which a sertxd command sends data depends on the operating speed at the time the sertxd command is executed. The default baud rates is 9600 baud for X2 parts operating at the default 8MHz speed and 4800 baud for non-X2 parts when operating at the default 4MHz speed.

All data bytes sent have 8 data bits, use no partity and have 1 stop bit. This is commonly refered to as "8,N,1" format; 9600,N,8,1 for X2 parts at default speeds, 4800,N,8,1 for non-X2 parts at default speed.

Effect of Increased Clock Speed

Increasing the clock speed increases the serial baud rate as shown below.

4MHz 4800 (default for non-X2 parts)
8MHz 9600 (default for X2 parts)
16MHz 19200
32MHz 38400
64MHz 76800
Applies To:
All (except 08, 18, 28, 28A)
See Also:
serouthseroutserrxddebug
Related Create:
Serial LCDSerial OLEDSerial GLCDSerial Connector (D) Serial Connector (3.5mm)

For most chips the default power-up operating frequency is 4MHz so I think you need 4800 baud. For X2 chips use 9600 baud.

Edit.
You can test the FTDI by linking Tx (tip) to Rx (sleeve) then anything you type in TeraTerm should be echoed back to the screen.
Edited 2025-09-11 15:49 by phil99

Footnote added 2025-09-11 20:45 by phil99
A mistake
  Quote  You can test the FTDI by linking Tx (tip) to Rx (sleeve)
Should be "You can test the FTDI by linking Tx (tip) to Rx (ring) "
 
mozzie
Senior Member

Joined: 15/06/2020
Location: Australia
Posts: 174
Posted: 06:19am 11 Sep 2025
Copy link to clipboard 
Print this post

G'day Chris,
Good news I hope
I have tested the circuit desribed by Phil99 on a Picaxe08 and it works with a generic TTL232 lead  

Hopefully you have a couple of generic NPN transistors and 4 resistors in a bitsa box somewhere, and you figured out which connection is which on your lead.




TXD = TX data from the converter cable, ditto for RXD = RX into the converter cable.
Good Luck  

Regards,
Lyle.
 
Chrisk

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 135
Posted: 01:34am 12 Sep 2025
Copy link to clipboard 
Print this post

Hi All
I tried putting inverters in the Rx and Tx lines and the message I got from the program wa that it couldn't find the device.
I am taking a trip to visit Mossie so hopefully an answer will soon arrive.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2712
Posted: 01:51am 12 Sep 2025
Copy link to clipboard 
Print this post

You can test the FTDI cable by unplugging it from the PICAXE and linking Tx (tip) to Rx (ring) then anything you type in TeraTerm should be echoed back to the screen, no matter what baud rate or signal polarity is used.
.
Edited 2025-09-12 11:56 by phil99
 
Chrisk

Senior Member

Joined: 21/12/2014
Location: Australia
Posts: 135
Posted: 10:16am 15 Sep 2025
Copy link to clipboard 
Print this post

Just in case this is required by someone in the future.

The solution was to invert the RxD and TxD lines as suggested by several members.

I used a 7400 quad NAND but it didn't seem to work, so postponed any further investigation as I had arranged a meeting with Mozzie.

Keep in mind that the 3.5mm audio connections are different to the actual AXE027 as mentioned by members.
Where the Sleeve is GND, collar is RxD and the tip is TxD.

It's all working thanks to you guys and a BIG thank you to Mozzie who had this problem before and was able to carry out the procedure like a pro to fix my problem, using FT_Prog as mentioned by ElectroPI.

Thanks Mozzie and all the members who came in on the discussion.

And I thought the use of the PICAXE was going to be simple.

 
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025