2000 Microchip Technology Inc.
Advanced Information
DS30475A-page 219
PIC18CXX8
17.7.1
TIME QUANTA
The Time Quanta is a fixed unit of time derived from the
oscillator period. There is a programmable baud rate
prescaler, with integral values ranging from 1 to 64, in
addition to a fixed divide by two for clock generation.
EXAMPLE 17-2: CALCULATION FOR
FOSC = 16MHz
EXAMPLE 17-3: CALCULATION FOR
FOSC = 20MHz
EXAMPLE 17-4: CALCULATION FOR
FOSC = 25MHz
The frequencies of the oscillators in the different nodes
must be coordinated in order to provide a system-wide
specified nominal bit time. This means that all oscilla-
tors must have a TOSC that is a integral divisor of TQ. It
should also be noted that although the number of TQ is
programmable from 4 to 25, the usable minimum is
8TQ. A bit time of less than 8 TQ in length is not guar-
anteed to operate correctly.
17.7.2
SYNCHRONIZATION SEGMENT
This part of the bit time is used to synchronize the var-
ious CAN nodes on the bus. The edge of the input sig-
nal is expected to occur during the sync segment. The
duration is 1 TQ.
17.7.3
PROPAGATION SEGMENT
This part of the bit time is used to compensate for phys-
ical delay times within the network. These delay times
consist of the signal propagation time on the bus line
and the internal delay time of the nodes. The length of
the Propagation Segment can be programmed from
1TQ to 8 TQ by setting the PRSEG2:PRSEG0 bits.
17.7.4
PHASE BUFFER SEGMENTS
The Phase Buffer Segments are used to optimally locate
the sampling point of the received bit, within the nominal
bit time. The sampling point occurs between phase seg-
ment 1 and phase segment 2. These segments can be
lengthened or shortened by the resynchronization pro-
cess. The end of phase segment 1 determines the sam-
pling point within a bit time. Phase segment 1 is
programmable from 1 TQ to 8 TQ in duration. Phase seg-
ment 2 provides delay before the next transmitted data
transition and is also programmable from 1 TQ to 8 TQ in
duration (however, due to IPT requirements the actual
minimum length of phase segment 2 is 2 TQ, or it may be
defined to be equal to the greater of phase segment 1 or
the Information Processing Time (IPT) ).
17.7.5
SAMPLE POINT
The Sample Point is the point of time at which the bus
level is read and value of the received bit is determined.
The sampling point occurs at the end of phase
segment 1. If the bit timing is slow and contains many
TQ, it is possible to specify multiple sampling of the bus
line at the sample point. The value of the received bit is
determined to be the value of the majority decision of
three values. The three samples are taken at the sam-
ple point, and twice before with a time of TQ/2 between
each sample.
17.7.6
INFORMATION PROCESSING TIME
The Information Processing Time (IPT) is the time seg-
ment, starting at the sample point, that is reserved for
calculation of the subsequent bit level. The CAN speci-
fication defines this time to be less than or equal to 2 TQ.
The PIC18CXX8 defines this time to be 2 TQ. Thus,
phase segment 2 must be at least 2 TQ long.
If Fosc = 16 MHz, BRP<5:0> = 00h, and Nominal Bit
Time = 8 TQ; then TQ = 125 nsec and Nominal Bit
Rate = 1 Mb/s
If FOSC = 20 MHz, BRP<5:0> = 01h, and Nominal Bit
Time = 8 TQ; then TQ = 200nsec and Nominal Bit
Rate = 625 Kb/s
If Fosc = 25 MHz, BRP<5:0> = 3Fh, and Nominal Bit
Time = 25 TQ; then TQ = 5.12 usec and Nominal Bit
Rate = 7.8 Kb/s