I use code like these:
Code: Select all
u8_t dac_value=0;
dac_output_enable(DAC_CHANNEL_1);
while (1)
{
dac_output_voltage(DAC_CHANNEL_1, dac_value++);
delay(10ms);
}
If I use next code
Code: Select all
u8_t dac_value=0;
dac_output_enable(DAC_CHANNEL_1);
while (1)
{
dac_value++
dac_output_voltage(DAC_CHANNEL_1, [color=#8000BF]~dac_value[/color]);
delay(10ms);
}
Why DAC gives a reverse signal?