Propeller and HID ProxPoint Plus
venturaa
Posts: 1
in Propeller 1
I'll admit it off the bat I am new to the propeller. I am trying to read the card number with the Propeller and I have been unsuccessful. I have it working with an Arduino Micro but wanted to try it with the propeller. I basically have to read when D0 and D1 on the reader go low. I have the D0 connected to the propeller with a 4.3k resistor, as it is 5v from the reader, to pin 39 and D1 with a 4.3k resistor to pin 40. Below is a snippet of code for testing if anyone can assist it will be greatly appreciated.
#include "simpletools.h"
void testReader (void)
{
high(39); //set pin to high had to do it on the Arduino tried it both ways with propeller no different.
high(40); // same as above
int read0; // input of pin 39 saved here
int read1; // input of pin 40 saved here
while(1) // none stop loop
{
read0 = input(39); // read pin 39
read1 = input(40); // read pin 40
print("read0 = %d\n", read0); // print to console value of pin 39
print("read1 = %d\n", read1); // print to console value of pin 40
}
output on console is 0 for both even if I swipe a card on the reader. I've never asked for help on a forum before please let me know if I didn't provide enough info.
Thank you,
Anthony
#include "simpletools.h"
void testReader (void)
{
high(39); //set pin to high had to do it on the Arduino tried it both ways with propeller no different.
high(40); // same as above
int read0; // input of pin 39 saved here
int read1; // input of pin 40 saved here
while(1) // none stop loop
{
read0 = input(39); // read pin 39
read1 = input(40); // read pin 40
print("read0 = %d\n", read0); // print to console value of pin 39
print("read1 = %d\n", read1); // print to console value of pin 40
}
output on console is 0 for both even if I swipe a card on the reader. I've never asked for help on a forum before please let me know if I didn't provide enough info.
Thank you,
Anthony
Comments
Based on the D0/D1 comment, I assume this is using the Wiegand interface. If so, then you shouldn't need to drive the pins high, as the card reader should already be doing that. Just keep the pins direction as input (the default).
BTW, bits 30/31 are used for serial data to program the chip so best to avoid them. Avoid 28/29 as well. They connect to the eeprom.
P0 = 0
P1 = 1
etc.
P31 = 31
That matches the prop documentation.
Even better to use the pin function:
HID-D0 = 0
HID-D1 = 1
Thanks, kwinn, I'll give it a try and post back to tell how it goes.