ts-7000
[Top] [All Lists]

[ts-7000] Re: Reading GPIO ports

To:
Subject: [ts-7000] Re: Reading GPIO ports
From: "airor35" <>
Date: Tue, 18 Jul 2006 21:17:20 -0000
--- In  Matt Godbolt <> wrote:
>
> Jim Jackson wrote:
> >
> >
> > Matt,
> >
> > Show us the code - or at least the code snippet.
> > Have you specified the port access pointer you are using as
> > "volatile"?
> >
> > Jim
> >
> 
> 
> Hi Jim,
> 
> The code really is pretty much the same as the button.c demo - and
> yes, it's volatile (I checked the disassembly too and that makes
> sense). I've attached the exact code (please excuse the mess in
> there, it's very much a 'hack it around til it works' prototype
> type thing.
> 
> Cheers,
> 
> Matt
> -==-
> 
> for (;;)
> {   
>    state = *PBDR;
>    while (state & 0x01) {
>       state = *PBDR;
>    }
>   
>       printf("yay\n"); 
> 
>    state = *PBDR;
>    while (!(state & 0x01)) {
>       state = *PBDR;
>    }
> 
>       printf("boo\n");
> }
> 

Your delay is unlikely the pins.  It's more likely to be the IO.
You might want to try to flush the io buffer after each printf:
"fflush(stdout);"








------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/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