Maximum baudrate on software UART

General discussion on mikroPascal PRO for AVR.
Post Reply
Author
Message
lemiceterrieux
Posts: 39
Joined: 12 Nov 2020 19:51

Maximum baudrate on software UART

#1 Post by lemiceterrieux » 07 Dec 2022 06:54

Hello ...
I built a board for an ATMega162 (or 8515) and with a 7.3728 MHz clock, the two hardware UARTS (of the 162) are brought to connectors . According to the processor's datasheet, all generated usual baudrates should be exact with the hardware UARTs. But, what happens with the software UART ? And, what is the maximum baudrate in software mode ? I saw that there is an indicator byte at runtime, but I prefer to know it "before", so I could perhaps replace the 162 with a 8515 (I have a "big" stock of them) and use it nevertheless for UART2, with the same pins. Thanks for any answer ...
From France, SESSENHEIM

lemiceterrieux
Posts: 39
Joined: 12 Nov 2020 19:51

Re: Maximum baudrate on software UART

#2 Post by lemiceterrieux » 18 Dec 2022 22:23

No answer ? I don't know how the parameters for soft UART's baud rate are calculated and what is the limit ... At run time I think it is a little bit too late !
From France, SESSENHEIM

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Maximum baudrate on software UART

#3 Post by filip » 19 Dec 2022 09:03

Hi,

Have you tried the default Soft UART example ?

Regards
Filip.

lemiceterrieux
Posts: 39
Joined: 12 Nov 2020 19:51

Re: Maximum baudrate on software UART

#4 Post by lemiceterrieux » 19 Dec 2022 09:59

Yes, I looked at the Soft_UART project in the "Other" folder, I saw an example with 9600 baud ; I saw (a thing which I already knew) that there is a result indicating if baudrate is wrong, but only AT RUNTIME ; nothing in the help section about the maximum in relation with the clock frequency and, very important, the error in percent on the baudrate really used by the routine ... I read somewhere that serial does not work with more than 3% error on baudrate. So, should this be "trial and error" method ? In this case I prefer the hardware UARTs, and use the 162 instead of 8515 if I need two of them !
From France, SESSENHEIM

Post Reply

Return to “mikroPascal PRO for AVR General”