r305 interface with pic microcontroller c code
#1

please its urrrrrrgent send th e code of pic microcontroller18f4550 with R305.
Reply
#2

r305 interface with pic microcontroller c code

#include<reg51.h>
#include<string.h>

sfr ldata=0x90;
sbit rs=P2^3;
sbit rw=P2^4;
sbit en=P2^5;
sbit busy=P1^7;
sbit S1=P3^2;
sbit S2=P3^3;
sbit S3=P3^4;
//====================================================================//
void fingerprint(void);
void UARTSendByte(unsigned char[],unsigned char dt );
unsigned char UARTGetByte(void);
void fingerdata(char);
void conv();
void elect();
void lcdcmd(unsigned char);
void lcddata(unsigned char);
void lcdready();
void msdelay(unsigned int);
void UARTInit(void);

//===============================================================================//
unsigned int i,j,g,h,k,l,key,m,n;

code unsigned char mydata1[]=("WELCOME"); //7
code unsigned char mydata2[]=("SCAN UR FINGER 1st"); // 18
code unsigned char mydata3[]=("SCANNING"); //9
code unsigned char mydata4[]=("ACCESS GRANTED"); //14
code unsigned char mydata5[]=("ACCESS DENIED"); //13

code unsigned char mydata8[]=("THANKS"); //6

code unsigned char mydata12[]=(">");
code unsigned char mydata11[]=("<<");
unsigned char dec1,dec2,asc1,asc2,adc1;




//================================================================================//


code char GenImg[12] = { 0xEF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x03, 0x01, 0x00, 0x05 };

//===================================================================================//
void conv()
{
dec1=adc1%10;

dec2=adc1/10;

asc1=dec1 | 0x30;

asc2=dec2 | 0x30;
}


//==========================================================================================//
void main()
{

lcdcmd (0x38); //8 bit LCD mode
lcdcmd(0x0C); //
lcdcmd(0x01); // clear lcd
lcdcmd(0x06); // lcd on pointer off


do //LOOP START
{
lcdcmd(0x01); // clear lcd
lcdcmd(0x86); //1st line
for(i=0;i<strlen(mydata1);i++) //WELCOME
lcddata(mydata1[i]);



for(i=0;i<strlen(mydata2);i++) // SCAN UR FINGER 1st
lcddata(mydata2[i]);


msdelay(500); //

lcdcmd(0x01); //clr lcd
lcdcmd(0x86); //1st line
for(i=0;i<strlen(mydata3);i++) //SCANNING
lcddata(mydata3[i]);


lcdcmd(0x06);
for(k=0x94;k<0xA8;k++)
{
lcdcmd(k); //>>>>>>>>>>>>>>>>>>>>>>>>>
for(i=0;i<strlen(mydata12);i++)
lcddata(mydata12[i]);
}

UARTInit();
UARTSendByte(GenImg,12);
UARTGetByte();
fingerdata(i);



msdelay(500);

lcdcmd(0x01);
lcdcmd(0x9b); //3rd line
for(i=0;i<strlen(mydata8);i++) //THANKS
lcddata(mydata8[i]);

msdelay(10);
lcdcmd(0xc5);



}


}while(1); //repeat forever



} //main end
















void UARTSendByte(unsigned char GenImg[],unsigned char dt)
{

for(i=0;i<dt;i++)
{
TI=0;
SBUF = GenImg[i];
while(TI==0);
TI=0;


}
}

//
unsigned char UARTGetByte(void)
{ RI=0;
while(RI==0);
RI=0;
return SBUF;
}


void fingerdata(char i)
{
i=SBUF;
adc1=i;
conv();
lcddata(asc2);
lcddata(asc1);

}



//=======================================================================//
void lcdcmd (unsigned char value)
{
lcdready();
ldata=value;
rs=0;
rw=0;
en=1;
msdelay(1);
en=0;
return;
}
//=====================================================================================================//
void lcddata (unsigned char value)
{
lcdready();
ldata=value;
rs=1;
rw=0;
en=1;
msdelay(1);
en=0;
return;
}
//=====================================================================================================//
void lcdready()
{
busy=1;
rs=0;
rw=1;
while (busy==1)
{
en=0;
msdelay(1);
en=1;
}
return;
}
//===========================================================================================================//
void msdelay(unsigned int value)
{
unsigned int i,j;
for(i=0;i<value;i++)
for(j=0;j<1275;j++) ;
}

//=====================================================================================//
void UARTInit(void)
{
PCON=0X80;
SCON=0X50; //232 COM init
TMOD=0x20;
TH1=0XFE;
TR1=1;

}
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: sim900 interface c code, 4033 decade counters interface with pic microcontroller pdf, gsm module interface with pic microcontroller dubai, zero crossing interface to pic, interface pic microcontroller with ldr, c code to interface 8051and mq6, r305 interface with pic microcontroller c code,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  block diagram of electronic cough monitor based on microcontroller 3 1,141 21-07-2016, 12:03 PM
Last Post: visalakshik
  abstract for speaking microcontroller for deaf and dumb pdf 2 966 14-07-2016, 12:00 PM
Last Post: jaseela123d
  microcontroller theory and applications by ajay deshmukh pdf 1 959 23-06-2016, 01:16 PM
Last Post: dhanabhagya
Tongue quadcopter using 8051 microcontroller 1 858 22-06-2016, 04:18 PM
Last Post: seminar report asees
  digital voltmeter using 8051 microcontroller ppt 1 667 22-06-2016, 01:12 PM
Last Post: seminar report asees
Thumbs Up rupayan amar ujala in how to upload pic for cover page 1 599 18-06-2016, 11:42 AM
Last Post: dhanabhagya
  power factor correction using 8051 microcontroller wiki mani859 1 548 15-06-2016, 04:04 PM
Last Post: dhanabhagya
  how to interface lm35 with fpga code in verilog 1 1,074 11-06-2016, 04:04 PM
Last Post: dhanabhagya
  digital voltmeter using 8051 microcontroller ppt 1 586 08-06-2016, 04:17 PM
Last Post: dhanabhagya
  automatic brake failure indicator using microcontroller 1 773 08-06-2016, 03:27 PM
Last Post: dhanabhagya

Forum Jump: