EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies / Hi, This function will help

Hi, This function will help

|

Microcontroller › 8051 › Calculating flow rate of an infusion pump › Hi, This function will help

May 18, 2014 at 4:26 am #11739
SHAH DISHANT H.
Participant

Hi,

 

This function will help you. In this whatever the number you want to display, pass it as a parameter and it will be displayed on LCD.

 

void DisplayDigit(unsigned int dat)
{
unsigned int temp,i=0, buf[10];
 
while(dat>=10)
{
buf=dat%10;
dat=dat/10;
i++;
} 
 
buf=dat;
 
for(temp=0;temp<=i;temp++)
{
LCDWriteData(buf[i-temp]+’0′);
}
 
}
 
 
All the best…!!!
 

RSS Recent Posts

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 Arrowfly LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of Arrowfly
Privacy Policy | Advertising

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise