DAC work reverse
Posted: Mon Apr 15, 2019 7:43 am
Hi,
I use code like these:
On the oscillograph I see a falling saw on DAC1(GPIO25).
If I use next code
I see a rising saw on DAC1(GPIO25).
Why DAC gives a reverse signal?
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?