Gpio Usage Notes; Table 70: Gpio Output Clear Register (Io0Clr - 0Xe002800C, Io1Clr - 0Xe002801C, Io2Clr - 0Xe002802C, Io3Clr - 0Xe002803C); Table 71: Gpio Direction Register (Io0Dir - 0Xe0028008, Io1Dir - 0Xe0028018, Io2Dir - 0Xe0028028, Io3Dir - 0Xe0028038) - Philips LPC2194 User Manual

Table of Contents

Advertisement

Philips Semiconductors
ARM-based Microcontroller
(IO0CLR - 0xE002800C, IO1CLR - 0xE002801C, IO2CLR - 0xE002802C, IO3CLR - 0xE002803C)
This register is used to produce a LOW level at port pins if they are configured as GPIO in an OUTPUT mode. Writing 1 produces
a LOW level at the corresponding port pins and clears the corresponding bits in the IOSET register. Writing 0 has no effect. If
any pin is configured as an input or a secondary function, writing to IOCLR has no effect.
Table 71: GPIO Output Clear Register (IO0CLR - 0xE002800C, IO1CLR - 0xE002801C, IO2CLR - 0xE002802C, IO3CLR -
0xE002803C)
IOCLR
Output value CLEAR bits. Bit 0 in IO0CLR corresponds to P0.0 ... Bit 31 in IO0CLR corresponds to
31:0
P0.31
GPIO Direction Register
(IO0DIR - 0xE0028008, IO1DIR - 0xE0028018, IO2DIR - 0xE0028028, IO3DIR - 0xE0028038)
This register is used to control the direction of the pins when they are configured as GPIO port pins. Direction bit for any pin must
be set according to the pin functionality.
Table 72: GPIO Direction Register (IO0DIR - 0xE0028008, IO1DIR - 0xE0028018, IO2DIR - 0xE0028028, IO3DIR -
0xE0028038)
IODIR
Direction control bits (0 = INPUT, 1 = OUTPUT). Bit 0 in IO0DIR controls P0.0 ... Bit 31 in IO0DIR
31:0
controls P0.31

GPIO USAGE NOTES

If for the specified output pin corresponding bit is set both in GPIO Output Set Register (IOnSET) and in GPIO Output Clear
Register (IOnCLR), observed pin will output level determined by the later write access of IOnSET nad IOnCLR. This means that
in case of sequence:
IO0SET = 0x0000 0080
IO0CLR = 0x0000 0080
pin P0.7 will have low output, since access to Clear register came after access to Set register.
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
GPIO
LPC2119/2129/2194/2292/2294
Description
Description
137
Preliminary User Manual
Value after
Reset
0
Value after
Reset
0
May 03, 2004

Advertisement

Table of Contents
loading

This manual is also suitable for:

Lpc2129Lpc2119Lpc2292Lpc2294

Table of Contents