ts-7000
[Top] [All Lists]

Re: [ts-7000] Reading GPIO ports

To:
Subject: Re: [ts-7000] Reading GPIO ports
From: Jim Jackson <>
Date: Thu, 13 Jul 2006 21:54:15 +0100 (BST)
Matt,

Show us the code - or at least the code snippet.
Have you specified the port access pointer you are using as "volatile"?

Jim

On Thu, 13 Jul 2006, Matt Godbolt wrote:

> Hi all,
>
> I'm quite likely making a very schoolboy error here, but I'm currently
> investigating getting an IR detector plugged into my ts-7250.  I have my
> external IR circuit all set up and (possibly) working...but I'm having
> difficulty in reading the output from my detector.  Upon further
> investigation I discovered I can only intermittantly read port B.
>
> My test setup is the button.c example code modified to
> printf("hello!\n"); instead of flash the LEDs, a wait for the logic
> level to return to 1, and with a for(;;) around the outside so I can
> continually monitor for bit 0 port B going low.  For input I've used a
> ribbon cable plugged onto the DIO port and I'm literally just holding
> pin 1 and pin 2 together manually.  The code runs, and correctly detects
> my wire tapping skills, but the reads seem to take /ages/ to notice my
> change.
>
> In fact, unless I hold the wires together for more than about a half
> second, bit 0 doesn't go low at all.  I've tried everything I can think
> of from the software point of view, but I'm now stumped.  I've disabled
> the debounce that the button.c sets up (though from reading the Cirrus
> docs this only affects the interrupt capabilities).  I've tried setting
> up interrupts and I've tried using the RAWINTSTSB port instead - all
> seem to suffer the same delayed fate.
>
> >From the point of view of reading the demodulated output from the IR
> detector I need to be able to make fairly fast readings of bit 0 to
> determine the pulse/gap ratios to find the actual bit stream of the
> remote controls I'm using...
>
> So my question really is; am I doing anything stupid here?  I'd have
> thought the GPIO inputs would be instantaneous.  I'm more of a software
> guy than a hardware guy, and so the only thing I can think of is that
> maybe if the GPIO memory is cached then I could be reading old data from
> the processor cache instead of the actual port...but then I'd imagine
> all the other peripherals would have the same problem (and the LCD
> sample works just fine).
>
> Any thoughts or hints gratefully received, I'm rather stumped at the moment!
>
> Thanks in advance,
>
> Matt
> -==-
>


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/CFFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU