MikroElektronika PIC Microcontrollers PIC18 Instrukcja Użytkownika Strona 13

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 40
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 12
device can have its own different clock frequency. One message bit consists of four
nonoverlapping time segments:
Synchronization segment (Sync_Seg)
Propagation time segment (Prop_Seg)
Phase buffer segment 1 (Phase_Seg1)
Phase buffer segment 2 (Phase_Seg2)
The Sync_Seg segment is used to synchronize various nodes on the bus, and an edge
is expected to lie within this segment. The Prop_Seg segment compensates for
physical delay times within the network. The Phase_Seg1 and Phase_Seg2 segments
compensate for edge phase errors. These segments can be lengthened or shortened by
synchronization. The sample point is the point in time where the actual bit value is
located and occurs at the end of Phase_Seg1. A CAN controller can be configured
to sample three times and use a majority function to determine the actual bit value.
Each segment is divided into units known as time quantum, or T
Q
. A desired bit
timing can be set by adjusting the number of T
Q
’s that comprise one message bit
and the number of T
Q
’s that comprise each segment in it. The T
Q
is a fixed unit
derived from the oscillator period, and the time quantum of each segment can vary
from 1 to 8. The lengths of the various time segments are:
Sync_Seg is 1 time quantum long
Prop_Seg is programmable as 1 to 8 time quanta long
Phase_Seg1 is programmable as 1 to 8 time quanta long
Phase_Seg2 is programmable as 2 to 8 time quanta long
By setting the bit timing, a sampling point can be set so multiple units on the bus can
sample messages with the same timing.
The nominal bit time is programmable from a minimum of 8 time quanta to a maximum
of 25 time quanta. By definition, the minimum nominal bit time is 1ms, corresponding
to a maximum 1Mb/s rate. The nominal bit time (T
BIT
) is given by:
T
BIT
¼ T
Q
ðSync Seg þ Prop Seg þ Phase Seg1 þ Phase Seg2Þð9:1Þ
www.newnespress.com
487Advanced PIC18 Projects—CAN Bus Projects
Przeglądanie stron 12
1 2 ... 8 9 10 11 12 13 14 15 16 17 18 ... 39 40

Komentarze do niniejszej Instrukcji

Brak uwag