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 Kausu,It is very

 Hi Kausu,It is very

|

Projects › Projects › Distance measurement using InfraRed sensor ›  Hi Kausu,It is very

January 31, 2013 at 6:17 pm #9084
AJISH ALFRED
Participant

 

Hi Kausu,

It is very difficult to comment on the working of this piece of code only since we don’t have the details of your project and the complete code.

What I understood is that, the “convert()” function does the following operations.

-displays a string “output:”

-it extracts the digits from the digit integer “test_final”

-store the digit into two seperate integrs

-convert the integrs into characters, so that they can be displayed on the lcd

-checks whether the number of characters exeeds the number which can be displayed on the first line

-if exeeds go to the next line

-and print “CALIBERATE IT”

 

Printing an integer on LCD:

 

You assume a  value to test_final variable, say 567.

 

  s=test_final/100;                      //now s = 5

  lcd_data(s+48);                        // 48 is the ascii value of ‘0’ and 48+5 gives ascii value of ‘5’

                                                    //and hence print ‘5’ on LCD

 

similary it does for 6 and 7.

 

Have I made it more complex for you?? Take sample value and analyse yourself.

RSS Recent Posts

  • Wien bridge oscillator January 19, 2026
  • Silicon insulated wire January 19, 2026
  • Unable To Get Advertised Op-Amp Slew Rate January 19, 2026
  • Op amp shock January 19, 2026
  • My Advanced Realistic Humanoid Robots Project January 18, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media 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 WTWH Media
Privacy Policy | Advertising | About Us

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