QuestionQuestion

Course Project Assignment
You will design, write, and then assemble the program to solve the problem listed below. You will write and assemble the program using the AsmIDE software.
What to turn in:
• Problem
Write a program to control a sump pump. A sump well collects water runoff. The sump pump pumps out the well whenever it fills up. When the level rises to a high limit, the pump turns on. It stays on until the level drops to a low limit. Then the pump shuts off. It does not turn on again until the well fills up to the high limit. Data is stored in the following three addresses:
Addres      Data
$2100       High Limit
$2101       Low Limit
DIP_SW   Level Reading (SW_PORT)
Port B       Pump Control (LED_PORT)
• The level has a range of $00 to $FF, representing empty to full. You can set the low and high limits to values within the range (e.g.,$10 and $F0, you can use "mm" command to set these values or use assembly program to initialize the values). Sending a value of $FF to LEDs turns on the pump. Sending a value of $00 turns it off. You can test your program operation by changing the DIP switch and see the LEDs turn on and off based on the switch value (water level).

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

;
;    Program Sump pump
;    DIP switches on port H - tank level
;    LEDs on port B - pump on/off
;    High Limit at address $2100
;    Low limit at address $2101
      
;
#include       reg9s12.h
STACK: equ    $2200
FIL:    equ    0
EMPTY: equ...
$25.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Assembly Language Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats