lcd cursor

Beta Testing discussion on mikroPascal PRO for PIC.
Post Reply
Author
Message
kshehaly
Posts: 6
Joined: 30 Jun 2015 01:57

lcd cursor

#1 Post by kshehaly » 24 Aug 2015 15:47

I am making a digital clock. so when i want to set it i should press a button til the cursor appear then i move it left and right.
the problem is when the cursor appears it moves across the lcd screen very quickly in a crazy way. so plz how can i solve that problem?
thank you

User avatar
aleksa.jovanovic
Posts: 526
Joined: 30 Jun 2015 08:48

Re: lcd cursor

#2 Post by aleksa.jovanovic » 25 Aug 2015 10:08

What development system and PIC are you using?
Could you send me the zipped project?

Best regards,
Aleksa

kshehaly
Posts: 6
Joined: 30 Jun 2015 01:57

Re: lcd cursor

#3 Post by kshehaly » 25 Aug 2015 10:33

i didnt finish the project yet and the cursor part isn't written yet
im using pic16f877a and of course programming with mikroc

User avatar
aleksa.jovanovic
Posts: 526
Joined: 30 Jun 2015 08:48

Re: lcd cursor

#4 Post by aleksa.jovanovic » 25 Aug 2015 11:42

The cursor is usually disabled when displaying something.
Do you have any LCD output that would cause it to act in such a way?

kshehaly
Posts: 6
Joined: 30 Jun 2015 01:57

Re: lcd cursor

#5 Post by kshehaly » 25 Aug 2015 13:47

that's how i display the characters.
i put the displayTime routine in the main method inside the while(1) loop

unsigned int minute=3;
unsigned int hour=3;
unsigned int second=0;
unsigned int msec=0;
unsigned int days=2;
unsigned int months=7;
char *secs="00";
char *mins="00";
char *hours="00";
char *day="00";
char *month="00";
char *set="00";


void displayTime(){
secs[0]=(second/10)+'0';
secs[1]=(second%10)+'0';
mins[0]=(minute/10)+'0';
mins[1]=(minute%10)+'0';
hours[0]=(hour/10)+'0';
hours[1]=(hour%10)+'0';
day[0]=(days/10)+'0';
day[1]=(days%10)+'0';
month[0]=(months/10)+'0';
month[1]=(months%10)+'0';
lcd_out(1,1,hours);
lcd_out(1,4,mins);
lcd_out(1,7,secs);
lcd_out(1,15,month);
lcd_out(1,12,day);

}


note* when i remove the routine from the main method the cursor works fine.
i hope u understood a little hope u can help :D

User avatar
aleksa.jovanovic
Posts: 526
Joined: 30 Jun 2015 08:48

Re: lcd cursor

#6 Post by aleksa.jovanovic » 25 Aug 2015 14:55

The lcd can't put out messages and have the cursor stand still, what do you need the cursor to be visible for ?

Post Reply

Return to “mikroPascal PRO for PIC Beta Testing”