I have a Waveshare 2-CH CAN HAT (SKU:17912), Can you tell me what clock frequency to use to initialise for the Arduino library CAN by Sandeep Mistry
Regards
Peter
Hi Peter,
Welcome to the forum
I’ve had a look through the manufacturer’s wiki for that HAT and it only comes with a library for Raspberry Pi OS.
Being a HAT it’s designed assuming it will be running on the Raspberry Pi hardware so there is no official Arduino support for it. That’s not to say you couldn’t make it work with custom firmware, but it would be a lot of work, especially considering the Pi has 3.3V logic levels and the Arduino uses 5V logic.
Thanks Trent,
There shouldn’t be an interface problem is the SPI interface is used. It should be similar to the MCP2515 TJA1050 board which was in the original article I found https://www.ebay.com.au/itm/323887981291?chn=ps&_ul=AU&norover=1&mkevt=1&mkrid=705-139619-5960-0&mkcid=2&mkscid=101&itemid=323887981291&targetid=&device=c&mktype=pla&googleloc=1000142&poi=&campaignid=15791083372&mkgroupid=&rlsatarget=&abcId=9300816&merchantid=494523901&gclid=CjwKCAiAs8acBhA1EiwAgRFdw4qEuIb4Q82uj3hJYionxUwQxOBhBM7j_9zQ2KD4HKf-Stgwh-5vJRoCQDMQAvD_BwE
On that board, the clock frequency on the crystal is entered into the initialisation code. Unfortunately these boards aren’t available until, possibly, 9th February. Way too far away.
Guess it’s time to get my feet wet with my Pi
Regards,
Peter