Configuring GPIO Pins in TM4C123GH6PM( TIVA C-Series Launch Pad)
In the previous project we have learnt how to use code composer studio to build our project for TM4C123G series microcontrollers. Today we are going to see how to configure GPIO peripherals of this micro controller to use the pins as input and output. We will be using the on board RGB LEDS which are connected to PORTF pin1, pin2 & pin3 as outputs and SW1 & SW2 which are connected to PORTF pin0 and pin4 as inputs in TIVA C-Series Launch Pad. Create a new project in Code Composer Studio and open the "main.c" file in the project. The first step of any microcontroller programming is to configure and set the clock source for the CPU and for all the onboard peripherals. First we will be configuring the system clock as follows; SysCtlClockSet(SYSCTL_SYSDIV_2_5 | SYSCTL_USE_PLL | SYSCTL_XTAL_16MHZ | SYSCTL_OSC_MAIN ) In order for this API to work we ha...