Writing monorail emulator in assembly programming language

Assignment Help Assembly Language
Reference no: EM131679725

Project: A Monorail Emulator

In this project, you will be writing a monorail emulator in AVR assembly programming language running on the AVR board.

On X Island, there is a monorail. The monorail route is a circle with n stations as shown in Figure 1. Each station has a different name. The monorail starts at Station 1, circling around Station 2, ..., Station n, and Station 1. The monorail stops at a station only if a tourist on the monorail wants to get off or a tourist at the station wants to get on the monorail. The monorail travels at a constant speed. Therefore, it takes a fixed amount of time from one station to the next station if it does not stop between the two stations. Nevertheless, sometimes, it may stop half way between two adjacent stations for some reasons. When the monorail stops at any station, it will stop m second, where m is a parameter.

757_figure.png

Your monorail emulator is required to have two components: system configuration and monorail emulation. The system configuration component is used to configure a target monorail system. The target monorail system has the following parameters:

1. The number of stations. The maximum number of stations is 10.

2. The names of all stations. A station name is a string of capital letters and white space, starting with a capital letter. The maximum number of characters of any name is 10.

3. The time for the monorail to travel from one station to the next station without stopping. The longest time is 10 seconds.

4. The stop time of the monorail at any station. The minimum stop time is 2 seconds and the maximum stop time is 5 second.

The system configuration component should provide an interface for the user to input the above parameters in order to configure the target monorail system.

A sample interface by means of the LCD and keypad is shown as follows.

Your interface needs to provide the following:

a. A way of generating all the capital letters from A to Z, and the white space character.

b. A special key to indicate the end of each input.

c. Proper handling of wrong inputs.

After the system configuration is complete, the emulation component starts emulating the monorail. The emulation component needs to meet the following requirements.

  • Use the DC motor on the board to emulate the behaviour of the monorail. If the monorail is travelling, the motor spins at a speed of 60 rps. If the monorail stops, the motor stops.
  • Use PB0 and PB1 to simulate if a tourist wants to get off and a tourist wants to get on, respectively, at the next station. If PB0 is pressed, it indicates that a tourist wants to get off at the next station. If PB1 is pressed, it indicates that a tourist wants to get on at the next station.
  • Use the key # to simulate if the monorail stops half way between two stations. If the key # is pressed, the moving monorail will stop immediately. If the key # is pressed again, the monorail will continue to travel.
  • The LCD will always display the name of the next station. Whenever the monorail stops, 2 LEDs blink at a frequency of 3 Hz (3 blinks per second). When the monorail is travelling, the 2 LEDs switch off.

Attachment:- Assignment File.rar

Reference no: EM131679725

Questions Cloud

Develop a strategy and an organized method : Nevertheless, the effort is well worth receiving government grants for human services programs that might otherwise go unfunded.
A non-smoker woman with a low blood ldl : A non-smoker woman with a low blood LDL has a body mass index of 32.0 and her waist circumference is 36.0 inches
Find number of calls that come into small mail-order company : The number of calls that come into a small mail-order company follows a Poisson distribution. Currently, these calls are serviced by a single operator.
What are the pros and cons of this source of energy : What are the pros and cons of this source of energy, some argument that you found on the internet
Writing monorail emulator in assembly programming language : COMP2121 Project: A Monorail Emulator. You will be writing a monorail emulator in AVR assembly programming language running on the AVR board
Addresses high cholesterol : Therapeutic Lifestyle Changes, or "TLC" diet, addresses high cholesterol. (Check out the "Optional Learning Activities" area below to learn more about DASH
Identify ecosystem services of biodiversity : Identify ecosystem services of biodiversity. How is human overpopulation related to the sixth mass extinction? Write the formula for the population growth rate.
Discuss the urbanization of chicago : The Topic is The Urbanization of Chicago here are the requirements
How much should player a be paid if wins the game : Many of you probably played the game "Rock, Paper, Scissors" as a child. Consider the following variation of that game.

Reviews

len1679725

10/14/2017 3:06:47 AM

You are required to work in a group of two students. If you cannot find a project mate, contact the course admin. Submission information - The following items should be submitted: Source code. Your program should be well commented. User manual. The user manual describes how a user uses your emulator, including how to wire up the AVR board. Design manual. The design manual describes how you design the monorail emulator. It must contain the following components. System control flow, describing the control flow of the emulator at the module level using a diagram. This also shows how and when you service the inputs. Data Structures, describing the main data structures used in the system. Algorithms, describing how your emulator emulates the behaviour of the monorail.

len1679725

10/14/2017 3:06:42 AM

Module specification, describing the functions, the input and the output of each module. Overall, anyone with knowledge about this subject and the AVR board should understand how your emulator is designed after reading this design manual. This assignment is worth 15% of your course marks and will be marked under the following criteria: Implementation (80%): Adherence to the specification. Correct implementation of all the functionality. Code Style (5%): Easy to read. Well documented. User Manual (5%) Accurately describes the board set-up. Correctly describes how each character used in the emulator is generated. Correctly describes the functions of all subroutine, macros, and interrupt handlers. The breakdown of the full raw marks: System Configuration: 45 marks - Correctly generating all the station names: 40 marks and 8 marks for each name. Properly handling wrong input of names: 5 mark.

Write a Review

Assembly Language Questions & Answers

  What is the hallmark of an assembly language

What is the hallmark of an assembly language? Distinguish between an assembler and a compiler. Distinguish between a compiler and an interpreter.

  Problems does an assembler have to overcome

What problems does an assembler have to overcome in order to produce complete binary code with only one pass over the source code? How would code written for a one-pass assembler be different from code written for a two-pass assembler?

  Implement each menu-option in a separate function

Implement each menu-option in a separate function and write a program for integer multiplication and division operations - Recode all functions utilizing the Stack Frame method

  Implement a simple 32 bit calculator program

Operand A  and  Operand B  have to be  signed  32 bit integers. So an operand can be a negative number. For example, if you input is (-1 + 3), it should return 2. Operator  must be one of the characters(' + ', ' - ', ' * ', ' / ', ' % ')

  Create a procedure named validatepin that receives a pointer

Create a procedure named ValidatePIN that receives a pointer to an array of bytes containing a 5-digit PIN from your main proc. You are required to use the four byte arrays samplePin_1, samplePin_2,samplePin_3 and samplePin_4 declared below.

  A basic home security system in assembly for an 8051

A basic home security system in assembly for an 8051. needs to have keypad for code and 3 sensors with a panic button.

  Program that requests n as input

Write a program that requests N as input and computes the left-hand and the right-hand sides of the equation, verifies that they are equal, and displays the result.

  Write a single arm assembly language instruction equivalent

Write a single ARM assembly language instruction equivalent to a function that takes in three strings and checks if any are a substring to one another, if so return 1, if not return 0.

  Write an lc-3 assembly language program

Write an Lc-3 assembly language program to read in a sequence of single-digit positive integers from the keyboard(one integer per line) until the sentinel value of 0 is reached and then display the largest integer on the screen

  Write a constant declaration named arraysize

Given the following array definition, write a constant declaration named ArraySize that automatically calculates the size in bytes, of the array

  Carefully comment each line of the assembly program

The assembly language code segment below is to be inserted into the main.asm file that takes an input controlled by a potentionmeter, converts that input to a digital value, and displays that value on the LEDs according to the following

  Write two arm assembly language subroutines

Write two ARM assembly language subroutines, called output_char and read_char.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd