An RC plane is to fly on a certain scenario which is given below and this plane has two servo motors M2 for elevation while M1 for direction rotation left and right and both motors at starting are...


An RC plane is to fly on a certain scenario which is given below and this plane has two servo motors M2 for<br>elevation while M1 for direction rotation left and right and both motors at starting are centered at 90 degree<br>. The first root of the plane is to climb up 20 meters commanding M2 for 4 seconds then to rotate 40<br>degrees to the right for 1 sec. and then to return to the center staying for 2sec then to turn the plane flight<br>to the left 10 degree for 5 seconds.<br>Using AVR microcontroller, write a code for the above scenario knowing that:<br>M1 & M2 are connected to PC0 & PC1 respectively<br>Assume the remote control as switches connected to port PD2 for elevation and PD3 for direction<br>(table1)<br>7<br>5<br>4<br>2<br>1<br>REFS1<br>REFSO<br>ADLAR<br>MUX4<br>MUX3<br>MUX2<br>MUX1<br>MUXO<br>REFS1<br>REFSO<br>Voltage Reference Selection<br>AREF, Internal Vref turned off<br>AVCC with external capacitor at AREF pin<br>1<br>Reserved<br>1<br>1<br>Internal 2.56V Voltage Reference with external capacitor at AREF pin<br>7<br>5<br>4<br>3<br>2<br>1<br>ADEN<br>ADSC<br>ADATE<br>ADIF<br>ADIE<br>ADPS2<br>ADPS1<br>ADPSO<br>ADPS2<br>ADPS1<br>ADPSO<br>Division Factor<br>2<br>1<br>2<br>1<br>4<br>1<br>1<br>8<br>Activate Windows<br>16<br>32<br>Go to Settings to activate Winc<br>64<br>1<br>1<br>128<br>

Extracted text: An RC plane is to fly on a certain scenario which is given below and this plane has two servo motors M2 for elevation while M1 for direction rotation left and right and both motors at starting are centered at 90 degree . The first root of the plane is to climb up 20 meters commanding M2 for 4 seconds then to rotate 40 degrees to the right for 1 sec. and then to return to the center staying for 2sec then to turn the plane flight to the left 10 degree for 5 seconds. Using AVR microcontroller, write a code for the above scenario knowing that: M1 & M2 are connected to PC0 & PC1 respectively Assume the remote control as switches connected to port PD2 for elevation and PD3 for direction (table1) 7 5 4 2 1 REFS1 REFSO ADLAR MUX4 MUX3 MUX2 MUX1 MUXO REFS1 REFSO Voltage Reference Selection AREF, Internal Vref turned off AVCC with external capacitor at AREF pin 1 Reserved 1 1 Internal 2.56V Voltage Reference with external capacitor at AREF pin 7 5 4 3 2 1 ADEN ADSC ADATE ADIF ADIE ADPS2 ADPS1 ADPSO ADPS2 ADPS1 ADPSO Division Factor 2 1 2 1 4 1 1 8 Activate Windows 16 32 Go to Settings to activate Winc 64 1 1 128

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here