Starting from:

$29.99

EEE212 Lab 2-Even Solution


Part A
Write a program to accept an input string of 9 characters from the keypad and display them on the first row of the LCD screen based on the following table:
Input Displayed
0-9 0-9
A l
B o
C g
* (
# )

Part B [70 points]
Write a program to calculate the logarithm with base of 4 of an integer ranging in [0,150). For this purpose, as an example, we input log(120) which appears in the first row, and the result is displayed in the second row as 3.45 with 2 fractional digits displayed. The input will always have 8 characters, i.e. even if we input two digit or one digit numbers such as 53 or 4 they will be written as log(053) and log(004). You don’t have to consider invalid inputs that are not in the form of log(XXX).
Use the lookup table solution for this problem. The table for this question is provided to you on Moodle.

More products