The baud rate is fixed

fernando_g

Senior Member
On manual 2, under the description for the sertxd command; there is the following sentence:

The baud rate is fixed at 4800,n,8,1

However on the next paragraph, there are the following paragraphs:

Increasing the clock speed increases the serial baud rate as shown below.
4MHz 8MHz 16MHz 32MHz 64MHz
4800 9600 19200 38400 76800


What I understand from this description, is that the baud rate is fixed to a submultiple of the clock speed, which means that if I'm running my 14M2 at 8Mhz, then sertxd will output 9600,n,8,1....this is completely clear to me.

What is also clear to me, if I want to upload data to my computer via the PE6's Serial Terminal, then I've to select the 9600 baud rate.

My question then is...............it was my understanding that the Picaxe's internal clock is not accurate enough for serial transmissions above 4800 baud, correct? I remember attempting to send data to a serial LCD display at 9600 baud, and I got garbled characters.
 

oracacle

Senior Member
did you alter the LCD baud rate to match? if you are using the rev-ed displays and back packs the baud rate in the firmware will need to be updated and possibly look at how the information is transmitted so that no bytes are missed while each character is printed.
from what I understand picaxe uses Manchester encoding for serial transmission, so clock accuracy should not be an issue. Manchester encoding was originally designed to negate capacitance issues when sending data of very long lengths of copper wire (think phone lines). the capacitance can essentially stretch clock cycles which is why internet connections are slower the further you are from the exchange.

also when using increased clock speeds, it important to ensure you use the 4800_16 or whatever clock speed you intend to use
 

hippy

Technical Support
Staff member
it was my understanding that the Picaxe's internal clock is not accurate enough for serial transmissions above 4800 baud, correct?
No, not correct. There should not be any issues when communicating from a PICAXE to a PC.

There can be issues with using higher baud rates to other devices, other PICAXE chips and LCD displays, and that is often an issue of inter-byte gap periods rather than baud rate.
 

inglewoodpete

Senior Member
My question then is...............it was my understanding that the Picaxe's internal clock is not accurate enough for serial transmissions above 4800 baud, correct? I remember attempting to send data to a serial LCD display at 9600 baud, and I got garbled characters.
To confirm - incorrect. I have used an 08M2 and a 14M2 to reliably send serial at 250 kbits/s. I haven't tried to receive at that speed, though!
 

fernando_g

Senior Member
Thanks everyone for your replies
I require to speed up the download of a datalogger, and speeding up the baud rate, will help improve my project.
 

inglewoodpete

Senior Member
Rather than using SetTxd on the SerOut pin on the 14M2 (or 08M2), use hSerOut (it uses the same pin). You then have control of the baud rate due to the clock divider parameter. Refer to the hSerOut command description.
 
Top