quiz حل الأسئلة الجامعية manage_search الأرشيف

تم الحل ✓
categoryهندسة حاسوب وشبكات schoolبكالوريوس event_available2026-07-13

السؤال

Transcribed Image Text:

Questions 10-12 refer to the program below, which monitors the status of the switch and perform the following: (a) If PORTA.7-1, the DC motor moves with 25% duty cycle pulse; (b) If PORTA.7-0, the DC motor moves with 50% duty cycle pulse. Line A: #include "avr/io.h" Line B: int main() Line C: { Line D: Line E: Line F: DDRB 0x08; PORTA-0x80; TCCRO 0x73; //Phase corrected PWM, // inverted, n-64 switch ((PINA&0x80)) Line G: while (1) Line H: ( Line 1: Line J: ( Line K: Line L: Line M: } Line N: } Line O: return 0; Line P:} case 0: OCR0 64; break; 10. Which timer is used by the program? Answer: 11. In the comment for line F, what does "n-64" mean? Answer: case 1: OCR0-127; break; 12. In Line K, why "OCRO-64" (where does the value 64 come from?) Answer:

check_circle الجواب — حل مفصل خطوة بخطوة

hourglass_top