Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 movement of the step motor rotor (according to the given reference position (R))? Show it by calculating!
+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;iStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started