Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#include p16f8a.inc cblock Ox20 cl endc W org 00 loop call hwDelay goto loop w hwDelay banksel OPTION_REG movlw Ox03 movwf OPTION REG movlw d'150

image text in transcribed

#include p16f8a.inc cblock Ox20 cl endc W org 00 loop call hwDelay goto loop w hwDelay banksel OPTION_REG movlw Ox03 movwf OPTION REG movlw d'150 movwf cl s2 banksel TMRO movlw d'156' movwf TMRO sl btfss INTCON, 2 goto si bcf INTCON, 2 decfsz cl, F goto s2 return w ww end Q1 [2 Marks]: Calculate the delay produced by the assembly code Q2 [3 marks]: Use the calculated delay in Q1, and use the MPLAB to write an assembly code to run a software delay. . Q3 (5 marks]: Based on 16F84A, use the MPLAB to write an assembly program that does the following: When an external interrupt occurs on rising edge, make PORTA reads input signal. When an external interrupt occurs on falling edge, make PORTA writes output signal #include p16f8a.inc cblock Ox20 cl endc W org 00 loop call hwDelay goto loop w hwDelay banksel OPTION_REG movlw Ox03 movwf OPTION REG movlw d'150 movwf cl s2 banksel TMRO movlw d'156' movwf TMRO sl btfss INTCON, 2 goto si bcf INTCON, 2 decfsz cl, F goto s2 return w ww end Q1 [2 Marks]: Calculate the delay produced by the assembly code Q2 [3 marks]: Use the calculated delay in Q1, and use the MPLAB to write an assembly code to run a software delay. . Q3 (5 marks]: Based on 16F84A, use the MPLAB to write an assembly program that does the following: When an external interrupt occurs on rising edge, make PORTA reads input signal. When an external interrupt occurs on falling edge, make PORTA writes output signal

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago