Page 1 of 1
Output pulse on GPio
Posted:
Sun Jan 15, 2017 2:34 am
by Hooter
Folks I wish to output a series of 50 microsecond pulses from two GPIO outputs.
This is to emulate the Wiegand output from a card reader.
I have this working perfectly on a microcontroller but wish to do it on an ESP8266 in ESP Basic.
Where can I insert the time value in the PO command?
Any assistance is appreciated.
Re: Output pulse on GPio
Posted:
Sun Jan 22, 2017 9:01 am
by Electroguard
Hi, normaly the DELAY millis command would be used, but it's in milliseconds so not fast enough for your purposes, and the fact that nobody else has replied suggests that there's no way to do it.
However, looking at the problem sideways, perhaps it's possible to define a softserial or SPI clock to run fast enough, and define an interrupt on it that could count pulses to be used for triggering an appropriate mark/space PO pulse train on another pin.
Re: Output pulse on GPio
Posted:
Sun Jan 22, 2017 11:47 am
by Mmiscool
I have found a Wiegand library for arduino. It might be possible to just ad it in to the interperter by wrapping the functions. Last time i use an hid chip reader was with an arduino and used serial to connect it to the esp. The hid reader i was using had 12v power requirments and i did not know if the pins could be connected to an esp with out toasting it.
Re: Output pulse on GPio
Posted:
Sun Jan 22, 2017 2:45 pm
by martinayotte
Most of Wiegand readers are 12V, but D0/D1 lines are 0-5V, you will probably still need MOSFET level-shifters, or voltage-dividers to connect to ESP 3.3V