DAC doesn't work on my Nucleo stm32f446RE
Moderator: RoccoMarco
Re: DAC doesn't work on my Nucleo stm32f446RE
ok, I'm glad to hear that everything is working now even tough I didn't understand what was causing trouble at the beginning.
. How did you resolve the problem?
Re: DAC doesn't work on my Nucleo stm32f446RE
I started from learning board schematic to have full Image of whats going on.The button logic vary from board to board: pin can be attached to pull-up resistor and button to ground and when it will be pressed, it will connect pin to ground cause it go LOW. Another version is where pin attached to pull-down resistor and button to VCC and when it will be pressed the pin voltage will go up to HIGH.
Schematic of my board (NUCLEO 64 STM32f446RE) shows that my pin attached to pull-up resistor so when button is not pressed its state is HIGH and when button will be pressed it will go down. In example testhal / STM32 / STM32F4xx / DAC / in while loop of main function if condition will be TRUE when button isnt pressed so you need to reverse its logic to make it work right, thats it.
Schematic of my board (NUCLEO 64 STM32f446RE) shows that my pin attached to pull-up resistor so when button is not pressed its state is HIGH and when button will be pressed it will go down. In example testhal / STM32 / STM32F4xx / DAC / in while loop of main function if condition will be TRUE when button isnt pressed so you need to reverse its logic to make it work right, thats it.
Re: DAC doesn't work on my Nucleo stm32f446RE
Yes I already understand that with your last explanations:
What I didn't understand it is the problem with your first program that you post to ask help.
I didn't see any switch button used in that code so it would work for me. Any way, you have resolve your problem, that the most important
.
Yes all works like expected, I saw pull-up resistor 4.7k on board schematics so it go high and latched to the ground when button is pressed.
What I didn't understand it is the problem with your first program that you post to ask help.
I didn't see any switch button used in that code so it would work for me. Any way, you have resolve your problem, that the most important