We detect you are using an unsupported browser. For the best experience, please visit the site using Chrome, Firefox, Safari, or Edge. X
Maximize Your Experience: Reap the Personalized Advantages by Completing Your Profile to Its Fullest! Update Here
Stay in the loop with the latest from Microchip! Update your profile while you are at it. Update Here
Complete your profile to access more resources.Update Here!
Item Qty
Your cart is empty.

TB3284

Title
Title
Getting Started with GPIO on PIC18
Name
Name
TB3284
Date
Date
08/18/2020
Description
Description
An embedded system is capable of exchanging stimuli with the outside world using General-Purpose Input/Output (GPIO) ports. GPIO pins are clustered in PORTs and the PIC18 devices provide multiple PORT modules. This technical brief explains the concepts behind PORT modules and their functionality on the PIC18 family of microcontrollers by implementing the use cases presented below. • GPIO Read/Write Example: This example shows how to read an input pin value, changed by pressing a button, and how to set an output pin value in order to turn an LED on and off. • Using GPIO Interrupts: This example shows how to enable the Interrupt-on-Change (IOC). The IOC is configured to be triggered on the falling edge detected on the desired input pin. • Wake-Up from Sleep: This example shows how to reduce power consumption by enabling Sleep mode on the device and waking it up using the IOC, with a button controlling the input pin value.

Silicon Products