Hi, I would like to write a stm32f4 discovery code using First In Last Out queue of any length. I am initially confusing what is the main communication protocol should i use USART or SPI or I2C etc......I would like to use Vbat voltage sampled once per second as long as space exists in the queue. Please anyone give some light at the beginning for this confusion...
The communication interface (UART, I2C, whatever) has nothing to do with the FILO queue. Neither does the chip type. Neither does the source of the data.
en.wikipedia.org/.../LIFO_(computing)
So from what type of program that i can use to implement the FILO queue....? Could you please help me to figure it out....Okay i got it..i can use any communication protocol for this? Because i would like to transmit and receive some bits. What should be the best idea that i can implement in stm32f4 ?
Did you actually read the Wikipedia article? Did you follow any of the links?
Have you done any other research into the use & implementation of FILO queues - aka "Stacks"?
And the point of doing this would be what exactly?
Okay now i got about stacks. So if i would like to store Vbat voltage sampled one per second. What are the functions i should have to use?
STM32F4xx_DSP_StdPeriph_Lib_V1.3.0\Project\STM32F4xx_StdPeriph_Examples\ADC\ADC_VBATMeasurement\main.c
Bunch of other examples including timers in the library.
What do you think?
I fail to understand why it would be a good idea to store battery voltages in a stack. Normally, measurements are expected to be processed in the same order they are measured, which would mean the use of a normal queue.
A stack is normally used when something with a lower priority has to be put aside to handle something with a higher priority, and you then want to return back to that lower priority task at a later time. Like when processing an mathematical expression and you suddenly find a '(' which represents a sub-expression with a higher priority.
Or when your parents says: 'Put the game aside and start working with your school assignment!'