Forum Replies Created
-
AuthorPosts
-
Keith FormosaParticipant
Hi my I got the code, circuit and everything from this website ! Look up celsius scale digital thermometer on the 8051 projects section on this website.
Thanks very much
Keith FormosaParticipantI got my circuit from this website, it says it is designed in 8 bit mode and I assume it is in 8 bit mode. It is displaying junk. My only concern is that im using the AT89C51AC2 training board and P1 or Port1 does not have 10k pull up resistors. P1 is the ADC input to the microcontroller and P0 is used as an output to the lcd.
Keith FormosaParticipant//Program to make a digital thermometer with display in centigrade scale
#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 command 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;
//delay(100);
return;
}
void lcd_data_string(unsigned char *str) // Function to send string to LCD
{
int i=0;
while(str!=’