Temperature Sensor with ATMega 8Schematic Circuits _ Schematic Circuits.pdf
(
140 KB
)
Pobierz
← USART to USB converter using FT232BM
(http://project.irone.org/usarttousbconverterusing
ft232bm.html)
DC motor control with PWM on ATMega →
(http://project.irone.org/dcmotorcontrolwithpwmon
atmega.html)
Temperature Sensor with ATMega 8
(http://project.irone.org/temperature
sensorwithatmega8.html)
Posted on May 25, 2009 (http://project.irone.org/temperaturesensorwithatmega8.html) by admin
(http://project.irone.org/author/admin)
3D People
Counting Sensor
People Counting Waiting time
measurement
This project will describe the temperature
sensor that is based ATMega 8. On this
circuit as a temperature sensor IC using
LM35, LM35 is cheaper than the price of
this component is also easy to be in the
market.
(http://project.irone.org/wpcontent/uploads/2009/05/heatsensorwithatmega8.gif)
LM35 have 10mV voltage change per 1 degree centigrade. LM35, in principle, given the
voltage + Vs and GND, the voltage Vout akan issue of
Vout = surrounding temperature (centigrade) x 10mV.
on the # include “lcd.h” you can download click here (http://project.irone.org/download/).
following source code from this project in AVRGCC format:
“
#include <avr/io.h>
#include <avr/interrupt.h>
#include <stdio.h>
#include <util/delay.h>
#include “lcd.h” //header lcd
volatile unsigned char suhu; //variabel store adc
//deklarasi lcd to stdio
static int lcd_putchar(char c, FILE *stream); //prototype
static FILE mystdout = FDEV_SETUP_STREAM(lcd_putchar,
NULL,_FDEV_SETUP_WRITE); static int lcd_putchar(char c, FILE *stream)
{
if (c == ‘n’) lcd_putchar(‘r’, stream);
LCD_send_char(c);
return(0);
}
//fungsi delay mili sekon
void delay_ms(int ms)
{for(int i=0;i<=ms;i++){_delay_ms(1);};
}
void adc_init(void) //inisialisasi lcd
{ ADMUX =(1<<REFS1)|(1<<REFS0)
|(1<<ADLAR)
|(0<<MUX3)|(0<<MUX2)|(0<<MUX1)|(0<<MUX0);//ADC0
ADCSRA =(1<<ADEN)|(0<<ADFR)|(1<<ADIE)
|(1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0);
sei ();
}
ISR(ADC_vect)
{ suhu=ADCH;
LCD_send_command(0xc0); //cursor line2
printf(“sekarang:% 3d c”,suhu);
return;
}
int main (void)
{ adc_init();
delay_ms(200);
LCD_init();
stdout = &mystdout;
LCD_send_command(LCD_CLR);
LCD_send_command(LCD_HOME);
LCD_send_command(0×80); //cursor line1
printf(“suhu ruangan ini”);
LCD_send_command(0xc0); //cursor line2
printf(“sekarang:% 3d c “,suhu);
while(1){
ADCSRA|=(1<<ADSC); //start conversi
delay_ms(500);
}
return(0);
}
Dwyer Instruments Ltd.
Series RHP
Humidity/Temperature
Transmitter w/optional
LCD Display
Posted in Microcontroller Project (http://project.irone.org/category/microcontrollerproject) | Tagged
ATMega (http://project.irone.org/tag/atmega), AVR (http://project.irone.org/tag/avr), Sensor
(http://project.irone.org/tag/sensor) | Leave a comment (http://project.irone.org/temperaturesensor
withatmega8.html#respond)
← USART to USB converter using FT232BM
(http://project.irone.org/usarttousbconverterusing
ft232bm.html)
DC motor control with PWM on ATMega →
(http://project.irone.org/dcmotorcontrolwithpwmon
atmega.html)
Microcontroller
Schematic
Download
Free Downloads
Circuit
Email
Leave a Reply
Plik z chomika:
uniwel
Inne pliki z tego folderu:
Analogowe_uklady_elektroniczne_Boksa.pdf
(215361 KB)
altium designer.djvu
(126024 KB)
!! Stabilizowane zasilacze urządzeń elektronicznych - G.P. Gieriesow.pdf
(25242 KB)
07_DS18B20_single.rar
(254 KB)
169 przepisów na grilla._5fantastic.pl_.rar
(5327 KB)
Inne foldery tego chomika:
Pliki dostępne do 08.07.2024
_Green_Book_
Aldous Huxley - Nowy wspaniały świat
audiobook(uniwel)
Automatyka
Zgłoś jeśli
naruszono regulamin