Professional Documents
Culture Documents
ARM Processor
ARM Processor
IOPIN: The current state of the GPIO configured port pins can always be read
from this register, regardless of pin direction. THEY are
IO0PIN(PORT0) &
IO1PIN(PORT1)
IODIR: GPIO Port Direction control register. This register individually controls the
direction of each port pin.
IO0DIR(PORT0) &
IO1DIR(PORT1)
Coding
/*HERE IS THE CODE FOR LED-BLINKING*/
int main()
{
PINSEL2 = 0x00000000; // Define port lines as GPIO
tled = 0x00FF0000; // Define P1.16 – P1.23 as O/P
led = 0x00000000; // Define P1.16 – P1.23 as zero
while(1) // Loop forever
{
led = 0x00FF0000; // Turn ON P1.16 – P1.23
delay(2000);
led = 0x00000000; // Turn OFF P1.16 – P1.23
delay(2000);
}
return 0;
}
43
LCD Interfacing (Command Words)
LCD Interfacing (Command Words)
Display
On/off
control
LCD Interfacing
ARM Programming for LCD Interface
https://www.electronicwings.com/arm7/lcd-
16x2-interfacing-with-lpc2148-4-bit-mode