Hello,
I'm using NXP S32k148 toolbox, And I want to build model where I want to use Digital to Analog converter i.e DAC. So which toolbox I can use here? Or How can I implement DAC(Digital to Analog converter) in MBD.
Hello @saurabhkulkarni123
Model-Based Design Toolbox only allows customers to configure and access the hardware peripherals of the MCUs into Simulink, and connect the hardware outputs to the algorithms. So the MBDT cannot do any additional hardware capabilities, than the ones already in the hardware. My understanding is that you want to achieve a Digital to Analog Converter using MBDT. Unfortunately, S32K14x does not have a dedicated DAC peripheral, which would allow you to get such a feature.
Instead, the MBDT for S32K1xx provides blocks for CMP, which is an analog comparator, holding an internal DAC peripheral, but the DAC from a comparator is available as an on-chip internal signal only and is not available externally to a pin. So, if you want to compare an analog voltage with the internal DAC value, and be notified in the software when the analog value is above or below a threshold, please have a look at the cmp_s32k14x example, delivered with the toolbox.
Hope this helps,
Marius