[En-Nut-Discussion] Baud 19200 Rs232 port

Sigurd Kleppan 021243 at student.hit.no
Tue Sep 7 23:10:17 CEST 2004


I try to communicate throuth the rs232 port on the ethernutboard. I want the baudrate to be 19200. I have written this:

main(){
    u_long baud = 19200;
    u_char i = 0;
   FILE *uart;

	// Initialize UART 
    NutRegisterDevice(&devDebug0, 0, 0);
    freopen("uart0", "w", stdout);
    _ioctl(_fileno(stdout), UART_SETSPEED, &baud);
    NutSleep(200);}

I write to the rs232 port by using the "printf" command, but when i use the Terminal program I only get words by using the 115200 baud. It happens nothing when i use 19200 baud.

Is it something I write wrong, or is it any other variables i have to change to get baud 19200? What about stopbits and handshake?

Thank you!
Sigurd Kleppan
	 





More information about the En-Nut-Discussion mailing list