🎁📬❄️📦 Holiday Shipping Deadlines are approaching! International customers and domestic ground - get your orders in 12/9/2020 📦❄️📬🎁
0

Precise and synchronized pulse-out on two pins.
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Precise and synchronized pulse-out on two pins.

by Shrediquette on Tue Nov 10, 2020 10:38 am

Hi,
I need to generate pulses on two pins (actually three pins, but it is easier to explain with two pins only). These pulses have a duration in the range of microseconds or milliseconds, and there must be low jitter (smaller than 100 nanoseconds). The signals on both pins need to be synchronized. I already managed to create such a system on an Atmel Xmega32u4 (8-bit µC with 32 MHz), using two 16-bit timers and BASCOM as programming language. But now, I would like to do this on e.g. an itsybitsy m4 express using circuitpython.
Do you think that this is possible in principle...? I didn't find suitable information yet, only modules like PWMout and PulseOut which do not seem to be suitable... The whole circuitpython approach does not seem to be made for things like this?
Thanks for your help!!

William
Schema.jpg
Pulse train on two pins
Schema.jpg (55.08 KiB) Viewed 49 times

Shrediquette
 
Posts: 1
Joined: Tue Nov 10, 2020 10:28 am

Re: Precise and synchronized pulse-out on two pins.

by tannewt on Tue Nov 10, 2020 2:35 pm

Hi Shrediquette, I think you'll need to dig into the C side of CircuitPython to add support for these pulses. What are you trying to control? We generally have APIs geared towards what functionality we want to enable. PWMOut is good for basic audio, dimming LEDs and servos. PulseOut is good for IR transmission.

tannewt
 
Posts: 1922
Joined: Thu Oct 06, 2016 8:48 pm

Please be positive and constructive with your questions and comments.