In the ADC configuration, Enable SCAN CONVERSION and Continuous Conversion, If you don’t know what they are, please go to the links in the first paragraph.
An interrupt is a signal sent to the CPU which indicates that a system event has occurred, which needs immediate attention. In case of an interrupt got triggered, CPU stops whatever it is doing and executes a function first. This function is a small piece of code also known as ISR(Interrupt Service Routine).
There are many ways to program ADC in STM devices. We are going to cover all of them, starting with the simplest, PollForConversion method. In this method, Controller continuously poll the ADC device and when the data conversion is complete, it can be read using HAL_ADC_Getvalue() function.
let’s say I want to display ‘1’, so I can do that by turning on segments ‘b’ and ‘c’ (you can also turn segments ‘f’ and ‘e’ on). To display ‘5’, I have to turn on ‘a’, ‘f’, ‘g’, ‘c’ and ‘d’ and so on.
That’s all you need to know for seven segment display. It’s very simple and used widely.