Lab 1: Create the Application

Step 5: With MHC, Configure GPIO Pins and Interrupts

1

Open the Pin Configuration pane by navigating to MHC > Tools > Pin Configuration.

Open the Pin Settings tab and look for pins #B37 to #B39.

Add a custom name and apply the following configuration for each pin:

  • B37: LED_RED
  • B38: LED_GREEN
  • B39: SWITCH1

Make sure to enable the change notification item for pin #B39 to enable the interrupt on this pin.

Set B39/RA10 as a digital input.

lab1_step5_01.png
Figure 1: Configure GPIO pins

2

Configure the Enhanced Vectored Interrupt Controller EVIC under MHC > Tools > EVIC Configuration.

lab1_step5_02a.png
Figure 2: Open EVIC Configuration

Enable interrupts for Vector Numbers:

  • 34 - USB (USB_1)
  • 41 - I2C1_BUS
  • 43 - I2C1_MASTER
  • 44 - CHANGE_NOTICE_A
lab1_step5_02b.png
Figure 3: Configure EVIC



Next Step >

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.