You are on page 1of 1

Atilim University

Department oI Mechatronics Engineering


MECE 308



Midterm Exam #1
Date: 02.04.2010, Duration 90 minutes
Name, Surname :
Student ID :
(20pts) Question-0x01
Write the assembler code corresponding to below machine code

11 0000 0000 1010
00 0000 1000 0110
00 1001 1000 0110
01 1001 1000 0110
00 0000 0000 0000
00 0000 0000 1000

(40pts) Question-0x02
Write an assembler code that perIorms:
Continuously outputs the signal shown, at pin 18 oI PIC16F84A (PDIP package). Assume that the microcontroller is operating
with a 8 MHz clock oscillator Irequency.

(40pts) Question-0x03
In view oI the below simpliIied circuit diagram write an assembler code that perIorms:
In an inIinite-loop:
Checks whether the push-button is pressed or not, and
II the push-button is not pressed then a subroutine is called that turns oII all LEDs, and
II push-button is pressed then another subroutine is called that turns on all LEDs.

You might also like