5-5 BlinkAlive subroutine. Change the BlinkAlive subroutine of Figure 5-6 so that it simply toggles the LED every 2.5 seconds. Change it so that it briefly (and, therefore, faintly) blinks the LED once per second. 5.6 Macros. Write the definition for a macro called BCOPY that copies one bit in one regis- ter to a different bit in a different register without changing any of the other bits of either reg- ister. Begin the macro definition with BCOPY macro source, sbit.dest,dbit Minimize the instructions generated by each invocation of this macro. As an example of its use BCOPY PORTD, RD, PORTA, RA1 and BCOPY PORTD, RD1, PORTA, RA2 will copy the two outputs of the "RPG" of Figure 4-2a to two of the LEDs on the QwikFlash board so that the state of the RPG can be monitored by eye. Ulode Part # 1 Set upt resistor Explain voltage Program Development (P1 Template) ive subroutine :::::::::::::::::::::::::::::::::::::::::::::::: : This subroutine briefly blinks the LED next to the PIC every 2.5 : seconds. ;Turn off LED ;Decrement loop counter and return if not zero BlinkAlive bsf PORTA, RA4 decf ALIVECNT,F bnz BAend MOVLF 250, ALIVECNT bcf PORTA, RA4 BAend return ; Reinitialize ALIVECNT ;Turn on LED for 10 milliseconds every 2.5 sec Figure 5-6 BlinkAlive subroutine. 5-5 BlinkAlive subroutine. Change the BlinkAlive subroutine of Figure 5-6 so that it simply toggles the LED every 2.5 seconds. Change it so that it briefly (and, therefore, faintly) blinks the LED once per second. 5.6 Macros. Write the definition for a macro called BCOPY that copies one bit in one regis- ter to a different bit in a different register without changing any of the other bits of either reg- ister. Begin the macro definition with BCOPY macro source, sbit.dest,dbit Minimize the instructions generated by each invocation of this macro. As an example of its use BCOPY PORTD, RD, PORTA, RA1 and BCOPY PORTD, RD1, PORTA, RA2 will copy the two outputs of the "RPG" of Figure 4-2a to two of the LEDs on the QwikFlash board so that the state of the RPG can be monitored by eye. Ulode Part # 1 Set upt resistor Explain voltage Program Development (P1 Template) ive subroutine :::::::::::::::::::::::::::::::::::::::::::::::: : This subroutine briefly blinks the LED next to the PIC every 2.5 : seconds. ;Turn off LED ;Decrement loop counter and return if not zero BlinkAlive bsf PORTA, RA4 decf ALIVECNT,F bnz BAend MOVLF 250, ALIVECNT bcf PORTA, RA4 BAend return ; Reinitialize ALIVECNT ;Turn on LED for 10 milliseconds every 2.5 sec Figure 5-6 BlinkAlive subroutine