GPIO in Cortex-M3 LPC1768 Microcontroller Tutorial

5. GPIO Interrupt

This GPIO interrupt is only available to PORT 0 & PORT 2 of LPC1768 Microcontroller.

  • Falling Edge Interrupt
    Register LPC_GPIOINT  –> IOxIntEnF is used to enable falling edge detected interrupt, in which ‘x’ is the group number, either 0 or 2. To turn on falling edge interrupt of pin,
    set the corresponding pin to ‘1’.
    To enable Pin 0.3 falling edge interrupt
    LPC_GPIOINT –> IO0IntEnF |= (1<<3);
  • Rising Edge Interrupt
    Register LPC_GPIOINT –> IOxIntEnR is used to enable rising edge detected interrupt. In which ‘x’ is the group number to turn on rising edge interrupt of a pins set the corresponding pin to ‘1’.
    To enable Pin 0.3 and 0.5 rising edge interrupt
    LPC_GPIOINT –> IO0IntEnR |= ((1<<3) | (1<<5));

All GPIO interrupt are connected to EINT3 interrupt source. You need to turn EINT3_IRQn ON in order to use GPIO interrupt. NVIC_EnableIRQ(EINT3_IRQn);

This is it !!! for this tutorial. I believe now you have good understanding about how to configure GPIO in Cortex-M3 LPC1768 Microcontroller. In next tutorial we’ll be dealing with some interesting projects to get more deeper understanding about GPIO. I hope you will find this tutorial educational and entertaining….Thank’s….!!!!

Get Free Courses & Webinars
You'll receive only high quality learning material, tips & tricks
I agree to have my personal information transfered to MailChimp ( more information )
We respect your privacy

About Umesh Lokhande

Umesh Lokhande holds a Master degree in Scientific Instrumentation from University of Applied Sciences Jena, Germany. and has previously worked at Orbotech, Alere Technologies etc. Umesh is also a founder and first author of BINARYUPDATES.COM


Register | Lost your password?