com port problem

davidwf

Senior Member
I am trying to log the SERTXD output - e.g.
sertxd ("line 75 first read ",#ldr, cr,lf)
via the com port and save it to a file on my laptop (as I have done many times before) using the AXE027 USB lead (don't have any serial ports, just USB)

I am using a PICAXE 18X, 4MHz, 256 Gosub

Serial port 9
2400 bits
8 data
No parity
1 stop
No flow control

All I get is a stream of rubbish like this
"21/01/2011 22:41:00",–]EÓªQ¬TQ<ó–]EתQ¿Q×=ó–]ETߪ”QœTQžWQçÔQ<sÏQ]ëÊ”QE”Ö]EÓªQ¬TQ<ó–]EתQ¿Q×=ó–]ETߪ”QœTQžWQçÔQ<sÏQ]ëÊ”QE”Ö]EÓªQ¬TQ<ó–]EתQ¿Q×=ó–]ETߪ”QœTQžWQçÔQ<sÏQ]ëÊ”QE”Ã
which is as if the speed or port settings are wrong .....this example is from Realterm which allows date & timestamping, these do appear correctly

Any ideas please - I'd appreciate a speedy response on this one if possible

many thanks

ps
Have tried it using F8 of the PIC programming editor and also Hyperterm and Realterm (which allows you to save the output to a file) all with the same results.

I can program the PIC OK so eliminating the lead
thanks
 

davidwf

Senior Member
ahem....sorted

I finally found the problem.....the speed should be 4800 :eek: :eek: :eek:

Where does it state that ?, the only references I could find were to 2400....

Oh well at least it works now ....more :eek:
 

hippy

Ex-Staff (retired)
PICAXE Manual 2, Page 203, in the SERTXD command decription ...

The baud rate is fixed at 4800,n,8,1 (9600,n,8,1 on X2 parts)
 

davidwf

Senior Member
hippy, thanks for that.....so it is dependant on the SERTXD command rather than the fact that I am using AXE027 ? ....hmmm didn't know that
 

william47316

New Member
the sertxd is at a fixed baud rate also depending on how fast your running its clock too eg on 08M's its 4800 at 4Mhz and 9600 at 8Mhz and uses the programming serial output line for other serial speeds and baudmodes you can use serout on another output or run the picaxe at a slower speed (poke the osctune register)
 

westaust55

Moderator
You can also use the PE directive

#Terminal

#terminal off/300/600/1200/4800/9600/19200/38400 Programming Editor Only
Configure the Serial Terminal to open after a download (at selected baud rate)
Example: #terminal 4800
But that only works immediately after a program download as it acts at the Programming Editor level as a directive within the PC and is not part of the download PICAXE program (because the PC would not later know what speed the PICAXE is operating at).
So may be good while testing the program while doing tweaks/adjustments
 
Top