Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

dualing 3 number in keypad

Status
Not open for further replies.

freeidea

Member level 1
Joined
May 19, 2011
Messages
36
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
1,920
i need to display 3 digit in lcd,i ask a example of calculation
 

andre_luis

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,418
Helped
1,175
Reputation
2,369
Reaction score
1,169
Trophy points
1,403
Location
Brazil
Activity points
54,763
Considering assumption that you are programming in C language :

Code:
void WriteNum3dec( unsigned charnum )
{
   unsigned char dig;
   dig = num / 100 + '0';
   if ( ( dig == 0 ) && ( ISWHITE ) ) SayChar( WHITE );
     else SayChar( dig );
   dig = (num % 100) / 10 + '0';
   SayChar( dig );
   dig = (num % 10) + '0';
   SayChar( dig );

+++
 

andre_luis

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,418
Helped
1,175
Reputation
2,369
Reaction score
1,169
Trophy points
1,403
Location
Brazil
Activity points
54,763
What is the reason ?
C is allmost a descriptive language, and you can easilly perform that task, whatever the purpose.

+++
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top