To interface fingerprint to PIC16F877A

Moderator: Benj

Locked
balajiemd
Posts: 3
Joined: Thu Nov 28, 2013 6:44 pm
Has thanked: 4 times
Contact:

To interface fingerprint to PIC16F877A

Post by balajiemd »

HELLO SIR
I AM going to interface fingerprint sensor to pic16f877a through rs232 .so accessing fingerprint module i have to send hex value like 0xef,0x01,etc,.for that i have to use number to hex inbuilt function in flowode 5,so i got correct answer and i store that value in string variable,so i send it (hex value) as string to max232 .but when i receive the value in pc hyper terminal nothing to be display but in simulation the value showed.my serial cable is good because simply i have to send"ok" string and check it .it display in hyper terminal.so please any to help me .......thank you

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: TO INTERFACE FINGERPRINT TO PIC16F877A

Post by medelec35 »

Hi balajiemd,
Tips & Tricks section is for people who start the subject off with a tip or trick, and not by asking for help.

If your using RS232 with flowcode, then to get any help you must post in the V5 section. to do that you must be registered for V5 forum and using a professional licence.
Can please register by following the link below:
http://www.matrixmultimedia.com/mmforum ... =46&t=9958

I have moved your post to he correct section

Martin
Martin

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: TO INTERFACE FINGERPRINT TO PIC16F877A

Post by kersing »

(Removed duplicate posting and moved this message to the FC5 Free edition forum so the author can post in it.)
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: TO INTERFACE FINGERPRINT TO PIC16F877A

Post by JonnyW »

Hello.

I would try sending the string "0x41" and see what comes out. When converting between strings and values, just so there is no confusion I would send printable character codes to be sure.

Are you sending "OK" and "0xef" using exactly the same Flowcode calls? Can you write "OK" into the string storing "0xEF" and see the output?

Jonny

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: TO INTERFACE FINGERPRINT TO PIC16F877A

Post by DavidA »

Hello,

Please do not post all capital titles, and please can you follow Martins post for upgrading your account if you want help for a "professional only" component in Flowcode, RS232 is not available in the free version of Flowcode.

balajiemd
Posts: 3
Joined: Thu Nov 28, 2013 6:44 pm
Has thanked: 4 times
Contact:

Re: To interface fingerprint to PIC16F877A

Post by balajiemd »

thank you for your answer,JonnyW .
i agree the hex value printed correctly but the problem is that "0xfe" is string so the last char was null.i want to send entire value in terms of char.because in my project i want to send set of packet like(unsigned char a[12] = {0xef,0x01,0xff,0xff,0xff,0xff,0x01,0X00,0x03,0x01,0X00,0x05};).,this is c code, so i am using pointer and access the hex value in char variable and send to buffer .but in flowcode what type of method i have to use?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: To interface fingerprint to PIC16F877A

Post by Benj »

Hello,

You can either create a Byte array or use a string. Create a byte array by adding [12] to the end of the variable name.

You can then assign values to the array/string by using the following syntax in a calculation icon.

a[0] = 0xef
a[1] = 0x01
...
a[11] = 0x05

You can then send the string directly using the sendstring macro (if you have the value 0x00 anywhere in the string then this will act as a null terminator and cause problems) or you can create a loop with an index that is incremented and send the array a byte at a time as shown below (this will work fine with 0x00 values).

index = 0
while index < 12
{
sendbyte (a[index])
index = index + 1
}

balajiemd
Posts: 3
Joined: Thu Nov 28, 2013 6:44 pm
Has thanked: 4 times
Contact:

Re: To interface fingerprint to PIC16F877A

Post by balajiemd »

thanks for your help,
I clearly understood the way you asked me to send the byte, yet I am not clear how to create the macro for " sendbyte (a[index]) "
I will try and come back to you,Sir.
Once again thanks a lot.

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: To interface fingerprint to PIC16F877A

Post by DavidA »

topic locked, if you do create another topic on RS232 please do so in the v5 Professional forum.

To upgrade your account please click here:

http://www.matrixmultimedia.com/forum_upgrades.php

If you continue to post about professional only components v5 outside the appropriate v5 forums i may have to warn or ban your account.

Locked