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 / Topics / Celsius to Fahrenheit

Celsius to Fahrenheit

|

Microcontroller › 8051 › Celsius to Fahrenheit

  • This topic has 2 replies, 3 voices, and was last updated 14 years, 7 months ago by Anonymous.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • November 21, 2010 at 7:02 am #472
    beny
    Participant

    hi friends

    how do i change  the code use on this project. to display the temperature in  fahrenheit

    thank in advance.

     

    http://www.engineersgarage.com/microcontroller/8051projects/digital-clock-with-digital-thermometer-AT89C51

    November 26, 2010 at 8:04 am #5163
    dagakshay
    Participant

    F = (9/5)*C+32

     

    f is temperature in fahrenheit and c is tempeature in degree celcius

     

    this is the global formula….

     

    very excatly you got struct.

     

    November 26, 2010 at 6:51 pm #5164
    Anonymous
    Guest

    if u want temperature in fahrenheit only then u can make the following changes in c code of link provided by u…

    go to convert function


    > remove the code in red color


    > compile and run the code.

    void convert()     // Function to convert the values of ADC into numeric value to be sent to LCD
    {
    int s;
    lcd_cmd(0x81);
    delay(2);
    lcd_data_string("TEMP:");
    test_final=(((9*test_intermediate3)/5)+32);
    s=test_final/100;
    test_final=test_final%100;
    lcd_cmd(0x88);
    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(0);
    lcd_data('F');
    lcd_data(' ');

    test_final=test_intermediate3;
    lcd_cmd(0xc1); //Setting cursor to first position of first line
    delay(2);
    lcd_data_string("TEMP:");
    s=test_final/100;
    test_final=test_final%100;
    lcd_cmd(0xc8);
    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(0);
    lcd_data('c');
    lcd_data(' ');
    delay(2);
    }

                      else elaborate u’r quarry……..

     

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Fun with AI and swordfish basic June 22, 2025
  • Simple LED Analog Clock Idea June 22, 2025
  • Is AI making embedded software developers more productive? June 22, 2025
  • Can I make two inputs from one?? June 21, 2025
  • Behlke swich June 21, 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