[En-Nut-Discussion] AT90CAN128 CPU and Nut/OS
Henrik Maier
henrik at focus-sw.com
Sun Dec 12 13:01:58 CET 2004
Adding to my previous post:
I just looked up the CAN specification again and found that 0.5% was for
CAN 1.0 and CAN 1.1. Since 2.0 they allow a maximum oscillator tolerance
of 1.58%. With the 1.70% baud rate error for the classic 14.7456 Mhz
crystal still far out and there is still the crystal's tolerance to be
added to the overall error budget as well.
Henrik Maier
Henrik Maier wrote:
> Michael,
>
> you certainly can use both UARTs and CAN at the same time. The accuracy
> of the baud rates depends on the crystal frequency used. The following
> table has been calculated for the AT90CAN128 for typical crystal values.
>
> At 14.7456 the CAN baud rate error rate is greater than the 0.5% allowed
> by the CAN spec for typical CAN baud rates.
>
> At 16.0 MHz the UART baud rates are acceptable for up to 57600 bps.
> 115200 has an error of 2.12% which above the 1.5% mark recommended by
> Atmel but still below the 3% mark usually mentioned in the literature.
> However if a low baud rate error for 115200 bps is required then I
> recommend to use a 12 MHz crystal as the table below shows. The UART
> baud rate error is only 0.16% and the CAN baud rate error 0%.
>
> UART
>
> MHz 14.7456 12.0000 12.2880 14.0000 14.3182 16.0000
> 9600 0.00% 0.16% 0.00% 0.16% 0.23% 0.16%
> 38400 0.00% 0.16% 0.00% 0.93% 0.83% 0.16%
> 57600 0.00% 0.16% 1.23% 1.27% 0.23% 0.79%
> 115200 0.00% 0.16% 2.56% 1.27% 2.90% 2.12%
> 230400 0.00% 6.99% 4.76% 5.06% 2.90% 3.55%
>
>
> CAN
>
> MHz 14.7456 12.0000 12.2880 14.0000 14.3182 16.0000
> 100k 1.70% 0.00% 2.40% 0.00% 0.57% 0.00%
> 125k 1.70% 0.00% 0.31% 0.00% 0.48% 0.00%
> 250k 1.70% 0.00% 1.70% 0.00% 2.27% 0.00%
> 500k 1.70% 0.00% 2.40% 0.00% 2.27% 0.00%
> 1000k 5.33% 0.00% 2.40% 0.00% 2.27% 0.00%
>
>
> Henrik Maier
>
> Michael Fischer wrote:
>
>> Hello Henrik,
>>
>> can you use the CAN and the UART from the AT90CAN128?
>>
>> I think for a working CAN bus, 16Mhz is needed.
>> But how can set a baud rate of 115200 for the UART if the cpu use 16Mhz?
>>
>> Best regards,
>>
>> Michael
>>
>> _______________________________________________
>> 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