Hello guys,
I congratulate all members of this group for being so actively participating and keeping this group so alive. I have found the discusions and topics discuss are interesting. As a new member, I hope I will too contribute to this group.
For my next project I choosed lpc2129. I read the user manual and would like to discuss a small doubt.
GPIO Pin Value Register IOPIN
This register provides the value of the GPIO pins. Register�s value reflects any outside world influence on the GPIO configured.
example:
IOSET0 = 0x00000050; /* Declare P0.4 & P0.6 as output ports*/
Unsigned int value; /* Declare Variable of type Int */
IOPIN0 = 0x00000020; /* Reflects changes on P0.5 Port */
value = IOPIN0; /* reads the digital input value on P0.5*/
The above program reads the digital input at port P0.5 and holds the value in integer variable value.
In Data sheet it is given as
Applications that require instanatneous appearance of zeros and ones on the respected parallel port can use direct access to
port�s corresponding GPIO Pin Value Register (IOPIN).
Assuming that pins P0.8 to P0.15 are configured as output, write to IO0PIN:
IO0PIN = 0x0000 C700
will produce the same output as following sequence of writes:
IO0SET = 0x0000 C700
IO0CLR = 0x0000 3800
if I go by above statements and declare IOPIN0 = 0x00000020 gives IOSET0 = 0x00000020 and IOCLR0 = 0x000000D0 which clears my P0.4 and P0.6, which I declare them as outport ports to generate 1.
This will not serve my purpose .....then how can I access the digital input value on P0.5 ???
I hope guys in this group have answers.
greetings,
Thomas
pins only.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
[Non-text portions of this message have been removed]Message
congratulations
2005-01-15 by Thomas Patrick
Attachments
- No local attachments were found for this message.