Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Real time moving chart on TFT displays

Status
Not open for further replies.

timtianyang

Newbie level 2
Joined
Apr 8, 2013
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Pittsburgh, USA
Activity points
1,296
Hi,

I want to plot a real time chart on a TFT in my embedded project. When there is more data coming in, the chart will shift to the left accordingly. I am not sure what the chart is called, maybe real time dynamic shifting chart? I searched it online but all I have is libraries already made for PC platforms. What I want is some low level implementation since it's on an embedded device.

I am programming using a standard ANSI C complier (mikroC), so all C syntax apply. However I can only use low level functions only. Function I have now:
Code:
void setColor(int color)//sets color for the plot. It can be used to erase plotted graph if the color is set to background color.
void Dot(int x,int y)//plots a dot on the TFT at (x,y), x and y is actual pixel on the screen.
void Line(int x1,int y1,int x2,int y2)//connects (x1,y1) with (x2,y2)

What I have in mind now is to store all x and y values to arrays and erase the whole chart when a new point is coming. After adding a new point to arrays, I will replot the chart with new arrays. However I can only make arrays with fixed length.

After some trials I abandoned shifting graphs. What I have now is that it will plot the whole screen, and erase it and then plot again starting from far left. It doesn't look as nice but it works. I am still very curious about how to shift graphs using those three functions.

Thanks in advance.
Tim
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top