HW3_Solutions - Electrical, Computer, & Telecommunications...

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

View Full Document Right Arrow Icon
Electrical, Computer, & Telecommunications Engineering Technology Micro Computers 20073 0618-303 Homework #3 HOMEWORK #3 Due 4/4/08 1. ; This is the program for HW3 .include “m128def.inc” .def Temp1 = R16 .def Temp2 = R17 .def Temp3 = R18 .org 0x0000 rjmp RESET RESET: ; start loop here ldi Temp1, a OUTER ldi Temp2, b MIDDLE: ldi Temp3, c INNER: dec Temp3 brne INNER dec Temp2 brne MIDDLE dec Temp1 brne OUTER ; end program here Derive the equation for the time delay of this nested loop in terms of a, b and c. 2. Design the flowchart and the program code for a program that does the following: Determine which pushbutton on the mega128.2 board is being pressed (S1-S8) Output to the LEDs the binary code for the button number (0001 for S1 and1000 for S8, for example) of the button being pushed. You can assume only one button at a time will be pushed. If no button is being pushed, all the LED’s should be off. 3. If you use the PUSH and POP instructions within a subroutine to temporarily store
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 01/10/2012 for the course ENG 0618-303 taught by Professor Christman during the Spring '07 term at RIT.

Page1 / 3

HW3_Solutions - Electrical, Computer, & Telecommunications...

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