- This topic has 1 reply, 1 voice, and was last updated 6 years, 11 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forums › Mastering STM32 book support forum › DAC vs Timer
Tagged: DAC timer
Hi Carmine,
Just bought your book yesterday as a reference for the CubeMX API as I found very little helpful information elsewhere, and looking forward to lots of great tips from it.
I recently bought a Nucleo-L432KC as I want to create a controller for my Gene Cafe Roaster. For now I am playing around with the mcu and attaching an LCD, where I want to use the DAC for the contrast voltage.
More specifically I use DAC1 OUT2 (PA5) for this signal, but at the same time I set Timer 6 at 500ms toggling the LED. I used this timer only because I need not use it for DAC purposes.
So far I get no DAC output, and I am unsure if that is due to using timer 6 also?
(I used the three lines from the DAC section of your book with the resources I use)
Perhaps I should use SysTick in stead of timer 6, but don’t want to bother doing so if my current setup is supposed to work.
Rgds
Michael
Hi Carmine,
Just an update as I now have contrast on my lcd.
Looking at your example code, I found the structure to be slightly different from my version of CubeMX.
I don’t think I did anything different apart from switching timer and trying channel 1 of the DAC. This was working fine and I switched back to channel 2, which now also worked as expected.
Br
Michael