cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass 10 arrays simultaneously in a for loop?

Mohan1
Associate III

Hello everyone,

I am trying to get data from 10 ADC channels and want to display all the data simultaneously on the LCD. I successfully get the data from ADC channels but unable to display it simultaneously .Please give me suggestions over it and i am writing code in C language.

4 REPLIES 4

Create a structure containing the arrays?

Create an array of pointers, to the other arrays?

Display how? As numeric values, as a graph?

Perhaps draw a picture of what you are trying to describe?

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..

@Community member​ Thanks for your quick response sir. I am just using the arrays which contain data from ADC channel and i converted that value into integer. I have 10 channels of ADC and i am using 10 arrays for that. So how can i display all the data in numerical form in LCD contineously?

sprintf() the data to a string

Scroll or advance the screen to accommodate the new line.

Draw the string as a bitmap into the frame buffer from your font tables if a graphical screen. If a text screen copy the string into the newly blanked line in the display buffer.

If the screen driver has very limited functionality you'll need to break this down into the required steps. HW is typically not intelligent, you have to do all the work to make things occur.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..

@Community member​ Thanks for your response sir.now i get the data from adc channel and i have converted in decimal and displayed it on LCD but now problem is that i am not getting value w.r.t sine wave means if we see the positive sine wave started from origin, initially amplitude value increases upto peak and then decreases like that. I am getting suddenly peak value after zero value.