Archives
-
LCD Data Scrolling Left to right and vice versa.
Hi every one.
I write a code to understand data scrolling using LCD. In this code the printed text will keep scrolling from left to right and then from right to left
here is code
CODE:
#include ltreg51.Hgt
sbit rs=P1^0;
sbit rw=P1^1;
sbit E=P1^2;
unsigned int i;
void LCD_data(unsigned char x);
void LCD_cmd(unsigned char x);
void delay_ms(unsigned int x);
void lcd_str (unsigned char *str);
void main (){
P1=0xFF;
LCD_cmd(0×38);
LCD_cmd(0x0C);
LCD_cmd(0×01);
delay_ms(50);
LCD_cmd(0×90);
lcd_str(“Mansoor”);
LCD_cmd(0xD1);
lcd_str(“Mirza”);
for(i=0;ilt7;i++){
LCD_cmd(0x1E);
delay_ms(7);
}
while(1){for(i=0;ilt9;i++){
LCD_cmd(0x1E);
delay_ms(7);
}
for(i=0;ilt9;i++){
LCD_cmd(0×18);
delay_ms(5);
}}
}
void delay_ms(unsigned int x){
unsigned int i,j;
for(i=0; ilt=x; i++){
for(j=0; jlt=1000; j++){
;
}
}
}
void LCD_data(unsigned char x){
rw=0;
rs=1;
P2=x;
E=1;
delay_ms(1);
E=0;
delay_ms(1);
}
void LCD_cmd(unsigned char x){
rw=0;
rs=0;
P2=x;
E=1;
delay_ms(1);
E=0;
delay_ms(1);
}
void lcd_str (unsigned char *str)
{
while(*str){
LCD_data(*str++);
delay_ms(10);
}
}Hex file and Simulation Download Here
Here is how it looks
Related Forum Messages
- LCD Interfacing with 8051
- Development of a menu system using 8051 nd LCD (2*16)
- Getting error of multiple public defination.
- Increment count on LCD display?
- How to read philips remote data interface with 8051
- Lcd interfacing with 8051 microcontroller
- Unable to find mistake in program….if u could help?
- Mmc pic18f4550
- Temperature conversion
- Help needed keypad & LCD. Please..
- PIC18f with LCD & UART ,,, need help
- [SOLVED] LCD interfacing with 8051
- I cant print out the recived character on lcd using PIC18f45
- [SOLVED] problem in interfacing graphical LCD using LPC2138
- Help me with this code
- How to display ADC values to 16×2 LCD
- 16F877A LCD 4-bit MODE
- GSM Reception is not working in interrupt mode
- LCD connected with pic 16f877a problem
- 8051 storing password in array
Hello everyone I write a simple code to interface LCD with 8051, this will show your name on LCD Here is code CODE: #include ltREGX51.Hgt sbit rs=P1^0; sbit rw=P1^1; sbit E=P1^2; void LCD_data(unsigned char x); void LCD_cmd(unsigned char x); void delay_ms(unsigned int x); void main(){ delay_ms(200); LCD_cmd(0x38); ...hello!i want to develop a menu system using 8051 n LCD (2*16),i've tried a code bt its nt working completely! the code is #includeltreg51.hgt sbit up=P1^0; sbit down=P1^1; sbit menu=P1^2; sbit back=P1^3; sbit E=P1^4; sbit rs=P1^5; sbit rw=P1^6; unsigned int p,m,x,r,f,j,k,y,z,a,c; void LCD_data(unsigned char x); void LCD_cmd(unsigned char x); void delay_ms(unsigned int x); void LCD_init(); void LCD_xy(unsigned char x,unsigned int a,unsigned int c); void LCD_string(unsigned char *str); void main_menu(); void main(){ up=down=menu=back=1; m=r=f=j=0; LCD_init(); LCD_string("Welcome"); p=1; main_menu(); while(1){ if(menu==0){ p++; } if(back==0){ p--; } if(up==0){ m--; if(m==0) m=2; } if(down==0){ m++; if(m==3) m=1; } if(p==2){ main_menu(); } if(p==3){ m=1; LCD_cmd(0x01); LCD_string("gtgt Running Lights"); LCD_cmd(0xc0); LCD_string(" Flashing Lights"); } if(p==3 ampamp m==2){ LCD_cmd(0x01); LCD_string(" Running Lights"); LCD_cmd(0xc0); LCD_string("gtgt Flashing Lights"); } if(p==4 ampamp m==1){ LCD_cmd(0x01); LCD_string("set runing speed"); LCD_cmd(0xc0); LCD_string("save [00] back"); while(1){ if(up==0 ampamp xlt99){ while(up==0); x++; y=x/10; y=y+0x30; LCD_xy(y,2,7); z=x%10; z=z+0x30; LCD_xy(z,2,8); } if(down==0 ampamp xgt0){ while(down==0); x--; y=x/10; y=y+0x30; LCD_xy(y,2,7); z=x%10; z=z+0x30; LCD_xy(z,2,8); } if(menu==0){ while(menu==0); p=2; r=1; m=1; f=0; } if(back==0){ while(back==0); p=3; } } } if(r==1){ if(j==(x*2) ampamp k==1){ P1=(0xAA); k=0; j=0; } if(j==(x*2) ampamp k==0){ P1=(0x55); k=1; j=0; delay_ms(1); j++; } } if(p==4 ampamp m==2){ LCD_cmd(0x01); LCD_string("set flash speed"); LCD_cmd(0xc0); LCD_string("save [00] back"); while(1){ if(up==0 ampamp xlt99){ x++; y=x/10; y=y+0x30; LCD_xy(y,2,7); z=x%10; z=z+0x30; LCD_xy(z,2,8); } if(down==0 ampamp xgt0){ x--; y=x/10; y=y+0x30; LCD_xy(y,2,7); z=x%10; z=z+0x30; LCD_xy(z,2,8); } if(back==0){ p=3; } if(menu==0){ p=2; r=0; f=1; } } if(f==1){ if(j==(x*2) ampamp k==1){ P1=(0x0); k=0; j=0; } if(j==(x*2) ampamp k==0){ P1=(0xff); k=1; j=0; delay_ms(1); j++; } } } } } void delay_ms(unsigned int x){ unsigned int i,j; for(i=0; ...I have done a program with keil,getting error while linking. but the same program is running in single file, i think problem with linking only...up to me,i linked the program..i dont know why is not linking...can any body suggest me. MAIN FILE:- #include ltREGX51.Hgt #include "lcd.c" unsigned int i=0,l=0; sbit alsen=P2^0; sbit eyesen=P2^2; sbit Buz=P0^2; sbit motor=P0^4; void timer_init() { IE=0x82; TMOD=0x01; TH0=0x4B; TL0=0xFD; TR0=1; } void main() { unsigned int j; lcd_init(); timer_init(); Buz=1; motor=1; delay(65000); delay(65000); while(1) { if(alsen==1) { lcd_cmd(0x80); lcd_str("Alcohol Detected"); lcd_cmd(0xc0); Buz = 0; motor=0; while(1); } else if(alsen==0) { lcd_cmd(0x80); for(j=0;jlt1000;j++); lcd_str("Alcohol Normal "); lcd_cmd(0xc0); } if(l==100) { if(igt20) { lcd_cmd(0xc0); ...I want to increment a count and display in lcd, when pushbutton is pressed. Button connected to PIN C0. It compiles successfully. In the display it shows count, but when i press push button it shows different characters at location 0x86 in the display. Please help... HTML Code: #include "18F2520.h" #fuses INTRC_IO #use delay(clock=4000000) // internal clock #define RS PIN_A2 #define EN PIN_A1 void lcd_init(); void lcd_cmd(unsigned char); void lcd_data(unsigned char); unsigned char data[] = "count"; unsigned int i = 0; unsigned int counter = 0; int16 temp; void main() { lcd_init(); setup_timer_0(RTCC_INTERNAL|RTCC_DIV_256|RTCC_8_BIT); while(1) { while(data[i]!='\0') { lcd_data(data[i]); i++; } lcd_cmd(0x86); if(input(PIN_C0)==0) { delay_ms(200); temp=counter++; lcd_data(temp); } } } void lcd_init() { lcd_cmd(0x30); // Configure the LCD in 8-bit ...I have designed and written some code to display the recievers output on lcd but not getting the required output can anyone help me #includeltreg51.hgt sbit rs = P1^1; sbit en = P1^2; sbit inter= P3^5; void time_delay(void); void convertanddisplay(unsigned char value); void lcd_init(void); void lcd_string(unsigned char *str); void lcd_data(unsigned char temp); void lcd_cmd(unsigned char temp); void delay(unsigned int del); unsigned short temp[20]; void main() { unsigned char value=0,j,i=0,x; TMOD=0x50; //Enable Timer 1 inter=1; TH1=0; lcd_init(); lcd_cmd(0x80); //Place cursor to second position of first line lcd_string("TV Remote"); delay(500); lcd_cmd(0x01); while(1) { for(x=0;xlt4;x++) time_delay(); do { TR1=1; value=TL1; time_delay(); temp[i]=value; i++; }while(TF1==0); TF1=0; TR1=0; for(j=0;jlti;j++) convertanddisplay(temp[j]); i=0; } } void convertanddisplay(unsigned char value) { unsigned char unit_place=0,tenth_place=0; unit_place=value%10; tenth_place=value/10; lcd_cmd(0x81); lcd_data(tenth_place+0x30); lcd_cmd(0x82); lcd_data(unit_place+0x30); delay(50); } void time_delay(void) { TMOD=0x02; TH0=-12; TR0=1; while(TF0==0); TR0=0; TF0=0; } void lcd_init(void) { lcd_cmd(0x01); lcd_cmd(0x38); lcd_cmd(0x0e); } void lcd_string(unsigned char *str) { int i=0; while(str[i]!='\0') { lcd_data(str[i]); i++; delay(10); } } void lcd_data(unsigned char temp) { P2=temp; rs= 1; en=1; delay(20); en=0; } void lcd_cmd(unsigned char temp) { P2=temp; rs= 0; en=1; delay(20); en=0; } void delay(unsigned int del) { int i,j ; for(i=0;iltdel;i++) for(j=0;jlt1275;j++); }how to interface lcd with 8051?............... ---------- Post added at 12:46 ---------- Previous post was at 12:46 ---------- #include ltREGX51.Hgt sbit rs=P3^5; sbit rw=P3^6; sbit en=P3^7; delay(unsigned int i) { while(i--); } lcd_cmd(unsigned char c) { P1=c; rs=0; rw=0; en=1; delay(150); en=0; } lcd_data(unsigned char c) { P1=c; rs=1; rw=0; en=1; delay(150); en=0; } lcd_init() { lcd_cmd(0x38); lcd_cmd(0x0c); lcd_cmd(0x01); lcd_cmd(0x80); } void main() { int i; lcd_init(); for(i=0;ilt=16;i++) { lcd_cmd(0x01); lcd_cmd(0x80+i); lcd_data( "VINOTH"); } lcd_cmd(0xc0); lcd_data( " HELLO World"); }Below is the program for moving message on lcd.....ws not working on chip....if u can help me any modifications..it is for philips P89v51rd2fn lcd is jhd162a #includeltreg51.hgt sfr lcd_data_pin=0x90; // port 1 sbit rs=P3^0; // Register select pin sbit rw=P3^1; // Read write pin sbit en=P3^2; // Enable pin void delay(unsigned int msec) //delay function { int i,j; for(i=0;iltmsec;i++) for(j=0;jlt1275;j++); } void lcd_cmd(unsigned char comm) // function to send command to LCD { lcd_data_pin=comm; en=1; rs=0; rw=0; delay(25); en=0; } void lcd_data(unsigned char disp) // function to send data on LCD { lcd_data_pin=disp; en=1; rs=1; rw=0; delay(25); en=0; } void lcd_puts(unsigned char *s) // function to send string to LCD { while(*s!='\0') { lcd_data(*s); s++; } } void lcd_ini() //Function to initialize the LCD { lcd_cmd(0x38); lcd_cmd(0x06); lcd_cmd(0x80); lcd_cmd(0x01); lcd_cmd(0x0C); } void main() { ...Mmc_Init is successful but, Mmc_Fat_Init is not. I am using a 2GB SD card formatted on a Windows XP with FAT format. I am using the LCD screen to determine where the error is, and the screen prints 1,2 and just stays at 2. char filename[] = "MYFILE55TXT"; unsigned char txt[] = "This is the added data..."; unsigned short character; unsigned long file_size,i; void main() { cmcon = 0x07; adcon1 = 0x0F; intcon = 0x00; OSCCON = 0x72; TRISB = 0; Lcd_Init(ampPORTB); Lcd_Cmd(Lcd_CURSOR_OFF); Lcd_Cmd(LCD_CLEAR); // Initialise the SPI bus Spi_Init_Advanced(MASTER_OSC_DIV64, DATA_SAMPLE_MIDDLE, CLK_IDLE_LOW, LOW_2_HIGH); Lcd_Cmd(LCD_CLEAR); Lcd_Out(1,1,"1"); Delay_ms(500); // Initialise the SD card bus while(Mmc_Init(ampPORTD,2)); Lcd_Cmd(LCD_CLEAR); Lcd_Out(1,1,"2"); Delay_ms(500); // Initialise the FAT file system while(Mmc_Fat_Init(ampPORTD,2)); Lcd_Cmd(LCD_CLEAR); Lcd_Out(1,1,"3"); Delay_ms(500); // Create the file (if it doesnt exist) Mmc_Fat_Assign(ampfilename,0x80); Lcd_Cmd(LCD_CLEAR); Lcd_Out(1,1,"4"); Delay_ms(500); // Clear the file, start with new ...i asked about displaying the converted temperature on lcd icouldnot do it for example if i have 37 c how to display it on lcd after conversion Code: #include ltbuilt_in.hgt unsigned int adc_rd; //unsigned int temp; unsigned long Vin,temp; unsigned char op[12]; unsigned char i,j,lcd[5]; // LCD module connections sbit LCD_RS at PORTD2_bit; sbit LCD_EN at PORTD3_bit; sbit LCD_D4 at PORTD4_bit; sbit LCD_D5 at PORTD5_bit; sbit LCD_D6 at PORTD6_bit; sbit LCD_D7 at PORTD7_bit; sbit LCD_RS_Direction at DDD2_bit; sbit LCD_EN_Direction at DDD3_bit; sbit LCD_D4_Direction at DDD4_bit; sbit LCD_D5_Direction at DDD5_bit; sbit LCD_D6_Direction at DDD6_bit; sbit LCD_D7_Direction at DDD7_bit; // End LCD ...Hi, I want to interface a 4x4 keypad to my philips microcontroller. The keys I enter should be displayed on LCD. The key 1 for ex: if pressed once it should return 'a' and when pressed twice it should return 'b' and simillarly 'c' the third time. Just like in phones. I have a code in C below, I tried but its not working. The connections are perfect. Please help me out here.. Thanks in advance. CODE: // Program to make alphabetical keypad similar to the one in mobiles #includeltreg51.hgt #include ltstring.hgt #include ltstdio.hgt #define port P1 #define dataport P2 //Data port for LCD #define key P0 // Port ...I have several proplem in both UART amp LCd first i connected the TX with the RX of the 18f452 . the proplems are , 1 -in UARt , if i send more than 3 characters more the statment (( Uart1_read_text(output, "at+fclass=8 ",255) ; )) the compiler will not fint it amp remain serching for the charcters . 2- in LCD , i can't print out the characters in the recived registers on the LCd . as UART1_Write_text("at"); delay_ms(100); UART1_Read_text(output,"AT",255); Lcd_Cmd(_LCD_CLEAR); Lcd_Cmd(_LCD_CURSOR_OFF); Lcd_out(1,1,output); delay_ms(1000); nothing will be on the lcd the all code is // LCD module connections sbit LCD_RS at RB4_bit; sbit LCD_EN at RB5_bit; sbit LCD_D4 at RB0_bit; sbit LCD_D5 at RB1_bit; sbit LCD_D6 at RB2_bit; sbit LCD_D7 at RB3_bit; sbit ...hello mates; I have written the code for displaying characters on 16*2 LCD with 8051 in C language (in 8 bit mode); however i could not see any output on my Proteus simulator. I checked my code again and again, can i have your expert looks please... thanks amp regards, Pravin B here is code::::::::: Code: #include<REG51.H> sbit rs=P0^0; //rs connected to p0.0 sbit rw=P0^1; //rw connected to p0.1 sbit en=P0^2; //en connected to p0.2 sbit busy=P2^7; //busy connected to p2.7 void delay(unsigned int count) //delay subroutine { unsigned int i,j; for(i=0;i<=count;i++) for(j=0;j<=1275;j++); } void ready() //subroutine to check if lcd is busy { busy=1; //make busy pin input rs=0; //rs=low rw=1; //rw=high while(busy==0) //check if busy flag is equal to 0 { en=0; delay(2); en=1; } } void lcd_cmd(unsigned int value) //sub. to write commands { ready(); P2=value; rs=0; rw=0; en=1; delay(2); en=0; } void lcd_data(unsigned int value) //sub to write ...Hello , i try to send charters to pic18f452 using UART I have a problem in printing the revived characters on lcd . aslo I think that the UART1_data _ready is not 1, amp if i ignored the if statement no character will appear on the lcd . the code is // LCD module connections sbit LCD_RS at RB4_bit; sbit LCD_EN at RB5_bit; sbit LCD_D4 at RB0_bit; sbit LCD_D5 at RB1_bit; sbit LCD_D6 at RB2_bit; sbit LCD_D7 at RB3_bit; sbit LCD_RS_Direction at TRISB4_bit; sbit LCD_EN_Direction at TRISB5_bit; sbit LCD_D4_Direction at TRISB0_bit; sbit LCD_D5_Direction at TRISB1_bit; sbit LCD_D6_Direction at TRISB2_bit; sbit LCD_D7_Direction at TRISB3_bit; // End LCD module connections unsigned char* uart_rd; unsigned long* msg1 = "AT+FCLASS=8" ...hello, i am interfacing graphical LCD with LPC2138 micro controller. but their is a some problem genrating in my code, due to this i am unable to interface my LCD. I am attaching my code amp proteus file with this post. please help me to remove my problem.. Code: #include<LPC213X.H> #define RST 4 #define E 5 #define RW 6 #define DI 7 #define CS1 8 #define CS2 9 #define LED 18 void lcd_cmd(unsigned char); void lcd_data(unsigned char); void lcd_inilize(); void shift(int); void delay(unsigned int); void display(); void page_address(int); void column_address(int); void left_side(int,char); void right_side(int,char); void clear_screen(); void start_line(int); /*const unsigned char truck[1024] = { 0, 0, 0, 0, 0, 0, 0, ...Code: // Program to interface Sharps distance sensor. Set vref =3v for ADC0804 #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_final=0 ,shift=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 ...guys i have problem on converting my ADC output values to String and display it to 16x2 LCD.. Im using keil compiler.. i have the code and its almost done... #include ltREG51.Hgt #define adc_port P3 #define LCD P2 #define LCD_EN 0x80 #define LCD_RS 0x20 sbit ale=P1^0; //address latch enable sbit oe=P1^3; //output enable sbit sc=P1^1; //start conversion sbit eoc=P1^2; //end of conversion sbit clk=P1^7; // clock sbit ADD_A=P1^4; // Address pins for selecting input channels. sbit ADD_B=P1^5; sbit ADD_C=P1^6; //LCD Commands #define LCD_SETMODE ...I tried out the following code in my development board. The compiler shows no error but I am not getting the output in LCD. Pls...anyone check this with your device and help me solve the error....pls...I am beginner. Thanks in advance Code: #include lt16F877A.hgt #device adc=8 #FUSES NOWDT //No Watch Dog Timer #FUSES HS //High speed Osc (gt 4mhz ...#includeltsoftuart.hgt #includeltstdio.hgt #includeltreg51.hgt void uart_init(); sbit sw=P1^7; unsigned char rx(); code unsigned char rd[] = "AT+CMGR=1"; code unsigned char ne[] = "AT+CNMI=2,2,0,0,0"; unsigned int r=0,m=0,s1=0,n1=0,f1=0,m2=0; unsigned char gs,mes_dat[]=0,mess[]=0; extern void lcd_init(); void lcd_cmd(unsigned char); void lcd_data(unsigned char); //void wait(); void gsm_delay(unsigned int); unsigned char txt[]="AT+CMGF=1"; unsigned char no[] ="AT+CMGS=\"9940151239\""; unsigned char del[]="AT+CMGDA=\"DEL ALL\""; unsigned char sen[]="SENSOR"; void send_no(); void new_mess(); void gsm_read(); void delete(); void gsm_read(); void mode(); unsigned char rx(); unsigned char w, re,rx_data; void tx(unsigned char); void serial(void) interrupt 4 { if(TI==1) { TI=0; SBUF = '\0'; //ES=0; } else if(RI==1) { rx_data = SBUF; if(rx_data=='+') { do { mess[m2] = rx_data; m2++; RI=0; }while(rx_data=='T'); } RI = 0; } } void main() { uart_init(); lcd_init(); mode(); new_mess(); // delete(); while(1) { ...i programming pic 16f877a interfacing with lcd 20X2 this my program: // LCD module connections sbit LCD_RS at RB0_bit; sbit LCD_EN at RB1_bit; sbit LCD_D4 at RB2_bit; sbit LCD_D5 at RB3_bit; sbit LCD_D6 at RB4_bit; sbit LCD_D7 at RB5_bit; sbit LCD_RS_Direction at TRISB0_bit; sbit LCD_EN_Direction at TRISB1_bit; sbit LCD_D4_Direction at TRISB2_bit; sbit LCD_D5_Direction at TRISB3_bit; sbit LCD_D6_Direction at TRISB4_bit; sbit LCD_D7_Direction at TRISB5_bit; // End LCD module connections int a,roaa,H,E,k; int t; void main() { ADCON1=0X07; TRISD=0XFF; TRISA=0x07; t=0; LCD_Init( ); LCD_Cmd(_LCD_CLEAR); LCD_Cmd(_LCD_CURSOR_OFF); delay_ms(1000); LCD_Out(1,3,"Nova Engineering"); delay_ms(3000); LCD_Cmd(_LCD_CLEAR); LCD_Out(1,3,"Welcome To Laser"); LCD_Out(2,7,"Therapy"); delay_ms(3000); LCD_Cmd(_LCD_CLEAR); roaa: LCD_Out(1,5,"PRESS MENU"); if(RD4_bit==1) { delay_ms(2000); LCD_Cmd(_LCD_CLEAR); } else goto roaa; LCD_Out(1,1,"Select Time"); LCD_Out(2,2,"ltlt"); LCD_Out(2,8,"gtgt"); H: if(RD5_bit==1) { t=t+1; } if(t==1) { LCD_Out(2,5,"01"); Delay_ms(200); } if(t==2) { LCD_Out(2,5,"02"); Delay_ms(200); } if(t==3) { LCD_Out(2,5,"03"); Delay_ms(200); } if(t==4) { LCD_Out(2,5,"04"); Delay_ms(200); } if(t==5) { LCD_Out(2,5,"05"); Delay_ms(200); } if(t==6) { LCD_Out(2,5,"06"); Delay_ms(200); } if(t==7) { LCD_Out(2,5,"07"); Delay_ms(200); } if(t==8) { LCD_Out(2,5,"08"); Delay_ms(200); } if(t==9) { LCD_Out(2,5,"09"); Delay_ms(200); } if(t==10) { LCD_Out(2,5,"10"); Delay_ms(200); } if(t==11) { LCD_Out(2,5,"11"); Delay_ms(200); } if(t==12) { LCD_Out(2,5,"12"); Delay_ms(200); } if(t==13) { LCD_Out(2,5,"13"); Delay_ms(200); } if(t==14) { LCD_Out(2,5,"14"); Delay_ms(200); } if(t==15) { LCD_Out(2,5,"15"); Delay_ms(200); } if(RD2_bit==1) { t=t-1; } if(RD1_bit==1) { delay_ms(3000); LCD_Cmd(_LCD_CLEAR); delay_ms(1000); } else { delay_ms(200); goto H; } LCD_Out(1,1,"Time="); LCD_Out(2,9,"min."); LCD_chr(2,6,t); delay_ms(3000); LCD_Cmd(_LCD_CLEAR); delay_ms(1000); LCD_Out(1,1,"Select Power"); LCD_Out(2,2,"ltlt"); LCD_Out(2,7,"mw"); LCD_Out(2,10,"gtgt"); delay_ms(3000); E: if (RD6_bit==1) { LCD_Out(2,5,"25"); } if(RD3_bit==1) { LCD_Out(2,5,"50"); } if(RD1_bit==1) { delay_ms(2000); LCD_Cmd(_LCD_CLEAR); delay_ms(1000); } else {delay_ms(200); goto E; } LCD_Out(1,1,"Power="); LCD_Out(1,10,"mw"); if (RD6_bit==1) { LCD_Out(1,7,"25"); } if(RD3_bit==1) { LCD_Out(1,7,"50"); } delay_ms(3000); LCD_Cmd(_LCD_CLEAR); delay_ms(1000); LCD_Out(1,1,"PRESS POWER TO START"); p: if(RD0_bit==1) { delay_ms(3000); LCD_Cmd(_LCD_CLEAR); delay_ms(1000); } else {delay_ms(200); goto p ; } LCD_Out(1,5,"LASER ON"); while(1); } the compiler warning IRP bit ...i need to know how to save user input in array using at89c51/52, i am using mikroc software for 8051. this is my code so far: please help me urgent Code: //numair registeration # is 782 //saeed registeration # is 287 //numair password ...
