It is currently 20 Apr 2018 03:58

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 04 Mar 2018 21:41 
Offline

Joined: 07 Feb 2018 21:08
Posts: 5
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


Top
 Profile  
 
PostPosted: 07 Mar 2018 15:19 
Offline
mikroElektronika team
User avatar

Joined: 25 Jan 2008 09:56
Posts: 9692
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.


Top
 Profile  
 
PostPosted: 28 Mar 2018 03:42 
Offline

Joined: 07 Sep 2011 15:55
Posts: 53
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.
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: