Hay I am new to LPC2114 microcontroller
In 8051 pins are bit addressable using sbit (Keil-C51) so I can declare input switch & out put LED as
Ex: sbit SWITCH P1^1 Ex: sbit LED P1^4
How to declare the input switch & out put LED in LPC2114 using Keil-ARM
Regards naresh
you can set direction and status of port as fallows for making Direction in or out u have to use IODIR register IODID = 0x000000FF; //dir of P0.0 to P0.7 output IOSET = 0x000000FF; // Make these port high IOCLR = 0x000000FF; // Make them low.
for better understading plz read usermanual of LPC 2214
Shyam
Set and reset a specific bit. Note that the register names are just from the previous post. You have to check the exact register names for the specific port in your user manual/datasheet.
IOSET = 1 << 4; IOCLR = 1 << 4;