ASCII Characters in sertxd Output ?

budman231

New Member
I searched the forum on this with no luck..

The following command..
sertxd ("Humidity = ", #HumTotal, cr, lf)

Outputs this..
[00]Humidity = 70 :confused:

I expect this..
Humidity = 70

Does anyone know why the [00] is being written to the output ?

Thank you.
Bud
 

Technical

Technical Support
Staff member
The 00 is not being deliberately written, but may be 'noise' of the electronic circuit in use when the PICAXE chip resets. Try a 10k pull down resistor on sertxd to get rid of the floating reset signals.
 

lbenson

Senior Member
I've also gotten garbage characters with a sertxd right at the beginning of a program. Goes away with a 2 second delay before the sertxd.
 

budman231

New Member
Technical... I am using an axe091 Dev Board.. So that means the resistor trick can't be done right..

lbenson... Are you saying put a Pause 2000 before the Sertxd caommand ?

Bud
 

Goeytex

Senior Member
Since you did not say, I am guessing from a previous post that you are using a Picaxe 18M2

If you cannot figure out a way to place the suggested resistor, then you might try placing a "Low C.3" as the very first line of the program. This will set the sertxd Pin as an output and make it low. Then use delay of at least 1 second before sertxd is used in the program.

A scope on the sertxd line shows a short positive glitch on the sertxd Pin when the terminal program opens and subsequently opens the com port. The resistor suppresses this glitch.

The diagram below shows how I might place the resistor.

091.png
 

lbenson

Senior Member
lbenson... Are you saying put a Pause 2000 before the Sertxd caommand ?
Bud
If the sertxd is at the beginning of the program, I have found a "pause 2000" to solve the glitch problem. If it is elsewhere, that would not be the solution.
 

budman231

New Member
Yes it is an 18M2, I wasn't sure that was relevant. I will try what you suggest below. What is interesting is I have other sertxd lines above these that work fine with no [00] before them. That's what was throwing me off..

Since you did not say, I am guessing from a previous post that you are using a Picaxe 18M2

If you cannot figure out a way to place the suggested resistor, then you might try placing a "Low C.3" as the very first line of the program. This will set the sertxd Pin as an output and make it low. Then use delay of at least 1 second before sertxd is used in the program.

A scope on the sertxd line shows a short positive glitch on the sertxd Pin when the terminal program opens and subsequently opens the com port. The resistor suppresses this glitch.

The diagram below shows how I might place the resistor.

View attachment 18800
 
Top