Arduino Due DAC pin 12bit resolution voltage generation in simulink

Hello,
I am using arduino due to run a motor using simulink. I am using DAC pin of the board to generate analog voltage. The voltage generation resolution capability of the board is 12 bits, but I am getting 8 bits resolution only. Please let me know how can I change the resolution to 12bits.

What datatype is used to drive the DAC?

DAC block in simulink receives uint16 data type...

Post your sketch, well formated, with well-tempered comments and in so called code tags "</>" to see how we can help.

![Screenshot 2023-03-29 135027|618x238](upload://eZl0iDOAbhByfasgPMA3kDoZezp.png)
Please let me know if it makes sence

You use analogWriteResolution() to set the DAC resolution on a real Due.

Maybe the same command works with a simulator.

Please explain.
It's unusual to use a DC voltage to control a motor.
Most motor drivers require a digital PWM signal.
Leo..

Thank you

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.