[Open_electroporator] culture shock ADC and DMA

Nathan McCorkle nmz787 at gmail.com
Mon Aug 27 17:46:45 UTC 2018

On Mon, Aug 27, 2018, 5:43 AM John Griessen <john at cibolo.com> wrote:

> On 08/27/2018 05:57 AM, Nathan McCorkle wrote:
> > I wonder what the pulse way past the tail is
> It's probably the stored energy of an odd pulse coming out.   I saw 6 of
> one, 5 of the other at times.  (push and pull pulses)

I am seeing absolutely no indication of non-determinism occuring, and in
this instance I did see an even number of pulses generated. I will confirm
there is no errant pulse further out.

> Some day I'll rework the use of timers so there is no interrupt happening,
> just timer hardware outs to other timer triggers
> and a push and pull coming out.  Then that sequence can be slaved off
> another timer edge and you could let it run and get exact
> pulse counts.

Isn't that exactly what we're already doing??

Then it would be possible to make any pulse recipe up to the speed limit of
> the transformer and doubler.
> A good use of interrupt service routines would be to tell when a timer
> sequence is done so you could start another one in a chain.

Yes this is exactly what's happening now. From what I can tell we're seeing
extra pulses because the micropython ISR takes longer than our pulse period
being commanded. Dhylands recommended for better performance taking the
entire ISR to C code and eliminate a bunch of latency associated with
switching from C to Python and back.

> to modify an already running pulse train, code can poll timer status and
> write changes to pulse widths only on even time slots,
> (just after a pull pulse), so all push and pull pulses stay equal time.

I maybe able to try this from the busy-wait loop I showed two emails ago.
Instead of checking the voltage I think we can check the n-pulse counter
register, or maybe another status bit. Looping means we don't incur any ISR
overhead, at the expense of possibly being unable to run other code. We'll
see how small of a loop is needed for bare minimum voltage clamping.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cibolo.us/pipermail/open_electroporator/attachments/20180827/4564dfda/attachment.html>

More information about the open_electroporator mailing list