Simultaneous output from Simulink on Arduino Uno
Mostrar comentarios más antiguos
I am using this Simulink code to try to output data to multiple pins on an Arduino Uno. I am wondering if the Simulink compiler is smart enough to output all of the pins simultaneously.
The other option is to write an S-function that uses the port commands (DDR and PORT).
Respuestas (1)
Kaustubha Govind
el 28 de Jun. de 2013
0 votos
The model that you have is already writing to multiple pins simultaneously. Unless, you mean that since the writes happens in a sequence in the generated code, you cannot disregard the small delay that occurs between executing each write statement? I'm not sure how you would achieve such a simultaneous write in C code, since the Arduino DigitalWrite function also only writes to only one port at a time. But if you do know how to implement this in C, then yes, writing a S-function is the right way to go.
2 comentarios
Katherine
el 28 de Jun. de 2013
Md. Razon Chowdhury
el 8 de Feb. de 2022
I also faced the same problem
Categorías
Más información sobre Arduino Hardware en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!