Microcontroller › 8051 › 8051 project
- This topic has 7 replies, 3 voices, and was last updated 10 years ago by Keith Formosa.
-
AuthorPosts
-
September 11, 2014 at 5:25 pm #3253Keith FormosaParticipant
Hi I built the celsius scale digital thermometer but I used the AT89C51AC2 instead of the AT89C51 but when I run the program the LCD displays alot of random symbols and starts blinking. Do any of you know what might be wrong or how to solve this problem ! ?
Thanks alot
September 12, 2014 at 7:08 am #12155chandrasekharParticipantcheck the code,may the data is latching on the lcd.
September 12, 2014 at 11:57 am #12160AJISH ALFREDParticipantHi Keith,
Please post the code so that we can have a look
September 12, 2014 at 4:03 pm #12163Keith 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!=’