When I had to change the baud rate, I used the lib to initialize the serial port, and then I modified the baud rate registers directly. The lib doesn't mind, it does its work at different speeds, too.
For finding out the baud rate, I'd measure how long a level stays on. Having measured something like a hundred levels or so, I can be quite sure that the shortest time I've measured is the time of 1 bit. But, is a sender transmits continuously, with 1 stop bit, back-to-back, the usart can never syncronize to the bit stream. Greets, Kiste > > >I have a requirement where the baudrate of the sender can be either 2400,4800 >and 9600. >The sending device is a weighing machine and it sends data continuosly, so the >plan was to try verify the characters and then if its not valid try the next >baud. > >Since the library expects a constant for baudrate, its directly not possible >to try other baudrates, Any suggestions ? > >Sunish >-- >You received this message because you are subscribed to the Google Groups >"jallib" group. >To unsubscribe from this group and stop receiving emails from it, send an >email to [email protected]. >To post to this group, send email to [email protected]. >Visit this group at http://groups.google.com/group/jallib?hl=en. >For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/jallib?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
