Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Re: congratulations

2005-01-15 by Robert Adsett

At 03:07 PM 1/15/05 +0000, you wrote:
>- You 'only' can read current GPIO pin states by reading the IO0PIN
>register.
>
>Variable = IO0PIN;
>
>- The User Manual defines IO0PIN to be a read-only register.
>IO0PIN = 0x0000 C700; // invalid statement (according to IAR compiler)

Actually, the user manual appears to be of (at least) two minds about this 
point.  For instance in the 2106 users manual the following line appears in 
the description of IOPIN

"Note: for test purposes, writing to this register stores the value in the 
output register, bypassing the need to use both the IOSET and IOCLR registers"

As well other user manuals mention its use to set and clear bits 
simultaneously.

I suspect the two parts were written by different people and have not been 
properly reconciled.  More to the point I believe (but haven't verified) 
that IOPIN is in fact writeable.  Of course once you start using it in that 
fashion you have to protect it against access from multiple threads of 
control, provide shadows etc, it's sort of an all or nothing step.  You 
could, however do much faster simulation of something like an expansion bus.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.