You are on page 1of 2

COEN 317: Microprocessor-based systems, Fall 2020

Assignment 3, Deadline: October Nov 20th, 11:59 PM EDT

Please read the following carefully:


• This is a design assignment, and it can be completed in group of maximum two
students. Having a partner is not mandatory.
• Please demonstrate your calculations for all questions.
• Only word or pdf files are acceptable for submission. You can type your
programs in a text editor (Notepad++ is recommended) and take screenshot of
your program and include in the word file.
• If you want to complete the program with a partner. Both must submit the
assignment, and both must include your partner name.
• Include a statement of originality in the submitted file. If you have a partner,
specify the contribution of each partner in your file. For example, you may
discuss the solution together, one may develop the flowcharts, one may write the
program. Please specify the tasks that each partner takes.

Question 1: GPIO configuration


Assume a RED and Green LED are connected to pin 0 and pin 1 of channel
0 respectively.
Continuously cycle the LEDs as below
o Turn off RED LED, Turn on Green LED
o Wait 1s using delay function
o Turn on RED LED, Turn off Green LED
o Wait 1s using delay function

Write a program to do the above, you need to use a function to create delay
in your program. Assume a loop with 10000 count limit will create 1s delay.
Draw a flowchart for your program and specify the required step.

Question 2: AXI Timer/Counter configuration


Design an application where an AXI timer/Counter is connected to an ARM
processor. Assume the timer frequency 25 MHz.

a) Find the required configuration (Mode, and TCSR) to generate a


periodic signal with the period of 10 ms. Use count up configuration.
b) Write a C++ program to generate the signal in part a. Specify the
required steps before writing the program.
c) Find the required configuration (Mode, and TCSR) to generate a single
pulse with the duration of 100 ms. Use count down configuration.
d) Write a C++ program to generate the pulse given in part c. Specify the
required steps before writing the program.
e) Assume frequency is 500 MHz instead of 25 MHz, find the required
configurations to generate 10s delay in the system. You can use either
count up or down configuration.
f) Find the required configuration to generate a PWM signal with duty
factor of 75% and a period of 200 ms. Assume the frequency is 25
MHz. Use count down configuration.

g) Write a C++ program to generate the PWM signal in part f. Specify the
required steps before writing the program.

Question 3: Interrupt
Design an application to generate periodic interrupt using an AXI
timer/Counter (use count up configuration) every 1s. Develop an interrupt
handler which turns ON an LED every time that an interrupt occurs. Specify
the required configurations as well as the required steps to take before
writing the program. Assume the clock frequency is 150 MHZ.

You might also like