Вы находитесь на странице: 1из 1

Institute of Space Technology Islamabad

Lab: Embedded Systems Exam: Mid

Date: july13,2020

Q#1

Write a program in which you clear the working register(WREG) then add 4 to
WREG x times and send the result to Port A (x=roll number)

Q#2

Write a program to generate a square wave of 66% duty cycle on Bit 0 of


PORTA(you can generate a random delay subroutine using a nested loop )

Also calculate the delay generated by your random subroutine if crystal frequency
is 4MHz

Q#3

A switch is connected to pin RB2 . write a program so that

1.) When switch is on (RB2 goes high) , send 0x0F to PORTA


2.) When switch is off (RB2 goes low) , send 0XF0 to PORTA

Q#4

Write and an assembly language program to control the status of two LEDs with
two corresponding switches.

Вам также может понравиться