[En-Nut-Discussion] Baud 19200 Rs232 port

Cosmin Buhu lists at byteworks.ro
Wed Sep 8 14:20:09 CEST 2004


    Do you have #include <dev/usartavr.h> ?

OS version can be read and retrieved from os/version.c,
and in docs :)

Cosmin

----- Original Message -----
From: "Sigurd Kleppan" <021243 at student.hit.no>
To: <en-nut-discussion at egnite.de>
Sent: Wednesday, September 08, 2004 3:13 PM
Subject: Re: RE: [En-Nut-Discussion] Baud 19200 Rs232 port


> When I use this code I get the message undeclader indentifier decUsartAvr.
Is it something a have to include?
>
> Where do i read my nuOS version?
>
> Sigurd
>
>
> Damian Slee <damian at commtech.com.au> skrev:
>
> >I think cause your using the debug port.
> >
> >Try
> >
> > NutRegisterDevice(&devUsartAvr0, 0, 0);
> > g_rs232 = fopen("uart0", "r+b");
> > fileno = _fileno(g_rs232);
> > lTmp = 9600;
> >    _ioctl(fileno, UART_SETSPEED, &lTmp);
> >
> >-----Original Message-----
> >From: en-nut-discussion-bounces at egnite.de
> >[mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of Sigurd Kleppan
> >Sent: Wednesday, 8 September 2004 5:10 AM
> >To: en-nut-discussion at egnite.de
> >Subject: [En-Nut-Discussion] Baud 19200 Rs232 port
> >
> >
> >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
> >
> >
> >
> >_______________________________________________
> >En-Nut-Discussion mailing list
> >En-Nut-Discussion at egnite.de
> >http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
> >
> >
> >---
> >Incoming mail is certified Virus Free.
> >Checked by AVG anti-virus system (http://www.grisoft.com).
> >Version: 6.0.742 / Virus Database: 495 - Release Date: 19/08/2004
> >
> >
> >---
> >Outgoing mail is certified Virus Free.
> >Checked by AVG anti-virus system (http://www.grisoft.com).
> >Version: 6.0.742 / Virus Database: 495 - Release Date: 19/08/2004
> >
> >_______________________________________________
> >En-Nut-Discussion mailing list
> >En-Nut-Discussion at egnite.de
> >http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
> >
>
>
>
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion




More information about the En-Nut-Discussion mailing list