Docsity

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

Toggle sidebar
bg1
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.î ±
î ±

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.