We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
sir , My simple program is LCD display using CX 51 is given below. In the program compiling peroid no other errors and warning are occured. But the obj file for those program stored in the microconroller 80c51 chip they dont work it.what is the problem. plz give a solution any one sir.
#include<stdio.h> #include<reg52.h> #include<intrins.h> #include<string.h> #include<absacc.h> // sfr P1 = 0x90; // sfr P3 = 0xB0; sbit P3_2 = P3^2; sbit P3_3 = P3^3; sbit P3_4 = P3^4; lcd_init(); lcd_command(); lcd_ready(); lcd_display(); void main() { SCON = 0x52; /* SCON */ /* setup serial port control */ TMOD = 0x20; /* TMOD */ /* hardware (2400 BAUD @12MHZ) */ TCON = 0x69; /* TCON */ TH1 = 0xf3; /* TH1 */ lcd_init(); lcd_command(); lcd_ready(); lcd_display(); } lcd_init() { ACC = 0x3c; lcd_command(); ACC = 0x0e; lcd_command(); ACC = 0x06; lcd_command(); ACC = 0x01; lcd_command(); ACC = 0x87; lcd_command(); ACC = 'P'; lcd_display(); ACC = 'r'; lcd_display(); ACC = 'e'; lcd_display(); ACC = 's'; lcd_display(); ACC = 's'; lcd_display(); ACC = ' '; lcd_display(); ACC = 'A'; lcd_display(); ACC = 'n'; lcd_display(); ACC = 'y'; lcd_display(); ACC = ' '; lcd_display(); ACC = 'K'; lcd_display(); ACC = 'e'; lcd_display(); ACC = 'y'; lcd_display(); ACC = '.'; lcd_display(); } lcd_command () { lcd_ready(); P1 = ACC; P3_2 =0; P3_3 =0; P3_4 =1; P3_4 = 0; return ; } lcd_ready() { P3_4 = 0; P2 = 0xff; P3_2 =0; P3_3 =1; } lcd_display() { lcd_ready(); P1 = ACC; P3_2 =1; P3_3 =0; P3_4 =1; P3_4 =0; return ; }
It would help if you used a more descriptive title for your post than "plz query".