Question: 5-6 Macros. Write the definition for a macro called BCOPY that copies one bit in one register to a different bit in a different register

 5-6 Macros. Write the definition for a macro called BCOPY that

copies one bit in one register to a different bit in a

5-6 Macros. Write the definition for a macro called BCOPY that copies one bit in one register to a different bit in a different register without changing any of the other bits of either register. 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, RDO, PORTA , RAI 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. PIC18F452 +5 V ADC PORTA 5 k POT 1 Potentiometer +5 V "Alive" LED Low-current red LEDs AN (RAS) LED 1 k 2 D3 RA4 1 k2 D4 RA3 + 1 k 2 D5 RA2 + 1 k 2 D6 RA1 WD Left LED Panasonic LN28RAL(US) Center LED Right LED +5 V TMP1 Temperature sensor National Semiconductor LM34DZ ANO (RA0) PORTE ANZ RE2 "E2" Pin at top of board RE1 E LCD REO RS U5 8 X 2 LCD display Optrex DMC50448N RD7 RD6 RD5 RD4 B7 B6 B5 B4 Nibble" interface +5 V PORTD 10 k12 RD3 RD2 Unused +5 V 10 k.12 SW3 Pushbutton switch RD1 10 k12 RDO RPG1 Rotary pulse generator Bourns 3315C-1-006 (24 increments/revolution) (a) Ports A, D, E Figure 4-2 QwikFlash I/O

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!