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

9.8 PIC Microcontroller CAN Interface

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 built-in CAN module. The microcontroller is connected to the CAN bus using an external MCP2515 CAN controller chip and an MCP2551 CAN bus transceiver chip. This configuration is suitable for a quick upgrade to an existing design using any PIC microcontroller.


Figure 9.11: CAN node with any PIC microcontroller

For new CAN bus–based designs it is easier to use a PIC microcontroller with a built-in CAN module. As shown in Figure 9.12, such devices include built-in CAN controller hardware on the chip. All that is required to make a CAN node is to add a CAN transceiver chip. Table 9.2 lists some of the PIC microcontrollers that include a CAN module.


Figure 9.12: CAN node with integrated CAN module

Table 9.2: Some popular PIC microcontrollers that include CAN modules

Device Pins Flash (KB) SRAM (KB) EEPROM (bytes) A/D CAN module SPI UART
18F258 28 16 768 256 5 1 1 1
18F2580 28 32 1536 256 8 1 1 1
18F2680 28 64 3328 1024 8 1 1 1
18F4480 40/44 16 768 256 11 1 1 1
18F8585 80 48 3328 1024 16 1 1 1
18F8680 80 64 3328 1024 16 1 1 1

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


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