Ideas with the tft software printing a graph adc values

General discussion on Visual TFT Software.
Post Reply
Author
Message
arenwi
Posts: 28
Joined: 14 Aug 2014 19:52

Ideas with the tft software printing a graph adc values

#1 Post by arenwi » 01 Sep 2014 18:43

Hello all,

I would like to program in micromedia dspic 33ep to reprsent a graph with two diferent adc values inside.

I would like to use one adc for the x axis and other adc for the y axis. The idea is to print the graph at the same time that the values go on the axis.

Mi inicial idea is painting a fixed point changing its coordenates inside of the adc values, but how I can fix the old values on the graph.

Could some people give any idea or example for the visual tft software.

best regards

Luis

Teo1
Posts: 37
Joined: 10 Apr 2011 18:58
Location: Bucharest, Romania

Re: Ideas with the tft software printing a graph adc values

#2 Post by Teo1 » 05 Sep 2014 20:23

+1
Teo

Megahurts
Posts: 900
Joined: 01 Oct 2009 22:48
Location: Rocky Mountains, USA.

Re: Ideas with the tft software printing a graph adc values

#3 Post by Megahurts » 06 Sep 2014 10:49

Hi Luis,
arenwi wrote:My initial idea is painting a fixed point changing its coordinates inside of the adc values, but how I can fix the old values on the graph.
(spelling corrections in red)

The TFT display has no way to save and allow retrieve of pixel state or setting. If you want to have your program 'remember' any or all pixels (points) that are painted/colored different from background, you need to make a array variable declaration up to 320x240 in size of byte or word type.
Depending on what information you want to store about the pixel, On/Off - byte type used , pixel's color - word or integer type needed.

If you want a pixel to move around the screen with its X/Y position set by the ADC channels readings and have the last location the pixel was at erased after pixel moves, that is a different thing to code for, and should be easy.

But I am not sure I understand correctly what you are trying to do? So need more details before showing any solution ideas ok?

Best regards, Robert.
HW: easyPIC5|PICFlash2|easyBT|smartGSM|easyGSM|PICPLC16|mmWorkStation|FT800 Eve|PIC Clicker/2|
MMBs:PIC18F,PIC33EP,PIC32|CLICKs:DAC,ADC,GPS L10,Thermo,8x8B LED,Stepper,W/B OLED,9DOF,GPS3,tRF,Hall I|

SW: mP for PIC|mB for PIC-dsPIC-PIC32|Visual-TFT|

arenwi
Posts: 28
Joined: 14 Aug 2014 19:52

Re: Ideas with the tft software printing a graph adc values

#4 Post by arenwi » 06 Sep 2014 16:47

Captura de pantalla 2014-09-06 a la(s) 17.18.15.png
Captura de pantalla 2014-09-06 a la(s) 17.18.15.png (14.57 KiB) Viewed 3076 times
Hi Robert,

Thank you very much for your help. I would like also to congatulate you for your manual of vtft. I´m trying to learn from it.

About mi question, I woul´d like to capture on screen the differents measurements on time (like 5 seconds).

The x axis is an adc are measuring one transducer for pressure (dapa) and the Y axis are meauring directly volts. I atach you a picture, the final grapgh will be something like this: Starting the measurement with on the right side and taking values changing this axis (x) to the Y axis adc all the measurement take about 5 seconds. That is the idea.

regards and sorry for mi english :roll:

Luis

Megahurts
Posts: 900
Joined: 01 Oct 2009 22:48
Location: Rocky Mountains, USA.

Re: Ideas with the tft software printing a graph adc values

#5 Post by Megahurts » 07 Sep 2014 21:54

Hi Luis,

Interesting project. Sorry for my English also :lol: Sometimes hard or forget to keep it simple for everyone.

Questions I have though, do you use a language translator on my V-TFT manual? If so, is it easy for you to do with the way I made it? Hard?
Does it make sense (understandable) when translated? (no one has reported either way, so I'm very curious)
I do hope the manual does help you and if you have questions about anything in it, please let me know.

For your project;
V-TFT does not have a "Dot" component (yet), so you will need to study the "TFT Library" for your compiler and use direct drawing commands from it to draw what you want on the screen, or plot it, for your case here.

You can still use V-TFT to make the basic foundation of your application, like display a screen for the graph to be drawn on and have V-TFT buttons or event handler routines to save, clear and restart the plotting, looping to do the ADC samples, but the drawing of the plot points will need to be done with your custom code using TFT dot drawing commands (routine functions) from the TFT library.
(the multitasking section in my tutorial you are reading will help for this)

Since the ADC samples are probably values larger than 320 and 240 (X / Y screen size), you are scaling down to get values that are good for screen coordinates yes? But do you want/need to have access to the actual values the ADC samples were at, at any time point?
Like for data logging? or numerical display on the screen for any point selected?

You might need to have a array variable of 320x240 to hold the data then.

For most programming projects, it is best to think of solutions in small chunks, then put them together for final application.

Robert.
HW: easyPIC5|PICFlash2|easyBT|smartGSM|easyGSM|PICPLC16|mmWorkStation|FT800 Eve|PIC Clicker/2|
MMBs:PIC18F,PIC33EP,PIC32|CLICKs:DAC,ADC,GPS L10,Thermo,8x8B LED,Stepper,W/B OLED,9DOF,GPS3,tRF,Hall I|

SW: mP for PIC|mB for PIC-dsPIC-PIC32|Visual-TFT|

Post Reply

Return to “Visual TFT General”