Programming Arduino DUE with Mathworks Simulink

Hi everybody!

I just installed the support package for Arduino in my Simulink environment so I am able to program it the model-based way instead of purely with C-code. I read here that for now all DUE functionality is supported except for DAC and CAN-Bus channels. Also I read that there is "Interactive Tuning and monitoring" support. I have tested the setup by programming digital output 13 as a flashing LED using the "Digital Output" block from the Simulink library. This works fine.

Now I have some questions towards using the Simulink-DUE environment:

  • Who else on the forum has used this setup? It would be nice to have a chat on the possibilities
  • "Interactive Tuning and monitoring" --> How do you do that? --> I found this! Very cool, you can read here how to do that.
  • Anybody an idea when DAC and CAN will be supported? CAN-bus is 1 of the biggest advantages for me in using the DUE because I am planning some automotive small projects where CAN is basic.
  • In the Simulink DUE Options I saw you can configure the WiFi- and Ethernet- Shields for the DUE. I had no idea these shields are available for the DUE. Anybody an idea where I can buy these?

Thanks a lot ! Pieter

Great subject, of interest to me since I want a low cost CAN simulink controller.

Any developments? I don’t see any CAN support in the simulink add on I just installed.


Mixed news here for you!

DAC support is now available in Simulink. But CAN channel is stil a mirage.

Also, Due does not have a CAN Transciever on-board. So…not sure, even if Mathworks guys provide this support, it would work.

But rest of the stuff works great, and helps you design complicated algorithm much easily.

Gopal Athani

The problem isn't that the Due hasn't got a CAN transceiver on board, because it has 2 of them built into the micro (although you do need to add a PHY), what's holding it back is that this has a completely different implementation than a standard Arduino which needs an external CAN transceiever, the standard shield isn't quite compatible with the Due either.

Site noobs do love a good Necro....

The problem isn't that the Due hasn't got a CAN transceiver on board, because it has 2 of them built into the micro

No, it doesn't. The two CAN ports on the Arduino Due need external CAN transceivers (or an equivalent for short distance wires only).

An example of these external transceivers:

I agree it doesn’t have the PHY portion (I did mention that), but that’s not the problem stopping development.