MikroElektronika PIC Microcontrollers PIC18 Instrukcja Użytkownika Strona 26

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 40
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 25
CAN_MODE_LISTEN Listen-only mode of operation
CAN_MODE_CONFIG Configuration mode of operation
9.10.2 CANGetOperationMode
The CANGetOperationMode function returns the current CAN operation mode. The
function prototype is:
char CANGetOperat ionMode(void)
9.10.3 CANInitialize
The CANInitialize function initializes the CAN module. All mask registers are cleared
to 0 to allow all messages. Upon execution of this function, the normal mode is set. The
function prototype is:
void CANInitializ e(char SJW, char BRP, char PHSEG1, char PHSEG2,
char PROPEG, char CAN_CONFIG_FLAGS)
where
SJW is the synchronization jump width
BRP is the baud rate prescaler
PHSEG1 is the Phase_Seg1 timing parameter
PHSEG2 is the Phase_Seg2 timing parameter
PROPSEG is the Prop_Seg
CAN_CONFIG_FLAGS can be one of the following configuration flags:
CAN_CONFIG_DEFAULT Default flags
CAN_CONFIG_PHSEG2_PRG_ON Use supplied PHSEG2 value
CAN_CONFIG_PHSEG2_PRG_OFF Use maximum of PHSEG1 or
information processing time (IPT),
whichever is greater
CAN_CONFIG_LINE_FILTER_ON Use CAN bus line filter for wake-up
CAN_CONFIG_FILTER_OFF Do not use CAN bus line filter
www.newnespress.com
500 Chapter 9
Przeglądanie stron 25
1 2 ... 21 22 23 24 25 26 27 28 29 30 31 ... 39 40

Komentarze do niniejszej Instrukcji

Brak uwag