- This topic has 4 replies, 2 voices, and was last updated 14 years, 3 months ago by
Shane Culhane.
-
AuthorPosts
-
October 18, 2011 at 4:24 pm #1324
Shane Culhane
Participanthi,im am building a digital thermometer with 8051 and am seeking help…rough ideas = inputs of thermistor and keypad to change max/min temp for alarm to go off,ADC,microcontroller (AT89C51),outputs of LED showing Fan goes on/off if temp goes over max/min and display with temp
October 23, 2011 at 10:55 am #6746Amol Shah
ParticipantQuite simple dude use LM35 because its o/p is linear and you can calibrate it easily.
For ADC you can use ADC0804 single channel 8 bit ADC.
For keypad even two switches are sufficient one for increment and another for decrement.
Instead of showing lights on/off on led use a relay, you will require relay driver circuit to drive the relay using which you can acutually turn on/off fan. check this link for relay driver circuit: http://www.dnatechindia.com/Tutorial/8051-Tutorial/Interfacing-Relay-to-Microcontroller.html
November 4, 2011 at 2:43 pm #6806Shane Culhane
ParticipantThanks Amol Shah for your help….im a beginner to this so my knowledge is slim,any ideas on display to be used…..im also dreading the code,C ++ is best i believe?
January 1, 2012 at 5:25 pm #6977Amol Shah
ParticipantYou can use 16×2 alphanumeric display….its very simple to interface…check this link to know how to interface lcd to 8051 controller: http://www.dnatechindia.com/Tutorial/8051-Tutorial/Interfacing-LCD-to-8051.html
here is a link for code in C language: http://www.dnatechindia.com/Code-Library/C-Code-Library/LCD-INTERFACING-TO-8051-IN-8-BIT-MODE.html
and here is a link for code in assembly language: http://www.dnatechindia.com/Code-Library/8051-Assembly/LCD-Interfacing-To-8051-in-8-bit-mode.html
January 12, 2012 at 4:22 pm #7023Shane Culhane
Participantmade attempt at code and isis
#include <reg52.h>#define upper 22#define lower 17#define ON 1#define OFF 2unsigned char a2d_val;sbit fan = P2^0;sbit heater = P2^1;sbit start_con = P3^0;sbit eoc = P3^7;void delay_50 (void);void main (void){eoc = 1;P1 = 0xFF;fan = heater = OFF;while (1){start_con = 1;start_con = 0;while (eoc == 0){}a2d_val = P1;if (a2d_val > upper){fan = ON;heater = OFF;}else if (a2d_val<lower){fan = OFF;heater = ON;}else{fan = heater = OFF;}delay_50();}}void delay_50 (void){TMOD = 0x01;TL0 = 0x60;TH0 = 0x3c;TF0 = 0;TR0 = 1;while (TF0 == 0){}TR0 = 0;}code worked i think but problems building it -
AuthorPosts
- You must be logged in to reply to this topic.