quiz4_fall2009_key

quiz4_fall2009_key - (2) MOVB #$75, PWMPRCLK MOVB #50,...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 383 - Microcomputers Fall 2009 – Quiz 4 Solutions Instructions: 1. Please write your name and student number in the upper right hand corner of the back of this sheet. 2. When you are finished answering the questions, fold the paper in half lengthwise with this side of the page to the inside of the fold. Problems: 1. What is the frequency range of PWM signals generated by the Drag12plus board (24M Hz main clock)? Frequency min = 24x10 6 /2 7+9+16=32 24/4000 = 0.006Hz Frequency max = 12MHz 2. What are the frequency and duty cycle of the following PWM signals? (1) MOVB #$45, PWMPRCLK MOVB #100, PWMSCLA MOVB #75, PWMSCLB MOVB #100, PWMPER7 MOVB #50, PWMDTY7 Scaling = 16 x (2x75) x 100 Frequency = 100 Hz D = 50 %
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (2) MOVB #$75, PWMPRCLK MOVB #50, PWMSCLA MOVB #75, PWMSCLB MOVB #100, PWMPER5 MOVB #50, PWMDTY5 Scaling = 32 x (2x50) x 100 Frequency = 75 Hz D = 50 % 3. Finish the following code to generate a waveform with 0.05Hz and 10% high duty cycle BSET PWMCTL, #%01000000 BSET PWME, #%00110000 BSET PWMPOL, # %00110000 BSET PWMCLK, # %00110000 MOVB # $06 , PWMPRCLK MOVB # 250 , PWMSCLA MOVW # 15000 , PWMPER4 Scaling: 64 x (2x250) x 15000 MOVW # 1500 , PWMDTY4 4. Finish the following code that can provide an interrupt service when pushbutton2 is pressed ORG $2000 MOVW # $3000 , $3E4C BRA * CLI ORG $3000 S E I BRCLR PIFH, # %00000100 , ISR_DONE I N C A ISR_DONE: BSET PIFH, # %00001111 C L I R T I...
View Full Document

This note was uploaded on 11/22/2011 for the course ECE 350 taught by Professor Staff during the Spring '08 term at Alabama.

Ask a homework question - tutors are online