Question: The functions described in the image have to be coded in C, and I am having some trouble with it since I have never coded


The functions described in the image have to be coded in C, and I am having some trouble with it since I have never coded in C before. Even pseudocode would be of great help, and I can figure something out from there. NOTE: Background information is provided in the images as well.
Introduction and Background Now it is time for you to do something. What I would like to do is use the lowest order four slide switches to control the hex character displayed on the seven segment display. For this we need some information . The slide switches are memory mapped to address 0xFF200040 (called SW_BASE in address map arm.h) The lower order four seven segment displays are mapped to address OxFF200020 (callecd HEX3 HEXO BASE in address map arm.h). The wiring of port I/O bits to segments in the seven segment display is as in the following diagram HEX HEXO1 HEX HEXD 3 5 6 EXO CycloneV 4 2 HEX Soc HEX06 3 DP 1) A function int ReadSwitches(void) that reads the slide switch bank and returns the current value, encoded as a binary number. 2) A function void DisplayHex int value) that shows the hex equivalent of value on the lowest-order seven segment display. The easiest way to do this is with a look-up table (array) of values corresponding to the LEDs you want to light up to show a specific value. For example, if you want to display "1", you want to turn on LED segments 1&2 in the picture. So your array would contain the following (among other things): lookUpTable [1]-0x06; 3) A main routine that blinks the lowest seven segment display ON and OFF. When ON, it should display the hex equivalent of the four-bit number encoded by the lowest four bits of the slide switch bank and this value should update as you change the switch positions. You can use the same delay loop from Part 1 to time the blinking
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
