ADGAN
Full Member level 5
- Joined
- Oct 9, 2013
- Messages
- 295
- Helped
- 4
- Reputation
- 8
- Reaction score
- 4
- Trophy points
- 18
- Activity points
- 1,837
global that creating problem try to declare them as local static variables for your zeros,one,two and other functions.char i,j;
Code:Lcd_Chr(4,16, (seconds / 10) + 48); //Print tenss digit of seconds variable Lcd_Chr(4,17, (seconds % 10) + 48); //Print oness digit of seconds variable
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 main() { static unsigned int h; h++ //increment in main or separate timing if(h==1) { //display h1; } else if(h==2) { //display h2; } else if(h==3) { //display s1 min } else if(h==4) { //display s2 min h=0; }
Lcd_Chr(pos_row, pos_char, 0) ;
I don't get it. Whats the point of that? I have used a switch statement to display the numbers in the show_time function.
I think the issue is in some LCD command. Do you know what this means?
Code:Lcd_Chr(pos_row, pos_char, 0) ;
I know it prints a character but why they given it as 0,1,2,.... What does it relate to?
my point is you are using switch statement for switching the 0 to 9 digit respective value of your variable not between four digit that why i said you can use string function or method i show.
Yeah but what is the meaning of 0? And for the other segment they are using 1. Why is that?and for Lcd_Chr(); function display a char to given row and position(column) you give.
https://www.mikroe.com/download/eng/documents/compilers/mikroc/pro/pic/help/lcd_library.htm#lcd_chr
Yeah but what is the meaning of 0? And for the other segment they are using 1. Why is that?
Code C - [expand] 1 2 3 4 5 ByteToStr(hour, str) ; lcd_out(1,1,str); ByteToStr(min, str1) ; lcd_out(1,4,str1);
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?