Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please also draw me a flowchart that matches the logic of the code to be written. Write a C code to have the display count
Please also draw me a flowchart that matches the logic of the code to be written. Write a code to have the display count up from with and on the board. xxFxDxxFxC b xE d xfint main
int i ;while SegDisplaych & xF; DelayMs;
void SegDisplayuintt d
seg SevenSeg;
void SetupGPIOvoid
Enable Clock to the GPIO Modules SYSCTLRCGCGPIO mathrmPORTs; allow time for clock to stabilize SYSCTLPRGPIO & PORTs Unlock GPIO only PD PF on TMCGGPIODCR PIN;GPIOFLOCK xCFB;GPIOFLOCK ; Set Port Control Register for each Port GPIOxPCTL PMCn PTCLPINn, check the
PCTL table
Set Alternate Function Select bits for each Port GPIOxAFSEL PINs; regular IO PCTL
peripheral
Set Output pins for each Port Direction of the Pins: GPIOxDIR PINs; input, output
Set PUR bits internal PullUp Resistor PDR PullDown Resistor ODR Open Drain for each
Port : disable, enable
Set Digital ENable register on all port.pins GPIOxDEN PINs; disable, enable Delay ms milliseconds MHz CPU Clock
void DelayMsint ms
for i; i
When the user presses RESET SW button, reset the counter value to zero and display
When the user presser COUNT SW button, increase the counter value by and displ the sevensegment display.
The counter only increases at the moment when the COUNT SW button is pressed.
For this we will be using the Tiva C Series TMCGXL board the pin configuration for the microcontroller is shown below. Please follow the Sourc Code format provided.
Source Code format to be followed.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started