Page 1 of 1

To interface fingerprint to PIC16F877A

Posted: Thu Nov 28, 2013 7:16 pm
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

Re: TO INTERFACE FINGERPRINT TO PIC16F877A

Posted: Thu Nov 28, 2013 7:49 pm
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

Re: TO INTERFACE FINGERPRINT TO PIC16F877A

Posted: Fri Nov 29, 2013 10:20 am
by kersing
(Removed duplicate posting and moved this message to the FC5 Free edition forum so the author can post in it.)

Re: TO INTERFACE FINGERPRINT TO PIC16F877A

Posted: Fri Nov 29, 2013 10:21 am
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

Re: TO INTERFACE FINGERPRINT TO PIC16F877A

Posted: Fri Nov 29, 2013 11:01 am
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.

Re: To interface fingerprint to PIC16F877A

Posted: Fri Nov 29, 2013 12:32 pm
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?

Re: To interface fingerprint to PIC16F877A

Posted: Fri Nov 29, 2013 4:02 pm
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
}

Re: To interface fingerprint to PIC16F877A

Posted: Fri Nov 29, 2013 5:27 pm
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.

Re: To interface fingerprint to PIC16F877A

Posted: Fri Nov 29, 2013 5:47 pm
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.