homework4_fall2009_key

homework4_fall2009_key - ECE 383 - Microcomputers Fall 2009...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 383 - Microcomputers Fall 2009 – Homework 4 Solutions [1] Given the following codes, what will the resulting values be at the break points for the memories and registers? (All the breakpoints are independent with each other) #include ECE383_Dragon12plus_register.inc ORG $1000 DIGIT_PATTERN DC.B $3F, $06, $5B, $4F, $66, $6D, $7D, $07, $7F, $6F, $77, $7C, $39, $5E, $79, $71 MAX_DUTY EQU 99 MIN_DUTY EQU 1 $3E4C $30 $0F $FF $00 $00 $01 0 1 0 0 1 0 1 1 DDRA x 1 0 1 x 1 1 1 0 0 1 1 0 0 1 0 PWMSCLB PWMSCLA PWMPRCLK DDRP DDRJ DDRH DDRB ORG $2000 MAIN: BSET PUCR, PUCR_PUPAE MOVW #ISR1, UserPortH BCLR PPSH, #$0F BSET PIFH, #$0F BSET PIEH, #$0F CLI MOVB #$0F, DDRA MOVB #$FF, DDRB MOVB #0, DDRH BSET DDRP, #%00000001 BSET PORTP, #%00000001 BSET PWME, #%10000000 BSET PWMPOL, #%10000000 BSET PWMCLK, #%10000000 MOVB #$57, PWMPRCLK MOVB #50, PWMSCLA MOVB #75, PWMSCLB MOVB #100, PWMPER7 MOVB #50, PWMDTY7 [A BREAK POINT HERE, FILL IN THE VALUES FOR THE REGISTERS ON THE LEFT ] LOOP1:BSET PORTA, #%00001111 BCLR PORTA, #%00000001 NOP BRSET PORTA, #%00110000, * LDAA PORTA COMA CMPA #$11 BNE QUO
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the 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.

Page1 / 4

homework4_fall2009_key - ECE 383 - Microcomputers Fall 2009...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online