Question: According to the code piece given in the lower part on the PIC microcontroller in the circuit, when the switch positions given in Table 1

According to the code piece given in the lower part on the PIC microcontroller in the circuit, when the switch positions given in Table 1 are applied, what is the direction and angle of the step motor rotor (according to the given reference position (R))? (show by calculating). Results given without calculation will not be evaluated. The 5V stepper motor used in the circuit has a step angle of 1.5 . Each key combination given in Table 1 is not applied until the stepper motor reaches its final position (stops). The motor (Bank 1) will start from the R point. According to the code piece given in the lower part on the PIC microcontroller in the circuit, when the switch positions given in Table #include #fuses XT,NOWDT,NOPROTECT,NOBROWNOUT #use delay(clock=4000000) #use fast_io(a) #use fast_io(b) int i,j,x=5,y=0; int seri[]={10,9,11,8,7,12,14,4,13,6,5,2,15,3,0,1}; #int_rb void kesme_1() { if(input(pin_b4)) x = x + 2; if(input(pin_b5)) x = x * 2; if(input(pin_b6)) x = x - 4; if(input(pin_b7)) x = x * 3; if(input(pin_a0)) x = x * 2; if(input(pin_a1)) y = 1; for(i=0;i=0;j-2) { output_b(seri[j]); delay_ms(50); } } x = 10; y = 0; } void main () { set_tris_a(0x0F); set_tris_b(0xF0); output_b(0x00); enable_interrupts(int_rb); enable_interrupts(GLOBAL); while(1); }

+5V R1 C3 104 100F U1 U2 22pf COM 1C 10 X1 CRYSTAL OSCICLKIN Osca/CLKOUT MCLRAVDA REINT Rai R8Z 14 39 10 16 14 13 38 4B C 4C C2 REPOM 12 RSS) 37 009 OC 78 870-12 2000A 22pF 15 Step Motor +6V +5V RAJANO R 34 RAVAN RASANA VREF RE/PGC RABANSWVREF. RBT PGD RAAITOCKI RASAN4/56 RCOTICSONTICKI RCVT10SUCCP2 REJANSRD RC2CCP1 REWANGWR RCSISCK SCL REZJANTICS RCUSOUSA RCS/SOO RCGTXACK RCTIXOT +5V $V +6V +5V ta start 220 220 220 220 start 3 340 5 6 ADOPSP RD1PSP1 ADIP SP2 RD3PSP3 RO4 PSP ROMPSO RDGIPSPS RD7PSP7 MOUNT CCW, 120 VSS CW, 60 C i 10 10K 10% I FOR 108 16 sample movement 1 ! 1. sample movement 2 STEP MOTOR Place SWITCH NO 23 4 5 1 6 R AKK A AK 1 Direct. of rot: Angle: R KAA KK 2 Direct. of rot: Angle: R | A A | 3 Direct. of rot: Angle: IR KAKKKA 4 Direct. of rot: Angle:K R | K 5 Direct. of rot: Angle: R | | K A Direct. of rot: Angle: A SW ON, K Switch OFF Table 1 +5V R1 C3 104 100F U1 U2 22pf COM 1C 10 X1 CRYSTAL OSCICLKIN Osca/CLKOUT MCLRAVDA REINT Rai R8Z 14 39 10 16 14 13 38 4B C 4C C2 REPOM 12 RSS) 37 009 OC 78 870-12 2000A 22pF 15 Step Motor +6V +5V RAJANO R 34 RAVAN RASANA VREF RE/PGC RABANSWVREF. RBT PGD RAAITOCKI RASAN4/56 RCOTICSONTICKI RCVT10SUCCP2 REJANSRD RC2CCP1 REWANGWR RCSISCK SCL REZJANTICS RCUSOUSA RCS/SOO RCGTXACK RCTIXOT +5V $V +6V +5V ta start 220 220 220 220 start 3 340 5 6 ADOPSP RD1PSP1 ADIP SP2 RD3PSP3 RO4 PSP ROMPSO RDGIPSPS RD7PSP7 MOUNT CCW, 120 VSS CW, 60 C i 10 10K 10% I FOR 108 16 sample movement 1 ! 1. sample movement 2 STEP MOTOR Place SWITCH NO 23 4 5 1 6 R AKK A AK 1 Direct. of rot: Angle: R KAA KK 2 Direct. of rot: Angle: R | A A | 3 Direct. of rot: Angle: IR KAKKKA 4 Direct. of rot: Angle:K R | K 5 Direct. of rot: Angle: R | | K A Direct. of rot: Angle: A SW ON, K Switch OFF Table 1

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!