Main Site Documentation

Question on outputcompare


#1

Can outputcompare generate 2 outputs:

Say I need a chan 1 signal going high followed 10 microseconds later by chan 2 signal (+/- 200ns) high, then the chan 2 falls 200 micorseconds later, then 10 us (+/–200ns) later chan 1 goes low, now both are low. So chan 1 is 20us wider & chan 2 is centered within.

Also, my understanding is interrupts couldn’t help this, since they don’t act too quickly for cobra


#2

You can implement this using tasks in RLP.


#3

Well, it appears anything can be done with RLP, but that appears to be a very complex programming journey. Or maybe it just seems so on the surface.

This should be fairly easy for a micro to generate, can it be done using the .netfm “tools”, like output compare, polling, timers, interrupts, etc. If it is a possiblity, that would be the preferable route.


#4

It is is simple but with tight timing you need this natively, either by adding a native function to teh core (very hard) or use tasks in RLP (relatively simple)

Of course this can be implemented for you through GHI consulting services. Contact GHI if interested.

This can’t be done from managed side, which is not real time.


#5

Hello

it appears anything can be done with RLP, but that appears to be a very complex programming
journey

I thought so, too – until I tried it.
RLP is much easier then I thought - at least if you already know programming in C.

You request a very high precision (+/- 200 ns)
I cannot guarantee if my code is that precise but what I saw on my oscilloscope was extremely stable (no jitter visible)
Simply check it out !

I wrote a RLP code to write data to multiple digital pins at the same time.
The time shift between two pins is 2 µs on FEZ domino.

You can download my RLP project with a C# demo project here:
http://www.tinyclr.com/forum/17/6104/#/1/msg58325

It writes up to 8 digital pins synchronously.
Very easy to use in C#.

So you must write a Byte Array full of zero’s and one’s and check if you get the precision you need.

Elmü