EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / How to interface fingerprint module serially with AVR

How to interface fingerprint module serially with AVR

|

Microcontroller › AVR › How to interface fingerprint module serially with AVR

  • This topic has 14 replies, 13 voices, and was last updated 12 years, 4 months ago by Disha raka.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • March 2, 2011 at 7:10 pm #767
    usman
    Participant

    Hi

     I want to send a data package of 14 bytes serially from my atmega16L to finger print module R303A to perform commands.

    please help me if anyone has used any fingerprint module 

    March 3, 2011 at 4:43 pm #5655
    Bhaaskar
    Participant

    Put on array and send the data in array serially

     

    March 8, 2011 at 6:37 am #5668
    Amit Joshi
    Participant

     first find out the baud rate of the finger print module and set the USART baud rate accordingly.
    store the whole 14 byte data into array and transmit it using USART. try the following link to learn usart

    http://www.engineersgarage.com/embedded/avr-microcontroller-projects/usart-serial-transmission-circuit

    April 26, 2011 at 9:47 am #6035
    usman
    Participant

     

    Hi, this is what I m doing but unsuccessful…  :-(
     
    #define USART_BAUDRATE 57600
    #define F_CPU 8000000
    #define BAUD_PRESCALE (((F_CPU / (USART_BAUDRATE * 16))) – 1)
     
     
    //this is the packet i want to transmit. I have define the array as:
    char GenImg[12] = { 0xEF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x03, 0x01, 0x00, 0x05 };
     
     
    //I have called in the main these functions:
    usart_init();
    _delay_ms(500);
    _delay_ms(500);
    send_bytes(GenImg,12);
     
     
    //this function is for “initialization of usart”:
    void usart_init()
    {
     
    UCSRB |= (1 << RXEN) | (1 << TXEN);   // Turn on the transmission and reception circuitry
    UCSRC |= (1 << URSEL) | (1 << UCSZ0) | (1 << UCSZ1); 
    // Use 8-bit character sizes
    UCSRC &= ~(1 << UMSEL); // In UCSRC, UMSEL = 0 for asynchronous
    UCSRC &= ~(1<<USBS); //In UCSRC, USBS = 0 => 1 stop bit
     
    UBRRL = BAUD_PRESCALE; 
    // Load lower 8-bits of the baud rate value into the low byte of the UBRR register
    UBRRH = (BAUD_PRESCALE >> 8); // Load upper 8-bits of the baud rate value..
    // into the high byte of the UBRR register
    }
     
     
    //this is function for transmitting:
    void send_bytes(char *s, int length)
    {
    while (length–)
    {
    usart_transmit(*s);
    s++;
    }
    }
     
     
    void usart_transmit(unsigned char c)
    {
    while(!(UCSRA & (1 << UDRE))); // wait until UDR ready
    UDR = c; // send character
    }
     
     
    Please help me to correct any errors!
    April 26, 2011 at 1:23 pm #6037
    dagakshay
    Participant

    what are the error you getting when you debug it…

    June 8, 2011 at 1:30 am #6333
    dimas fahmigafur
    Participant

    how ready to work with AVR project with ingerprint????

    may i give an example please bro??

    December 12, 2011 at 9:32 am #6921
    sathya
    Participant

    Hi Can you please send the embedded c code (not vb) for finger print module r303a to my mail id : [email protected]

    Awaiting for your reply

    January 12, 2012 at 9:47 am #7020
    divya
    Participant

    In R303A module checksum = package id + package legnth + package content…..but the check sum size is two bytes do we need to neglect low byte overflow or high byte overflow..

     

    Thanks in advance..

     

     

    January 29, 2012 at 9:50 am #7087
    Sumit dubey
    Participant

    hey even m facing the same problem…….
    i hv some basic difficulties lyk…..how cn set the baud rate of finger print module…..
    what command sould i send to initialize finger print module…..
     

    i even tried to interface it direct to pc using RS232 cable with its defaul baud rate but it is not responding…!!!
    is there any command tht will confirm tht my finger print module is working fine….??

     

    it would be great if  i get some help related to this issue…..reply me plzzz

    March 14, 2012 at 5:44 pm #7302
    Abhishek jain
    Participant

    hi everyone, 

     

    can anyone please help me in sending commands to fingerprint module (r303) from at89c51 in c coding. if anyone can find then please reply or send me to my mail id i.e. [email protected]  

    March 31, 2012 at 7:40 am #7362
    pradeep v
    Participant

    Hi..

    can anyone send me the complete c-code for finger print module (R303A)? plz send it to [email protected]

    February 13, 2013 at 5:47 am #9125
    Rajdeep singh
    Participant

    Hello, I am also facing same problem, but when i am connecting fingerprint module with hyper terminal using MAX232 data receiving properly but when i am connecting fingerprint module with microcontroller, no data is receiving at the outupt,anybody help…

    February 17, 2013 at 10:19 am #9147
    AJISH ALFRED
    Participant

    Hi Rajdeep,

    Make sure that you are using MAX232 converter for connecting the module with the microcontroller and also check it properly for working. You can do loop back test with the MAX232 to ensure that it is working.

    February 27, 2013 at 6:52 pm #9194
    Disha raka
    Participant

    Dear all,

     

    here i m using R305 Finger print module with P89V51RD2

    but my program is not working please see my program n say me corrections,

    or give me your code please…

    its urgent friends…

     

     

    program:

     

     

    #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);
     
     
     
    for(i=0;i<strlen(mydata2);i++)   //  SCAN UR FINGER 1st
    lcddata(mydata2);
     
     
    msdelay(500); //
     
    lcdcmd(0x01);   //clr lcd
    lcdcmd(0x86);  //1st line
    for(i=0;i<strlen(mydata3);i++)  //SCANNING
         lcddata(mydata3);
     
     
    lcdcmd(0x06);
    for(k=0x94;k<0xA8;k++)
      {
    lcdcmd(k); //>>>>>>>>>>>>>>>>>>>>>>>>>
      for(i=0;i<strlen(mydata12);i++)
    lcddata(mydata12);
           }  
     
      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);
     
    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;
        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;
            
    }
      
    March 5, 2013 at 3:11 pm #9247
    Disha raka
    Participant

    hi all

    anyone please reply yaar… 

  • Author
    Posts
Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Simple LED Analog Clock Idea July 7, 2025
  • The Analog Gods Hate Me July 7, 2025
  • Wideband matching an electrically short bowtie antenna; 50 ohm, 434 MHz July 7, 2025
  • PIC KIT 3 not able to program dsPIC July 7, 2025
  • Parts required for a personal project July 6, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise