Hello everyone,
I am working on a project for prepaid electricity billing system using gsm modem, this is the source code, but I don have the header files. Can anyone mail the appropriate header files for this source code.
I basically need lcd.h and gsm modem interfacing functions that has to be included. Please, its urgent ..
#include<reg51.h> #include"uart.h" #include"lcd.h" code char num[]="9916443994"; // BESCOM Phone Number unsigned char number[10]; static int total=0; sbit sensor=P2^7; // Metal Sensor Input sbit bulb=P0^0; // Bulb Output void delay() { unsigned int i; for(i=0;i<2500;i++); // Delay function } void delay1() { unsigned int i; for(i=0;i<35000;i++); // Delay function } void main() { unsigned char amt,q,y[3],i,temp,k; bulb=0; lcd_init(); display("Pre-Paid Electri"); // Display Function nextline(); display(" city Billing "); delay1(); delay1(); lcd_init(); display(" System Using "); nextline(); display(" GSM Mobile "); delay1(); delay1(); delay1(); lcd_init(); display("Project Done By"); nextline(); display(" Reshma "); delay1(); delay1(); lcd_init(); display(" Hemalatha "); nextline(); display(" Sheetal "); delay1(); delay1(); delay1(); serial_init(); transmit("at+cmgf=1"); // To make GSM in text mode delay(); transmit_byte(0x0d); // ASCII value of ENTER delay(); transmit_byte(0x0a); // ASCII value of NEW LINE or LINE FEED delay(); while(1) { lcd_init(); display("Waiting for"); nextline(); display(" Response "); transmit("at+cnmi=2,2,0,0,0"); delay(); transmit_byte(0x0d); // ASCII value of ENTER delay(); transmit_byte(0x0a); // ASCII value of NEW LINE or LINE FEED delay(); for(i=0;i<19;i++) { while(RI==0); //Junk DATA q=SBUF; RI=0; } for(i=0;i<10;i++) { while(RI==0); number[i]=SBUF; RI=0; } amt=receive_byte(); while(1) { while(RI==0); q=SBUF; RI=0; if(q=='$') { while(RI==0); amt=SBUF; RI=0; break; } } lcd_init(); k=0; for(i=0;i<10;i++) { if(number[k]!=num[i]) break; else k++; } if(k==10) { lcd_init(); display("Perfect Owner"); for(i=0;i<10;i++) lcd_delay(); nextline(); if(amt=='1') { total=total+100; display("Amt = Rs.100"); bulb=1; } else if(amt=='2') { total=total+200; display("Amt = Rs.200"); bulb=1; } else display("Amt is not valid"); }
Two alternatives.
Either you are using public code that is free to use for own projects. In that case, you should be able to find the header files at the same place you found the C files.
If, on the other hand, you are using non-free code, then it would be a violation to supply you with the header files.
The most interesting thing? You haven't told us where you got the files from, so you might possibly think that "lcd.h" is a magic file name and that any file with that name must be "the" file you need.
.