Using the MSP430 Launchpad, design and implement a unit converter with the follo
ID: 2085951 • Letter: U
Question
Using the MSP430 Launchpad, design and implement a unit converter with the following operations: Temperature: °C °F Length: meters feet Length: miles feet Length: miles Kilometers Your converter must accept binary integers of up to six digits and produce either an eight-bit rounded binary output representing the converted value or an all-ones flashing output to indicate an overflow error. The user must be able to change conversion operations and input values while the system is running. Label your system inputs and outputs for easy reading.
Explanation / Answer
Celcius to fahrenheit
lcd.h
Meters to feet
function meters ToFeet ($meters, $echo = true)
{
$m = $meters;
$valInFeet = $m*3.2808399;
$valFeet = (int)$valInFeet;
$valInches = round(($valInFeet-$valFeet)*12);
$data = $valFeet."′".$valInches."″";
if($echo == true)
{
echo $data;
} else {
return $data;
}
}
?>
<?php
$feetInches = metersToFeetInches(1.75,false);
echo $feetInches;
?>
Miles to Feet
Function miles To Feet ($meters, $echo = true)
{
$m = $meters;
$valInmiles = $feet*5280;
$valMiles = (int)$valInFeet;
$valInches = round(($valInFeet-$valFeet)*12);
$data = $valFeet."′".$valInches."″";
if($echo == true)
{
echo $data;
} else {
return $data;
}
}
?>
<?php
$feetInches = milestofeet(1.75,false);
>?
Miles to Kilometer
Function miles To Feet ($meters, $echo = true)
{
$m = $meters;
$valInmiles = $kilometer* 1.609344;
$valMiles = (int)$valInkilometer;
$valInches = round(($valInFeet-$valFeet)*12);
$data = $valFeet."′".$valInches."″";
if($echo == true)
{
echo $data;
} else {
return $data;
}
}
?>
<?php
$feetInches = milestofeet(1.75,false);
>?
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.