Trouble with PIC18 communicating with CAN

Discussion in 'Embedded Systems and Microcontrollers' started by Arrested_Mechanics, Dec 22, 2011.

  1. Arrested_Mechanics

    Thread Starter New Member

    Dec 22, 2011

    I am writing code for a PIC18f2580 that interfaces with an already present CAN bus. To begin, I desire the controller to light an LED when a specific address is read. When I can prove to myself that this works, the data will be sent over USART.

    I have been unsuccessful with this, and have boiled the code down to lighting an LED when the receive buffer is full. However, I cannot get this to work either.

    I have been working on this for months with little progress, so any help will be greatly appreciated. Attached is my source code (CANplusLED.txt) as well as the Can.txt file that Application Maestro generated.

  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    1. Don't include your code as a text file. Use code tags.

    2. Much of your can code happens inside can.h, which you did not post.

    While I have not used the can module ever, I thought I would take a look anyway, but there is nothing to see. Post again.