baud rate

26 Jun 2012

This is defiantly a nob question. Thought I could figure it out but how do you set the baud rate of the serial ports?

I have, [code] Serial Ser0(p9,p10); 9 = TX, 10 = RX Ser0.baud(57600); Set baud rate to 57600 [/code]

But it don't compile. I've searched and tried everything I can think of, even other formats from different programing langs but nothing works.

Thanks

27 Jun 2012

Well it appears I have it correct, so why is it not compiling?

Serial Ser0(p9,p10);

Ser0.baud(57600);

27 Jun 2012

Glenn,

Is the "Ser0.baud(57600);" line outside (before) the "main(){...}" routine? If so, it won't compile properly because it is a statement (function call), not a declaration.

Fred

27 Jun 2012

Fred Scipione wrote:

Glenn,

Is the "Ser0.baud(57600);" line outside (before) the "main(){...}" routine? If so, it won't compile properly because it is a statement (function call), not a declaration.

Fred

Well shiver me timbers.

Thanks!.