MikroElektronika PIC Microcontrollers PIC18 Manuel d'utilisateur Page 15

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 40
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 14
In order to compensate for phase shifts between the oscillator frequencies of nodes
on a bus, each CAN controller must synchronize to the relevant signal edge of the
received signal. Two types of synchronization are defined: hard synchronization and
resynchronization. Hard synchronization is used only at the beginning of a message
frame, when each CAN node aligns the Sync_Seg of its current bit time to the
recessive or dominant edge of the transmitted start of frame. According to the
rules of synchronization, if a hard synchronization occurs, there will not be a
resynchronization within that bit time.
With resynchronization, Phase_Seg1 may be lengthened or Phase_Seg2 may be
shortened. The amount of change in the phase buffer segments has an upper bound
given by the synchronization jump width (SJW). The SJW is programmable between
1 and 4, and its value is added to Phase_Seg1 or subtracted from Phase_Seg2.
9.8 PIC Microcontroller CAN Interface
In general, any type of PIC microcontroller can be used in CAN bus–based projects, but
some PIC microcontrollers (e.g., PIC18F258) have built-in CAN modules, which can
simplify the design of CAN bus–based systems. Microcontrollers with no built-in CAN
modules can also be used in CAN bus applications, but additional hardware and
software are required, making the design costly and also more complex.
Figure 9.11 shows the block diagram of a PIC microcontroller–based CAN bus
application, using a PIC16 or PIC12-type microcontroller (e.g., PIC16F84) with no
CAN Node
CAN Bus
CAN
Transceiver
MCP2551
TX
RX
PIC12/16
Series 8-bit
microcontroller
CAN
Controller
MCP2515
SPI
Figure 9.11: CAN node with any PIC microcontroller
www.newnespress.com
489Advanced PIC18 Projects—CAN Bus Projects
Vue de la page 14
1 2 ... 10 11 12 13 14 15 16 17 18 19 20 ... 39 40

Commentaires sur ces manuels

Pas de commentaire