Question: Lab 2 . GPIO on the TM 4 C 1 2 3 : Sequence - based Output Colors Using Arm Assembly Language ; Test 1
Lab GPIO on the TMC: Sequencebased Output Colors
Using Arm Assembly Language
; Test
redPattern EQU
bluePattern EQU
greenPattern EQU
; Test
;redPattern EQU
;bluePattern EQU
;greenPattern EQU
; Test
;redPattern EQU
;bluePattern EQU
;greenPattern EQU
Purpose
The general purpose of this laboratory is to familiarize you further with the software development steps using the uVision simulator. You will learn how to perform digital inputoutput on parallel ports of the TMC Software skills you will learn include shifting and rotation of registers.
You are NOT allowed to use conditional branches in your solution.
The ONLY instructions that you are allowed to use in your solution are:
Rotates
Shifts
Moves
Unconditional Branches including BL
You are also allowed to call the two subroutines provided setData & waitms No other instructions or subroutines are allowed.
In addition, your program not including comments, directives, and subroutines must be lines of code or less.
Instructions
Use the starter project provided to you. Submit the project folder to in ONE zip file and the lab report as a separate PDF file.
Overview
The objective of this system is to make the LEDs on the LaunchPad blink in a very specific order. You will be given some test patters to try out. Each test pattern has parts: the red pattern, blue pattern, and the green pattern. The pattern begins in bit and ends in bit However, your program will repeat each bit sequence indefinitely.
For instance, if the patterns were given as follows:
redPattern EQU
bluePattern EQU
greenPattern EQU
then the first action is that the LaunchPad would turn all LEDs RBG on for ms because bit of each pattern is The second action is to turn the LEDs off for ms because bit of each pattern is low.
If the pattern were instead as follows:
redPattern EQU
bluePattern EQU
greenPattern EQU
then only the red LED would flash because the blue and green patterns are always
The last bits to be output are bits of each pattern. Then the whole sequence begins again. Note that the patterns can be any combination of s and s for each color.
You will be using one of the IO ports on the TMcPort F PF Port F has bits that are hardwired on LaunchPad to the LEDs. The outputs are in positive logic:
outputting a will turn on the LED,
outputting a will turn off the LED.
Below is the mapping of the IO pins on Port F that are hardwired to the LEDs.
Bit is an output connected to the Red LED
Bit is an output connected to the Blue LED
Bit is an output connected to the Green LED
You are given two subroutines in the starter project to use as needed:
setData This subroutine outputs the data bits to the microcontroller IO pins. You must ensure that the value that you want to send to the red LED is in bit the value that you want to send to the blue LED is in bit and the value that you want to send to the green LED is in bit All other bit values will be ignored. The data to output to the LEDs must be in R when you call the subroutine.
There is no return data. This subroutine overwrites the value in R
The subroutine is called as follows:
BL setData
waitms This subroutine should just provide ms of time delay. You must edit the first instruction in the subroutine so that the delay time is approximately ms each time the subroutine is called.
There is no return data. This subroutine overwrites the value in R
The subroutine is called as follows:
BL waitXms
Test simulation
The program demonstrates full functionality in the simulator by turning the output LEDs on and off according to the input patterns redPattern, bluePatter, and greenPattern. The program runs indefinitely.
Test hardware demo
The program demonstrates full functionality on the TI LaunchPad by turning the output LEDs on and off according to the input patterns redPattern, bluePatter, and greenPattern. The program runs indefinitely.
You need to demonstrate both the simulation part and the hardware part to the Lab instructor. You need to modify the code to show two different patterns to the lab instructor during the live demonstration. Both team members need to be present at the time of the demonstration. Please, show steps and code. I am lost
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
