Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Trying to Transmit a CANBUS message using a PIC32MX534F064H

Duraid

Newbie
Joined
Jul 9, 2022
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
13
Hello,



I am trying to write a code for a PIC32MX534F064H to transmit a CAN message continuously every 10ms.
I am using MPLAB Harmony to get things setup like the timing which is set to 250Kbps. I am trying to make use of the MPLAB Harmony generated CAN1_MessageTransmit function to send the CAN message but so far I haven't been able to get it to work.



What I am trying to Transmit is an Extended CAN Message with the details mentioned below:

ID: F004

Data Length: 8 Bytes

Data: FF FF FF 90 33 FF FF FF



I am monitoring the output using a CANBUS analyzer and haven't been able to pickup any transmission, at the same time I'm monitoring the CAN1_MessageTransmit function return to see if it is True of False in case there is an error and it has always been False.


I have attached the main.c code and the code generated by MPLAB Harmony for the CAN functions to show what I have setup.

So far I have no clue of what I am missing/doing wrong, so I whish someone could shed some light on the culprit.



Thanks in Advance



Duraid
 

Attachments

  • main.c.txt
    1.2 KB · Views: 74
  • Harmony Generated Code plib_can1.c.txt
    22.9 KB · Views: 87

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top