ICP DAS USA I-7530 Series User Manual page 91

Uart to can bus
Hide thumbs Also See for I-7530 Series:
Table of Contents

Advertisement

The formula as below:
Number of Time Slices (TQ) = System Clock (Hz) / CAN Baud Rate (bps)
For example: when the system clock is 20MHz and the CAN baud rate is 40K bps,
the number of time slices (TQ) is 20(MHz) / 40(Kbps) = 500, that is to say that one bit of
the time width Tbit is divided into 500 time slices in the CAN converter, and these time
slices are allocated to Tsyns, Tprs, Tphs1 and Tphs2. Among them, Tsyns is defined to
one time slice, and the time slices of Tprs, Tphs1 and Tphs2 need to refer the number
be set of PRS, PHS1 and PHS2 in the Bit Timing register, the calculation method as
below.
Therefore, the number of time slices Tbit of one bit can be expressed as below that
can be divided into (4 + PRS + PHS1 + PHS2) time slices.
= 1 * TQ + (PRS + 1) * TQ + (PHS1 + 1) * TQ + (PHS2 +1) * TQ
However, since the maximum value that can be set for PRS, PHS1 and PHS2 is 3
bits (the value is 7), the number of time slices Tbit of one bit can only be divided into 25
time slices at most that is 4 + 7 + 7 + 7 = 25. As mentioned above, when the number of
time slices Tbit of one bit needs to be divided into 500 time slices, the 500 time slices
need to be divided by a proportional value to be reduced first, and then allocate the
value to the PRS , PHS1 and PHS2. Among them, if the proportional value is
represented by (BRP+1), the representation of the time width Tbit of one bit will be
modified as below.
 T
I-7530, I-7530A, I-7565, I-7530-FT, tM-7530, tM-7530A, tM-7565 User Manual Version 1.6
Copyright © 2018 ICP DAS Co., Ltd. All Rights Reserved E-mail: service@icpdas.com
T
prs
T
phs1
T
phs2
T
= T
bit
syns
= [1 + (PRS + 1) + (PHS1 + 1) + (PHS2 + 1)] * TQ
= (4 + PRS + PHS1 + PHS2) * TQ
T
/ (BRP + 1) = (4 + PRS + PHS1 + PHS2) *TQ
bit
= (4 + PRS + PHS1 + PHS2) * (BRP+ 1) * TQ
bit
= (PRS + 1) * TQ
= (PHS1 + 1) * TQ
= (PHS2 + 1) * TQ
+ T
+ T
+ T
prs
phs1
phs2
91
Page:

Advertisement

Table of Contents
loading

This manual is also suitable for:

I-7530I-7530aI-7565I-7530-ftTm-7530Tm-7530a ... Show all

Table of Contents