| |||||
µVision® IDE µVision® Debugger | D/A Converter Simulation
The Digital/Analog Converter dialog box displays and allows you to adjust special function registers associated with the D/A Converter. You may create debugger scripts that monitor the D/A output voltages. For example, the following script:
signal void dac_monitor (void) {
while (1) {
wwatch(DAC0);
if (DAC0 > 2.0)
printf("D/A output is high (%f Volts)\n", DAC0);
}
}
watches writes to the DAC0 VTREG and outputs a message if the output voltage exceeds 2.0 volts. | ||||
| |||||