Pin labeled PB4 (or PORTB4) is meant to be used for? i. Analog input onlyAnalog
ID: 2083722 • Letter: P
Question
Pin labeled PB4 (or PORTB4) is meant to be used for? i. Analog input onlyAnalog input and digital input/output ii. Analong input and digital input/output iii. Digital output only iv. Digital input or digital output b. If the MCU is running on a 20MHz clock and it is desired to program a 16-bit timer, to implement an 80KHz PWM with 25% duty cycle non-inverting fast PWM mode using ICR1 to store the top value, then which choice of pre-scalar is preferred given that interrupt on overflow is to used and precision in timing is required? i. 1 (no pre-scaling) ii. 8 iii. 256 iv. 1024 c. Bit 4 - ADIF in register ADCSRA: ADC Interrupt Flag is set when an ADC conversion completes and the Data Registers are updated The ADC Conversion Complete Interrupt is executed if the ADIE bit and the l-bit in SREG are set. ADIF is cleared by hardware when executing the corresponding interrupt handling vector. Alter- natively. ADIF is cleared by writing a logical one to the flag. Beware that if doing a Read-Modify- Write on ADCSRA. a pending interrupt can be disabled Which of the following statements waits for ADC conversion to end? i. while ((ADCSRA & (1Explanation / Answer
a)PORTB4 OUT DIGITAL OUTPUT
b)256
c) while(ADCSRA & (1<<ADIF))==0
d)STAEMENT THREE SET to ADIF TO zero