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 /    Hello sir, I’m performing

   Hello sir, I’m performing

|

Projects › Projects › Distance measurement using InfraRed sensor ›    Hello sir, I’m performing

January 30, 2013 at 4:36 pm #9082
Kausu T R
Participant

 


 

Hello sir, I’m performing one of the project  Distance measurement Distance measurement using InfraRed sensor. I was working on the concept of the program and could’nt get along with this part of the program.i am so confused this convert function.Because this HEX to ASCII conversion couldn’t understan me.Pls explain ths logic as early as possible….

Thank you in advance…

 

void convert()

{

  int s;

  lcd_cmd(0x81); 

  delay(2);

  lcd_data_string(“output:”);

  s=test_final/100;

  test_final=test_final%100;

  lcd_cmd(0x8a);

  if(s!=0)

  lcd_data(s+48);

  else

  lcd_cmd(0x06);

  s=test_final/10;

  test_final=test_final%10;

  lcd_data(s+48);

  lcd_data(test_final+48);

  lcd_data(‘ ‘);

  if(shift>16)

   {

      lcd_cmd(0xc0+(shift-1));

      lcd_data_string(” “);

      shift=0;

   }

  lcd_cmd(0xc0+(shift-1));

  lcd_data(‘ ‘);

  lcd_cmd(0xc0+shift);

  lcd_data_string(“CALIBRATE IT”);

  delay(30);

}

 

RSS Recent Posts

  • Fun with AI and swordfish basic July 19, 2025
  • using a RTC in SF basic July 19, 2025
  • Does US electric code allow branching ? July 19, 2025
  • Faulty heat air gun (dc motor) - problem to locate fault due to Intermittent fault July 19, 2025
  • Sump pit water alarm - Kicad 9 July 19, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 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