Question: #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

 #include p16f8a.inc cblock Ox20 cl endc W org 00 loop call

#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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!