Group05_Lab06_Task1/Lab6_Task1.c

14 lines
335 B
C
Raw Normal View History

2024-09-19 22:33:22 +05:30
#include <stdint.h>
#include <stdbool.h>
#include "tm4c123gh6pm.h"
#define mask_bits 0x11 //mask bits for user switch
GPIO_PORTF_AFSEL_R |= 0x02;
GPIO_PORTF_PCTL_R |= 0x50;
PWM1_2_CTL_R= 0x00000000;
PWM1_2_GENB_R |= 0x80E;
PWM1_2_LOAD_R = 0xA0;
PWM1_2_CMPB_R = 0x50;
PWM1_2_CTL_R |=0x01;
PWM1_ENABLE_R |=(1<<5);