Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] Re: congratulations

2005-01-17 by Thomas Patrick

Hello guys, 
 
                    Thanks for the replies. Its actaually not so confusing. What I came to know is when you declare port pin as input then you can read the value of digital input on register IOPIN for that respective port pin. 
 
  if you declare port pin as output then you write on IOPIN register ..It generates 1's and 0's simulatenously. 
 
 cheers,
 
 Thomas  
 


Leighton Rowe <leightonsrowe@...> wrote:

Hey Thomas,

The lpc2129 User Manual contains all the info u need on GPIO 
manipulation. Just note the following whenever you're manipulating 
Port0.

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

- IO0CLR,IO0SET writes is the only way of changing output pin states. 
- Writing 1's to the bits of IO0SET will make the corresponding pins 
High. 
- Writing 1's to the bits of IO0CLR will make the corresponding pins 
Low.

So with the statements u have:
IO0SET = 0x0000 C700  
IO0CLR = 0x0000 3800 //theres no need for this. Also note that:

- Writing 0's to IO0CLR/IO0SET has no effect on Port0. 

Using the IO0CLR/IO0SET registers facilitates a more disciplined 
approach towards output control. 









---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/lpc2000/
  
   To unsubscribe from this group, send an email to:
lpc2000-unsubscribe@yahoogroups.com
  
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


		
---------------------------------
Do you Yahoo!?
 Yahoo! Mail - You care about security. So do we.

[Non-text portions of this message have been removed]

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.