Picaxe to PC Serial Not Working

JimboJ

New Member
I've searched high and low through these forums and across google and can't seem to find a reason why I can't send and receive data from my PICAXE chip to my PC and vice versa.

I'm using the PICAXE-18 Standard Project Board (CHI030) and trying to send data via pin 3 and receive via pin 4. If I put a logic probe on the pin I can see it sending the data every second or so (how I've programmed it too) but then on my PC I can't actually receive the data.

The test application I've got is:

Code:
main:
    high 1
    
    for b1 = 0 to 63
    serout 3, T4800, ("Hello")
    serout 3, T4800, (10,13)
    pause 1000
    next b1
I've tried bypassing the darlington chip and just running a wire directory from the pin3 on the PICAXE to no avail. I've also tried both N4800 and T4800 baud types, again with no luck. In saying that, using the download cable and the sertxd command, I can send data to my PC, that's all good and well but I want to be able to send it via pin3.

I haven't tried much with receiving data, but I figure if I can't send it I don't have much chance of receiving it.

Can anyone see what I am doing wrong and how to correct my error?
 
Last edited:

BCJKiwi

Senior Member
More info please.

Do you have more than one serial port in the PC?
Do you still have the Programming editor running?

Previous posts have indicated that the Programming Editor grabs and holds the Serial port as long as it is running so it is available to program the chip. If you want to send/receive data to the PC while the programming editor is open, then you need to use another serial port.

Alternatively, for testing purposes you can use sertxd instead of serout and sertxd will send back along the download cable to the built in serial terminal in the editor.

There is also Hippy's AI terminal which has much greater flexibility but still needs a second port if you have the Programming Editor running.
 

JimboJ

New Member
After I download the application to my PIC I unplug the download cable from the board and plug it into another 3.5mm stereo jack which is wired into a bread board and back to the PICAXE via the given resistor setup. (22K and 10K from the computer and 180R to the computer).

I do have more than one serial port, but I am using the download cable as a means of communicating as it's less potential errors from me wiring up my own serial cable. But again to clarify, I have unplugged the download cable from the picaxe download port and plugged it into one I have wired up myself which goes back to pins 3, 4 and ground on the board.

The programming editor doesn't seem to hold the port when it is active as Hyper Terminal doesn't complain about it being in use.

Would the darlington IC be interfering with the serial communications somehow? Even so, I still can't get the serial to work straight of the PICAXE...
 

hippy

Technical Support
Staff member
@ JimboJ : You need to take the feed to the PC direct from the PICAXE pin not from the Darlington. Not sure if the Darlington will interfere with it or not, so turn the power off and remove the ULN chip until you get it working, connect it up and see if it keeps working or stops.

Also, assuming this is a direct feed, no MAX232 etc, you'll need to use N4800 baud, not T4800.

Finally, make sure you take the PICAXE pin to PC RX not to PC TX.
 

JimboJ

New Member
Thanks for that hippy.

I pulled out the darlington chip and ran it that way. First got the picaxe sending to the PC fine but not receiving from the PC... until I figured out I was trying to receive from the PC via an input pin, if I hadn't found that I would have been bald from pulling out my hair in a day.

What is the purpose of the darlington chip? Is there any benifit using it for just digital outputs? Or would it just be easier to design another PCB without the darlington?
 

hippy

Technical Support
Staff member
The Darlington is there to switch external loads. It can sink more current than a PICAXE pin and can also control loads connected to voltages higher than the PICAXE can tolerate. For example, ideal for controlling 12V relays, switching motors on, and driving super-bright LED's.

If doing any of those things and similar you may need it ( or FET's ), if not you can remove it.
 
Top