Answer the question
In order to leave comments, you need to log in
How to connect a display to the microcontroller?
It is necessary to make a software implementation of the FFT, STM STM32F401RB microcontroller core, display type PG160128A, C programming language, Proteus simulation environment. How to do it right? Maybe someone came across?
Answer the question
In order to leave comments, you need to log in
It looks like some kind of laboratory.
I'll tell you how I did it, it was 10+ years ago. The controller was an AVR, but this does not change the essence of the matter.
I studied, I tried to get to the point with my head, and not to do figurative production. First I got hold of the WS1602 display. This is a sign-synthesizing display, that is, it is necessary to send codes of characters that it will draw on the screen. I got a datasheet for it, which listed the signal sequences to control the display.
Since the program is easier to debug on an adult computer, I wrote a sprawling bunch of abstractions in C ++ that sent bytes to the LPT port to which the display was attached. So I had an understanding of how to control the display and a reliably working stand.
Then I compiled the same code for AVR, since there were templates and the binary code was lightweight - and I got a working display with a microcontroller.
The project was similar - an audio signal spectrum analyzer + color music, but on AVR, up to 16 kHz.
In the same way, I used the FFT - in order not to count half of the conversion in vain (the power spectrum of the real signal will be symmetrical about its middle), I applied a trick - immediately when reading from the ADC, I multiplied the readings by turning factors, which allowed me to save memory and calculations twice. Well, I used fixed-point arithmetic to keep within the required number of cycles between readings from the ADC - while the next FFT window is being filled, the controller had to calculate the previous one and display it on the screen.
Then there was a debugging process - I found a program - a generator of sinusoidal signals, gave them to my craft and looked at the screen - does the stick appear in the right place, does it move when the generator frequency swings.
Everything about everything took me two most interesting months.
I think you can either go the same way, or google the required libraries and put them together - but not the fact that this will work, and even more so.
Modeling STM32F4 in proteus process is very doubtful, for this reason there is no such model there.
You will have to debug on real hardware.
With the sounded microcontroller - in any way. But you can take a simpler processor, stm32F103, it can already be simulated in proteus.
You can see the general principle here https://www.youtube.com/watch?v=aYeBmjXufmY
The display is probably on the RA6963 controller, there are not so many examples in Google for it, but there is something, for good it would also be worth changing to something simpler and more popular.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question