display on lcd 16*2 no. from 0.001 to 3.000
Discussion in "8051 Discussion Forum" started by software_developer Nov 3, 2014.
Mon Nov 03 2014, 12:17 pm
i have to display no. from 0.000 to 3.000 on 16*2 lcd.
after pressing key no. should be increase by one.can anyone tell me how to do this.i have tried reading lcd but not works properly?
after pressing key no. should be increase by one.can anyone tell me how to do this.i have tried reading lcd but not works properly?
Wed Nov 05 2014, 12:31 am
It's a kind of very simple. Don't think it as decimal number think it as an integer from 0 to 3000. Use sprints to conver your integer into a string format that looks like decimal. E.g.
Where num is an integer number that goes from 0 to 3000. You can simply do num++ to do the counting.
sprintf(buffer, "%d.%03d", num/10, num%10); Lcd_print(buffer);
Where num is an integer number that goes from 0 to 3000. You can simply do num++ to do the counting.
software_developer like this.
Wed Nov 05 2014, 09:01 am
sir, can u give me small example of code.i have tried this but no output on lcd.
can u explain me with code.
can u explain me with code.
Wed Nov 05 2014, 11:10 am
Hello sir,
i have attached code.tell me anything wrong in it.it is not working.please tell me the issue.
i have attached code.tell me anything wrong in it.it is not working.please tell me the issue.
Thu Nov 06 2014, 07:38 am
PLease help me i have tried lot-
Controller-8051
frequency-11.0592 MHz
i have to us two keys of keypad-
by one key pressed-no. on lcd from location 0xC0 to 0xC4 will increase from 0.000 to 3.000.
by another key pressed of kepad the value should decrese from whatever the value on display.
i feel it difficult.can u help me please. i have tried lot.
application-time pulse generation.
whatever value display shows i have to calculate pulse of that sec.i.e.
if display shows 0.003 i have to generate pulse of 3msec.
please h
Controller-8051
frequency-11.0592 MHz
i have to us two keys of keypad-
by one key pressed-no. on lcd from location 0xC0 to 0xC4 will increase from 0.000 to 3.000.
by another key pressed of kepad the value should decrese from whatever the value on display.
i feel it difficult.can u help me please. i have tried lot.
application-time pulse generation.
whatever value display shows i have to calculate pulse of that sec.i.e.
if display shows 0.003 i have to generate pulse of 3msec.
please h
Fri Nov 07 2014, 02:32 am
Your code generated several warnings.
most did not really matter, but some were telling
you there was a problem with "buffer".
You had defined it as
unsigned char buffer[]; ,which does not work.
unsigned char buffer[20]; does work.
Don't ignore warnings !
Attached is a working program, with surplus code removed
to clear the warnings.
most did not really matter, but some were telling
you there was a problem with "buffer".
You had defined it as
unsigned char buffer[]; ,which does not work.
unsigned char buffer[20]; does work.
Don't ignore warnings !
Attached is a working program, with surplus code removed
to clear the warnings.
[ Edited Fri Nov 07 2014, 02:38 am ]
Sun Nov 09 2014, 02:33 am
sir,how to convert decimal to hex value
like 5630 decimal to 0xdc00 hexsoftware_developer
Is that part of this project ?
Hint..
5630 decimal is stored in two registers as 0x15 and 0xfe
[ Edited Sun Nov 09 2014, 02:45 am ]
Powered by e107 Forum System