Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 2 Lnai 6322

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215882X, 978-3642158827

More Books

Students also viewed these Databases questions

Question

How would we like to see ourselves?

Answered: 1 week ago