Interfacing CAN with PIC18F4580

On board Controller Area Network (CAN) transceiver connection is a prominent feature of the rhydoLABZ make PIC18F4580 Mini Development Board.  For controlling the CAN, it has on board CAN Controller MCP 2551, and the connection pinout is provided via RMC connector K14 (CANH,CANL). This  wiki section is all about PIC18F4580 Development Board-Mini’s CAN transceiver interfacing. Interfacing the CAN module requires connecting the jumpers J6 and J7(CANTX,CANRX). And also make sure to remove jumpers J10,J2( if used as LED pins or for other purpose).

Schematic

Sample code (click here to download) for both transmitter and receiver end are programmed in same way. Only difference is that, the J1939 Address of the destination end should be given at source code and vice versa. Once the code is loaded, there is an LCD display to identify transmitter and receiver end. Upon pressing the switch SW1, communication takes place between transmitter end and receiver end with buzzer indication.

Care must be taken for the following steps to interface CAN :

In MPLAB, while creating the project Select Microchip C18 Toolsuite as shown below. When selecting Active Toolsuite, select location for the corresponding Toolsuite contents as shown below

  • MPASM Assembler

  • MPLINK Object Linker v5.00

  • MPLAB C18 C Compiler v3.47

  • MPLIB Librarian

Then click ‘Next’ and carryout the further steps.

Topics related to PIC18F4580 Mini Development Board

  1. PIC18F4580 Mini Development Board – Overview
  2. PIC18F4580 Mini Development Board – Interfacing LED
  3. PIC18F4580 Mini Development Board – Interfacing LCD
  4. PIC18F4580 Mini Development Board – Serial communication(USART)
  5. PIC18F4580 Mini Development Board – Interfacing Switch
  6. PIC18F4580 Mini Development Board – Interfacing Buzzer
  7. PIC 18F4580 Mini Development Board – Interfacing POT(ADC)
  8. PIC18F4580 Mini Development Board – Interfacing Temperature sensor
  9. PIC18F4580 Mini Development Board – Interfacing Servo Motor
  10. PIC18F4580 Mini Development Board – Interfacing  μRFID
  11. PIC18F4580 Mini Development Board – Interfacing  CAN

Resources

How to buy?

Support

Please share your ideas with us, visit our forum for discussion

 

 


Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">