decimals via keypad

Status
Not open for further replies.

ridprint

Newbie level 2
Joined
Feb 18, 2013
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,293
Microcontroller: PIC16F877
IDE: pic c
Oscillator: XT 20Mhz

---------------------------

Hi everyone,First, to explain my project, I am using a keypad to choose positive decimal values then display them on a 16*2 lcd. Initially, I tested putting a varying DC input with my PIC16F877 in Proteus. I have generated the program below, the only problem I am having right now is, I want to display the decimal value on a 16x2 LCD which I cannot make.


THANKS
 

use a code similar to this .
Code:
/**********************************************
conversions lcd and the uart
**********************************************/
void convert(unsigned int value,unsigned int numb)
{
unsigned char text[numb];
unsigned char t,temp_char;
 for(t=1;t<=numb;t++)
 {
   temp_char = value%10;
   value=value/10;
   text[t]=temp_char+48;
 }
 
 for(t=numb;t>=1;t--)
 {
  dis_data(text[t]);//=text[t];
 }

}
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…