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

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 movement of the step motor rotor (according to the given reference position (R))? Show it by calculating!

the PIC microcontroller in the circuit, when the switch positions given in

+5V R1 C3 1 C1 16G U1 -- U2 22pF 13 14 35 34 COM 1C X1 CRYSTAL 28 38 49 9 16 15 14 13 4 5 SC 4C C2 32 3 TH 78 7C 22pF 00 ULN2003A OSC1/CLKIN RENT OSCICUKOUT? Rai MCLRIVOOD- RB2 REYPGM RADIANO RB4 RASAN1 R85 RAZJANVRER RDE/PGC RAJANSREF+ RE7 PGO RA4/TOCKI RASIAN4S6 RCOTIOSO/TICKI RCVT10SUCCP2 RELJANSIRD RC2/CCP1 RE/ANGWR RC3/SCK'SCL REZANT/CS RCUSOUSDA RCS/SOO RC6/TWICK RCTIRXDT Step Motor 15 13 17 +$V +5V A +5V 8 9 10 +5V 4 +$V A +6V R R start 24 25 28 start 220 220 220 220 220 220 3 440 5 6 1 240 ROOPSPO RD'YPSP1 RDZ/PSP2 RDPSP3 RO4PSP4 2 ROUPS ROEPSPO 29 RD? PSP7 30 IR IR CCW, 120 CW, 60 10 10K TOR 101 10 TOR sample act sample act NO STEP MOTOR SWITCH NO 2 3 4 1 5 6 IR A K A K 1 direction of rotation: angle: IR KAALA K K 2 direction of rotation: angle: IR AKA A K 3 #include #fuses XT, NOWDT, NO PROTECT, NOBROWNOUT... #use delay (clock=4000000) // drt milyon #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_66)) x = x - 4; if(input(pin_b7)) x = x * 3; if(input (pin_a0)) x = x * 2; if (input (pin_al)) y = 1; for(i=0;i=0; j-2) { output_b(seri[j]); delay_ms (50); } 1 x = 10; y = 0; 7 void main() { // gerekli setuplarn yapldgn varsayn; set_tris_a (0x0F); set_tris_b (0xF0); output_b (0x00); enable_interrupts (int_rb); enable_interrupts (GLOBAL); while (1); direction of rotation: angle: IR | A | A 4 direction of rotation: angle: IR A D K 5 direction of rotation: angle: IR | | K K 6 direction of rotation: angle: A: Swtich OPEN K: Switch CLOSE +5V R1 C3 1 C1 16G U1 -- U2 22pF 13 14 35 34 COM 1C X1 CRYSTAL 28 38 49 9 16 15 14 13 4 5 SC 4C C2 32 3 TH 78 7C 22pF 00 ULN2003A OSC1/CLKIN RENT OSCICUKOUT? Rai MCLRIVOOD- RB2 REYPGM RADIANO RB4 RASAN1 R85 RAZJANVRER RDE/PGC RAJANSREF+ RE7 PGO RA4/TOCKI RASIAN4S6 RCOTIOSO/TICKI RCVT10SUCCP2 RELJANSIRD RC2/CCP1 RE/ANGWR RC3/SCK'SCL REZANT/CS RCUSOUSDA RCS/SOO RC6/TWICK RCTIRXDT Step Motor 15 13 17 +$V +5V A +5V 8 9 10 +5V 4 +$V A +6V R R start 24 25 28 start 220 220 220 220 220 220 3 440 5 6 1 240 ROOPSPO RD'YPSP1 RDZ/PSP2 RDPSP3 RO4PSP4 2 ROUPS ROEPSPO 29 RD? PSP7 30 IR IR CCW, 120 CW, 60 10 10K TOR 101 10 TOR sample act sample act NO STEP MOTOR SWITCH NO 2 3 4 1 5 6 IR A K A K 1 direction of rotation: angle: IR KAALA K K 2 direction of rotation: angle: IR AKA A K 3 #include #fuses XT, NOWDT, NO PROTECT, NOBROWNOUT... #use delay (clock=4000000) // drt milyon #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_66)) x = x - 4; if(input(pin_b7)) x = x * 3; if(input (pin_a0)) x = x * 2; if (input (pin_al)) y = 1; for(i=0;i=0; j-2) { output_b(seri[j]); delay_ms (50); } 1 x = 10; y = 0; 7 void main() { // gerekli setuplarn yapldgn varsayn; set_tris_a (0x0F); set_tris_b (0xF0); output_b (0x00); enable_interrupts (int_rb); enable_interrupts (GLOBAL); while (1); direction of rotation: angle: IR | A | A 4 direction of rotation: angle: IR A D K 5 direction of rotation: angle: IR | | K K 6 direction of rotation: angle: A: Swtich OPEN K: Switch CLOSE

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!