I have an application that requires altering baud rate on the same output. The PCWH 3.222 compiler uses the baudrate of the last #USE_RS232 directive in the program irrespective of program flow. i.e. if I put a directive of 4800 as the first line of the program, followed by printf statements followed by the program ending in a directive of 19200 baud, all the printf's are transmitted at 19200 baud. Is this correct? If so, is there a simple way to switch baud rate during runtime please?
Paolino
Joined: 19 Jan 2004 Posts: 42
Posted: Wed Mar 23, 2005 6:05 am
CCS has a function called SET_UART_SPEED() which allows you to modify uart speed run-time. See CCS help for details.
Paolo.
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
Posted: Wed Mar 23, 2005 12:27 pm
Actually it works like this:
use RS232 for 9600 baud
print A
print B
print C
use RS232 for 1200 baud
Print XYZ
will print ABC at 9600 and XYZ at 1200 baud. _________________ The search for better is endless. Instead simply find very good and get the job done.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum