How can I put the value of ADC-Read on the Visual GLCD label

General discussion on Visual GLCD Software.
Post Reply
Author
Message
EdTree
Posts: 5
Joined: 07 Feb 2018 21:08

How can I put the value of ADC-Read on the Visual GLCD label

#1 Post by EdTree » 04 Mar 2018 21:41

Dear mikroE team
Hi all,

I want the analog input of RA3 value on the SmartGLCD display, I use Visual GLCD V2.7.1.0 and
place T-Label on the screen under properties caption Text, how can I approach this to the value of the analog input of RA3.
I have a C code:
adc_rd = ADC_Read (2);
ByteToStr (adc_rd, txt);
T6963C_Write_Text (txt, 0, 0, T6963C_ROM_MODE_OR);
How do I get this in the caption Text box?
And not as a text on the T6963C screen because I use the Visual GLCD program with
MikroC Pro V7.2.0

Thanks a lot
EdTree :D

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: How can I put the value of ADC-Read on the Visual GLCD l

#2 Post by filip » 07 Mar 2018 15:19

Hi,

Basically, you can store the ADC value in a string and then copy that string to the Label that you defined in the Visual Glcd project.

Regards,
Filip.

thunderer
Posts: 54
Joined: 07 Sep 2011 15:55

Re: How can I put the value of ADC-Read on the Visual GLCD l

#3 Post by thunderer » 28 Mar 2018 03:42

Hello Filip,
It would help a lot an example on how to do this Label update.

Thank you!

LE: next day, the night was a good adviser :lol:

Let's say you get the "hours" from the RTCC. Then you do as below, where Label4 is the name of the label you need to update.
The Rtrim is needed because of the Strcpy.

Code: Select all

ByteToStr(hours, txt)
Strcpy(Label4_Caption, txt)
Rtrim(txt)
DrawLabel(@Label4)
The one who asks, learns and explores may look stupid for a second. The one who does not do that, stays stupid forever.

User thunderer on: RHCforum, elforum, mikroelektronika/Libstock, HOD, fanowar

Post Reply

Return to “Visual GLCD General”