Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Finger Print scanner interface

Status
Not open for further replies.

Deepesh Khaneja

Newbie level 6
Joined
Nov 10, 2013
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
123
I have purchased an R305 finger print scanner module and tried to interface with atmega16 serially but i didnt get any response from fingerprint scanner module .I have written a C code for testing my scanner which i will use in my future project.
Anybody has an experience of working with this kind of scanner pls reply then i will post my c code and tell me whats wrong.Finger print Scanner
 

Deepesh Khaneja

Newbie level 6
Joined
Nov 10, 2013
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
123
#include<avr/io.h>
#include<util/delay.h>
#include<stdio.h>

#define Baud_rate 57600
#define Xtal 16000000
#define Ubbr_value (Xtal/(16*Baud_rate))-1

void uart_init()
{
UCSRB|=(1<<TXEN)|(1<<RXEN);
UCSRC=0X00;
UCSRC|=(1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0);
UBRRL=Ubbr_value;
UBRRH=0X00;
}

void send_byte(char *str,unsigned int l)
{
unsigned int i=0;
while(l--)
{
while(!(UCSRA&(1<<UDRE))) led_blink();
UDR=*str;
str++;
if(l==1)
PORTA|=(1<<2);
}
}

void led_blink()
{
PORTA=0X01;
_delay_ms(100);
PORTA^=(1<<0);
_delay_ms(100);
}


int main()
{
unsigned char GenImg[]={0xEF,0x00,0xFF,0xFF,0xFF,0xFF,0x01,0x00,0x03,0x01,0x00,0x05};
int len=13;
DDRA=0XFF;
PORTA=0X00;
uart_init();
_delay_ms(500);
send_byte(&GenImg,len);
_delay_ms(500);
return 0;
}

- - - Updated - - -

hey jayanth have you got any solution to this code as it it compiles without error but after flashing the scanner doesnt respond..
Help me please
 

Deepesh Khaneja

Newbie level 6
Joined
Nov 10, 2013
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
123
AVR atmega16 .....trying to communicate with scanner serially by sending GenImg array commands for generating and storing image
 

Joined
Dec 4, 2012
Messages
4,294
Helped
822
Reputation
1,654
Reaction score
793
Trophy points
1,393
Location
Bangalore, India
Activity points
0
I don't use AVR. I use PIC. If you want help then mention which bit of which register is to be set or cleared to enable UART receive interrupt. I will write a code in mikroC PRO AVR for testing.
 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top