mahm150
Full Member level 1
- Joined
- Dec 14, 2010
- Messages
- 98
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 1,288
- Location
- Cairo, Egypt, Egypt
- Activity points
- 2,001
i use 4bit custom lcd in mikroc with pic18f4520 it work ok with text but i cant send value of variable in lcd
i try to use
or
but it not work ok
///////////////////////////////////////the function in mikroc
Prints text on LCD at current cursor position. Both string variables and literals can be passed as text.
///////////////////////////////////////////////
Prints character on LCD at current cursor position. Both variables and literals can be passed as character
/////////////////////////////////////////////////////
this part of my code
i try to use
Code:
IntToStr(time4_lectures, txt);
Code:
sprintf(buffer,"%d",time4_lectures);
///////////////////////////////////////the function in mikroc
Code:
void Lcd_Custom_Out_Cp(char *text);
///////////////////////////////////////////////
Code:
void Lcd_Custom_Chr_Cp(char character);
/////////////////////////////////////////////////////
this part of my code
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 24 25 26 27 28 29 30 31 32 void periode_of_lecture(void) { int prev_time4_lectures,time4_lectures; unsigned char x; prev_time4_lectures= Eeprom_Read(time4_lectures_address); time4_lectures=prev_time4_lectures; Lcd_Custom_Out(1, 1,"lecture time="); //sprintf(buffer,"%d",time4_lectures); //IntToStr(time4_lectures, txt); Lcd_Custom_Out_Cp(buffer); while(CANCEL==1) { if(UP==0) { while(UP==0); x= time4_lectures+5; //IntToStr(time4_lectures, txt); // sprintf(buffer,"%d",time4_lectures); Lcd_Custom_Out_Cp(48+x);// i use this line as examples in mikroc // Lcd_Custom_Chr(1, 14,txt); } if(DOWN==0) { while(DOWN==0); x=time4_lectures-5; // sprintf(buffer,"%d",time4_lectures); Lcd_Custom_Out_Cp(48+x); // IntToStr(time4_lectures, txt); // Lcd_Custom_Chr(1, 14,txt); } } }
Last edited by a moderator: