« Return to Thread: Generate interrupt signal and measure latency

Re: Generate interrupt signal and measure latency

by Dave Hylands :: Rate this Message:

Reply to Author | View in Thread

Hi Peck,

> I'm hoping to use an external PIC microcontroller to generate a interrupt
> signal to control the sampling sequence of an ADC via the SPI bus on the
> Gumstix. I'm using the Connex 400xm-bt board.
>
>
>
> The interrupt signal from the PIC needs to precede the point in time that
> the ADC reading will be taken, since it will cause an interrupt in the
> Gumstix, and that interrupt, however high priority, will take time to
> service (stacking registers etc.) before the ADC can be told to read. In
> order to program the timing sequence correctly, I'll need to measure the
> time it takes for the interrupt signal to activate the ADC and read the
> sample on the Gumstix, thereafter estimate how far in advance of the time
> that it should read we need to output the signal from the PIC.
>
>
>
> Can I ask if anyone has tried doing something similar? I'll greatly
> appreciate if anyone can advise me on how should I go about simulating this
> interrupt signal (without having the PIC) using one of the GPIO lines from
> the gumstix and then measure the latency? I'm really sorry if this sound
> straightforward to some of you as I'm new to this sort of programming.

Sure, you can just connect 2 GPIOs on the gumstix together. Configure
one as input (which will eventually come from the PIC) and one as
output (which you can trigger from user space or however you feel
like).

You then need to have the interrupt handler, or wherever it is that
you'll be getting the sample from to toggle a third GPIO. You can then
measure (using an oscilloscope) the difference in time between the 2
GPIOs being changed.

Also keep in mind that the GPIO inputs must be at 3.3v. Many PICs run
at 5v, which is why I'm pointing this out.

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

 « Return to Thread: Generate interrupt signal and measure latency