Microprocessor Simulator 0 Help



Download 1.18 Mb.
Page27/82
Date18.03.2021
Size1.18 Mb.
#56105
1   ...   23   24   25   26   27   28   29   30   ...   82
sms32v50 (3)
sms32v50 (3), sms32v50 (6)

Procedures


Example - 06proc.asm

  1. Re-do the traffic lights program and use this procedure to set up realistic time delays. 02tlight.asm

  2. Re-do the text input and display program with procedures. Use one procedure to input the text and one to display it.


Text IO and Procedures


Example - 07textio.asm

  1. Write a program using three procedures. The first should read text from the keyboard and store it in RAM. The second should convert any upper case characters in the stored text to lower case. The third should display the text on the VDU screen.


Data Tables


Example - 08table.asm

  1. Improve the traffic lights data table so there is an overlap with both sets of lights on red.

  2. Use a data table to navigate the snake through the maze. This is on port 04. Send FF to the snake to reset it. Up, down left and right are controlled by the left four bits. The right four bits control the distance moved.

  3. Write a program to spin the stepper motor. Activate bits 1, 2, 4 and 8 in sequence to energise the electromagnets in turn. The motor can be half stepped by turning on pairs of magnets followed by a single magnet followed by a pair and so on.

  4. Use a data table to make the motor perform a complex sequence of forward and reverse moves. This is the type of control needed in robotic systems, printers and plotters. For this exercise, it does not matter exactly what the motor does.



Download 1.18 Mb.

Share with your friends:
1   ...   23   24   25   26   27   28   29   30   ...   82




The database is protected by copyright ©ininet.org 2024
send message

    Main page