Книга: Advanced PIC Microcontroller Projects in C

9.11 CAN Bus Programming

9.11 CAN Bus Programming

To operate the PIC18F258 microcontroller on the CAN bus, perform the following steps:

• Configure the CAN bus I/O port directions (RB2 and RB3)

• Initialize the CAN module (CANInitialize)

• Set the CAN module to CONFIG mode (CANSetOperationMode)

• Set the mask registers (CANSetMask)

• Set the filter registers (CANSetFilter)

• Set the CAN module to normal mode (CANSetOperationMode)

• Write/read data (CANWrite/CANRead)

Оглавление книги


Генерация: 1.572. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз