1

Topic: Sending ADC Value to CAN

Hi I am trying to send an ADC value to CAN but I am having trouble even connecting to the bus.

I have the program "FuelPumpPrime+Scramble2.3" working on a different bus at 100k bit/s.

However when I try to use the same method to connect to a 500k bit/s bus, I don't seem to get any data. I have uploaded the ccm firmware to the device and I can connect and read the bus at 500k bit/s. But when I put a test value of 0 for Y under Engine_Run_Only_Signal (Oil_Press+Engine_Run_Signal+CAN_Broadcast), the output does not trigger. I don't seem to be receiving can data.

I'm also not sure if the pic5.3 is transmitting any data.

Output 8 also doesn't seem to be doing what it should. With no input from ADC, the output should be grounded but it seems to float.

I have confirmed CAN terminations and do not need any; there is 60ohms resistance on the bus wiring and the point I am tapping is where I had removed an auto trans control modules so I know it was not EOL.

Post's attachments

Attachment icon FuelPumpPrime+Scramble2.3.cfd 8.92 kb, 33 downloads since 2025-07-30 

2 (edited by lee2026 30-07-2025 15:58:56)

Re: Sending ADC Value to CAN

Posting the other cfd file

Post's attachments

Attachment icon Oil_Press+Engine_Run_Signal+CAN_Broadcast.cfd 3.53 kb, 34 downloads since 2025-07-30 

3

Re: Sending ADC Value to CAN

The controller with your diagram "Oil_Press+Engine_Run_Signal+CAN_Broadcast.cfd" should constantly send approximately 4,000 messages per second, which will make it nearly impossible for other connected devices to use this CAN bus. If you do not see all these messages with the CAN Monitor, check that the all connections and the settings is correct.

Please read the documentation and explore examples carefully and try to understand how everything works: https://cannylogic.com/docs/c53pico/can … it_example

And at least periodically turn on the LED from the diagram to understand that the power supply is connected correctly, that the controller basically contains your diagram and executes it: https://cannylogic.com/docs/c53pico/res … ilt-in-led

LEDs are generally convenient to use for debugging if you connect them to different points on the diagram.

Post's attachments

bad.png, 17.45 kb, 848 x 329
bad.png 17.45 kb, 39 downloads since 2025-07-30 

4 (edited by lee2026 30-07-2025 22:16:25)

Re: Sending ADC Value to CAN

Konstantin, CANNY logic wrote:

The controller with your diagram "Oil_Press+Engine_Run_Signal+CAN_Broadcast.cfd" should constantly send approximately 4,000 messages per second, which will make it nearly impossible for other connected devices to use this CAN bus. If you do not see all these messages with the CAN Monitor, check that the all connections and the settings is correct.

Please read the documentation and explore examples carefully and try to understand how everything works:

And at least periodically turn on the LED from the diagram to understand that the power supply is connected correctly, that the controller basically contains your diagram and executes it:

LEDs are generally convenient to use for debugging if you connect them to different points on the diagram.

How about this program? I added a PWM generator to cycle the can send request on/off.

I separated out all three sections and tested one by one and I think I have it working. Thanks for the LED tip I was able to use that to debug the outputs.

I probably wasn't seeing any bus issues with my original program because I was using the Pico5.3 as a CAN sniffer so it wasn't sending messages when I was looking at the bus. I have a Kvsar Leaf Light I'll try to see if the message look normal now and don't crash the bus.

I still can't see these values on my CANChecked gauge display but I think that's on the CANChecked side. When I view the canbus through the gauge display, I don't see the ID I have programmed in my PICO5.3; there's a lot of IDs missing and I think the guage display is doing some kind of filtering. I've confirmed its on the correct bus and can see the display/Pico5.3/Spartan 3 from my Kvsar Leaf Light but cannot see the PICO5.3 or Spartan 3 Wideband from the display.

Post's attachments

Attachment icon Oil_Press+Engine_Run_Signal+CAN_Broadcast.cfd 3.9 kb, 33 downloads since 2025-07-30 

5

Re: Sending ADC Value to CAN

How about this program?

Much better. But I would add one more detail to avoid unexpected results. See attachment.

Post's attachments

Attachment icon Oil_Press+Engine_Run_Signal+CAN_Broadcast_2.cfd 4.27 kb, 36 downloads since 2025-08-01 

6

Re: Sending ADC Value to CAN

Thank you for that! I noticed in the simulator that if the ADC value was below 569 it would spit back the max value

7

Re: Sending ADC Value to CAN

You are welcome!

I noticed in the simulator that if the ADC value was below 569 it would spit back the max value

And the reason is the  CFD programming language built-in 16-bit unsigned arithmetic with overflow implementation: https://cannylogic.com/docs/fbd/cfd/#sec--fbd-cfd-data