Answer the question
In order to leave comments, you need to log in
How to output a variable to the STM32L152RB DAC?
Good day. Help to deal with the DAC on STM32.
The project looks like this: an LCD screen, a 4x3 matrix keyboard and an analog output for a speaker are connected to the STM32 MK. The bottom line is that some set of 6 numbers on the keyboard is entered using the keyboard (they are also displayed on the screen for clarity), when the numbers are entered, noise is generated, which is output to the speakers.
Example, you need to output a random bit to the DAC from the hash of the numbers that we entered on the keyboard. So I write these numbers to the "Pass" variable, connect the cryptographic library, take the hash from the variable and write its random bit to the second "retval" variable, connect the "TIM6" timer and turn on the DAC "DAC->CR |= DAC_CR_EN1", write such command "DAC->DHR12L1 = retval;"
Link to the project on dropbox - https://www.dropbox.com/sh/c6mrkjpv2lb5yns/n5hsPQgNNO (project in Keil - Projects\Current\MDK-ARM\STM32L-Discovery.uvproj)
Tell me that I didn't see how to fix it and how the project can be improved. Thank you.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question