1 / 7

The Simulator project

The Simulator project. Assignment 1. Create a subroutine for delay between the individual diplays in the assignment. Use a BSR instruction for this . First, attach a 7-segment display to Port B

micheal
Download Presentation

The Simulator project

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Simulator project

  2. Assignment 1 • Create a subroutine for delay between the individual diplays in the assignment. Use a BSR instruction for this. • First, attach a 7-segment display to Port B • Then write code to light up each of the individual segments of the display with a delay between each. • Then write code to activate the segments such that the display shows 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 in order with a delay between the display of each digit.

  3. Detail on the use of BSR • BSR stands for Branch to Subroutine • All that is stacked on a BSR is the Program Counter. If you want to save any other register, you need to do it. • Convention is to stack (and then restore before return) any registers that your routine uses. • The return to the calling program is achieved by a RTS instruction.

  4. Assignment 2 • Add a 2nd display on Port C and be able to output the most-significant-nibble of what is in accumulator A to this. • For this you will have a couple levels of subroutines.

  5. The subroutines • The program flow using subroutines.

  6. Assignment 2 • Add the second 7-Segment Display for the MSB. • The intent is to display the contents in the A accumulator (BCD) on the display. • In assignment 2 you set up the subroutines to display the digits on the respective display.

  7. Assignment 2 structure • The subroutine calling structure of 2

More Related