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 / Help regarding Digital Thermometer

Help regarding Digital Thermometer

|

Microcontroller › AVR › Help regarding Digital Thermometer

  • This topic has 2 replies, 2 voices, and was last updated 12 years, 4 months ago by Sanjeeb Kumar Mohanty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • March 2, 2013 at 8:21 pm #2154
    Sanjeeb Kumar Mohanty
    Participant

    Hello everyone. I want to build a digital thermometer using LM35, ATMega16 and 7-segment- display. Can anyone give me the code and schematics for this ?? I will be grtful. Plz help.

     

     

    Thanks…

    March 5, 2013 at 2:02 am #9241
    adip
    Participant

    hi sandeeb,

    actually a program in this site in microcontrollers-avr is avialable.

    i have pasted it below.

    only thing is you need a interfacing diagram which is a single pin of LM 35 going to microcontroller and the rest 2 are vcc and ground.

    you can get diagram from net.

    i think it will work.

    if the below code does not work in some software try to change the header file.

     

     

     

     // Program to take input from a particular pin in AVR Microcontroller (ATmega16) #include<avr/io.h> #include<util/delay.h>

    int main (void)
    {
          unsigned int i=0;
          DDRA=~_BV(PA0);   // PA0 as input pin
          PORTA=0x00;
          DDRD=0xff;

    while(1)
          {
                PORTD=0x01;
                while(PORTD!=0)
                {
                      if(bit_is_set(PINA,PA0))       //If PA0=1
                      {
                            _delay_ms(100);

    if(bit_is_set(PINA,PA0))//Check it again due to swithc debouncing
                            PORTD=(PORTD<<1);        //Left shift value of PORTD by 1
                     
                      }
                     
                }
          }
    }

    March 5, 2013 at 9:54 am #9245
    Sanjeeb Kumar Mohanty
    Participant

    Thanks adip

  • 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

  • Pic18f25q10 osccon1 settings swordfish basic July 16, 2025
  • turbo jet fan - feedback appreciated. July 16, 2025
  • More fun with ws2812 this time XC8 and CLC July 16, 2025
  • I Wanna build a robot July 16, 2025
  • Pickit 5 July 16, 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