Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

at80c51 thermometer project

Status
Not open for further replies.

beyaz

Newbie level 5
Joined
May 22, 2011
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,364
at89c51 thermometer project

Hey guys i have to do project about thermometer as using at 89c51 microchip.


i need a circuit design and code for this project.:!:

if anyone know plz post here.

thanks
 

sherazi

Banned
Joined
Feb 15, 2010
Messages
388
Helped
61
Reputation
126
Reaction score
61
Trophy points
1,318
Location
Muscat, Oman, Oman
Activity points
0
use ds1820 or ds18S20 for the project, u can get alot of resources if u search for the sensor interface to 89c51
 

sherazi

Banned
Joined
Feb 15, 2010
Messages
388
Helped
61
Reputation
126
Reaction score
61
Trophy points
1,318
Location
Muscat, Oman, Oman
Activity points
0
i have this file but its with avr ,regarding the hardware u just need the ds18x20 sensor, a few resistors, a LCD and a microcontroller ..

You can search for the ds18x20 library for your microocntroller and use it!
 

Attachments

  • Like
Reactions: beyaz

    beyaz

    points: 2
    Helpful Answer Positive Rating

beyaz

Newbie level 5
Joined
May 22, 2011
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,364
i have this file but its with avr ,regarding the hardware u just need the ds18x20 sensor, a few resistors, a LCD and a microcontroller ..

You can search for the ds18x20 library for your microocntroller and use it!
i have to with at89c51 otherwise i get zero points from project

:cry:

---------- Post added at 09:36 ---------- Previous post was at 09:32 ----------

i have dallas 18b20 atm as sensor
 

sherazi

Banned
Joined
Feb 15, 2010
Messages
388
Helped
61
Reputation
126
Reaction score
61
Trophy points
1,318
Location
Muscat, Oman, Oman
Activity points
0
you can get lots of code out there ... the code is in C usually so u can port it to 89c51 if its not for that! what have u done so far?

if its a college project u should do it your self instead of getting a ready made code +hardware diagrams

if you wanna learn start searching here at edaboard or u may visit 8051projects.net find some code , and then if u have any problems or anything u don't understand we are here to help
 

beyaz

Newbie level 5
Joined
May 22, 2011
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,364
The real problem is im computer engineer student.Maybe if i push myself i can do code but i realy dont understand about circuit design.i need that.i will keep up to search but if anyone knows it help me a lot.

---------- Post added at 09:48 ---------- Previous post was at 09:47 ----------

use LM35 sensor and 89c51 controller and ADC and LCD for your project.
As i know dallas 18b20 is digital sensor isnt that more easy?
 

sherazi

Banned
Joined
Feb 15, 2010
Messages
388
Helped
61
Reputation
126
Reaction score
61
Trophy points
1,318
Location
Muscat, Oman, Oman
Activity points
0
That's a nice one, although you have to add a ADC chip as 89c51 doesn't have ADC.
 

KerimF

Advanced Member level 4
Joined
May 17, 2011
Messages
1,461
Helped
374
Reputation
756
Reaction score
370
Trophy points
1,363
Location
Syria
Activity points
12,314
As i know dallas 18b20 is digital sensor isnt that more easy?
I use DS1721S (2-Wire Digital Thermometer, not 1-wire) with my Atmel C51.
What do you think?

Kerim
 

beyaz

Newbie level 5
Joined
May 22, 2011
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,364
can you give circut diagram
 

KerimF

Advanced Member level 4
Joined
May 17, 2011
Messages
1,461
Helped
374
Reputation
756
Reaction score
370
Trophy points
1,363
Location
Syria
Activity points
12,314
can you give circut diagram
By the way, are you familiar with I2C serial EEPROM as 24C16 or 24C512 etc...
Could you download the datasheet of DS1721 (8-pin)?
Is the IC available for your project?

The circuit is very simple (like interfacing with 24Cxx). Two pins from the MCU will be connected to two pins on the IC. I usually add two pullup resistors (one for each pin) of value 10K (or 4k7) to get a better rise time.

Kerim
 

beyaz

Newbie level 5
Joined
May 22, 2011
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,364
Hey again guys i need to convert c code to hex;

here is the code;

#include<reg51.h>
#define port P3
#define adc_input P1
#define dataport P0
#define sec 100
sbit rs = port^0;
sbit rw = port^1;
sbit e = port^2;

sbit wr= port^3;
sbit rd= port^4;
sbit intr= port^5;

int test_intermediate3=0, test_final=0,test_intermediate1[10],test_intermediate2[3]={0,0,0};

void delay(unsigned int msec )
{
int i ,j ;
for(i=0;i<msec;i++)
for(j=0; j<1275; j++);
}

void lcd_cmd(unsigned char item) // Function to send commands to LCD
{
dataport = item;
rs= 0;
rw=0;
e=1;
delay(1);
e=0;
return;
}

void lcd_data(unsigned char item) // Function to send data to LCD
{
dataport = item;
rs= 1;
rw=0;
e=1;
delay(1);
e=0;
return;
}

void lcd_data_string(unsigned char *str) // Function to string to LCD
{
int i=0;
while(str!='\0')
{
lcd_data(str);
i++;
delay(10);
}
return;
}

void shape() // Function to make the shape of degree symbol
{
lcd_cmd(64);
lcd_data(2);
lcd_data(5);
lcd_data(2);
lcd_data(0);
lcd_data(0);
lcd_data(0);
lcd_data(0);
lcd_data(0);
}

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);
}

void main()
{
int i,j;
adc_input=0xff;
lcd_cmd(0x38); //2 Line, 5X7 Matrix display
lcd_cmd(0x0c); //Display On, Cursor blinking
delay(2);
lcd_cmd(0x01); // clear screen
delay(2);

while(1)
{
for(j=0;j<3;j++)
{
for(i=0;i<10;i++)
{
delay(1);
rd=1;
wr=0;
delay(1);
wr=1;
while(intr==1);
rd=0;
lcd_cmd(0x88);
test_intermediate1=adc_input/10;
delay(1);
intr=1;
}
for(i=0;i<10;i++)
test_intermediate2[j]=test_intermediate1+test_intermediate2[j];
}

test_intermediate2[0]=test_intermediate2[0]/3;
test_intermediate2[1]=test_intermediate2[1]/3;
test_intermediate2[2]=test_intermediate2[2]/3;
test_intermediate3=test_intermediate2[0]+test_intermediate2[1]+test_intermediate2[2];
shape();
convert();
}
}

i used micro c but it didnt work it said 0 304 C:/Users/Ucdemir/Documents/omer.c:1: error: Can't open include file "reg51.h"

can anyone help me which compiler converter i can use to convert c to hex

---------- Post added at 15:17 ---------- Previous post was at 13:46 ----------

up.....
need help
 

beyaz

Newbie level 5
Joined
May 22, 2011
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,364
i appreciate you.

but im like newbie.
can you teach me how can i also do as using this program
ty
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top