--- 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/
|