EECS 388: Computer Systems and Assembly Language Homework 5, Assignments of Electrical and Electronics Engineering

The fifth homework assignment for the eecs 388: computer systems and assembly language course. The assignment includes five problems related to real-time interrupts, mclk frequency, and generating square waves using timer0. Students are required to write programs and set up registers to complete the tasks.

Typology: Assignments

Pre 2010

Uploaded on 03/19/2009

koofers-user-4hl-1
koofers-user-4hl-1 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
EECS388:ComputerSystemsandAssemblyLanguage
Homework5
Due:Tuesday,April8,2008
1. (20)HowmanyRTIinterrupteventsmustoccurtogeneratea15minute
delayassumingtheMCLKisoperatingat2MHzandtheRTR[2:0]bitsare
setfor“110”?HowdoyousetuptheRealTimeInterruptControlRegister
(RTICTL)(i.e.,enableRTIandsetRTIprescale)forthispurpose?
2. (15)Textbook,page291.Advancedproblem#4.ChangeMCLKto4MHz.
3. (15)Textbook,page291.Advancedproblem#5.
4. (25)Writeaprogramtomeasuretheperiodofaperiodicsignalconnected
toinputchannel3bymeasuringthecountdifferencebetweentwofalling
edges.SetPR2:PR0=011.Usepollingmethod.
5. (25)Generatea1500Hzsquarewavewitha40%dutycycle(ON/PERIOD)
onoutputcomparechannel2(OC2).MCLK=8MHz.Settheprescalerto
divideby4. Use interrupt.

Partial preview of the text

Download EECS 388: Computer Systems and Assembly Language Homework 5 and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

EECS 388: Computer Systems and Assembly Language

Homework 5

Due: Tuesday, April 8, 2008

  1. (20) How many RTI interrupt events must occur to generate a 15 minute delay assuming the MCLK is operating at 2MHz and the RTR[2:0] bits are set for “110”? How do you set up the Real‐Time Interrupt Control Register (RTICTL) (i.e., enable RTI and set RTI prescale) for this purpose?
  2. (15) Textbook, page 291. Advanced problem #4. Change MCLK to 4 MHz.
  3. (15) Textbook, page 291. Advanced problem #5.
  4. (25) Write a program to measure the period of a periodic signal connected to input channel 3 by measuring the count difference between two falling edges. Set PR2:PR0 = 011. Use polling method.
  5. (25) Generate a 1500Hz square wave with a 40% duty cycle (ON/PERIOD) on output compare channel 2 (OC2). MCLK = 8MHz. Set the prescaler to divide by 4. Use interrupt.