Created by Charlotte Gonzalex
almost 5 years ago
|
||
List three benefits that the usage of functions can have on the code and/or program development.
Describe the difference between the following three types of documentation:
• Code documentation (code comments)
Describe the difference between the following three types of documentation:
• Application documentation
Describe the difference between the following three types of documentation:
• API documentation
Assume that a temperature sensor is connected to the ADC of a MCU. The sensor outputs a voltage of 0.75 V at 25 ◦C.
(a) What is the digital representation the ADC outputs if it has a resolution of 10 bit, a reference voltage of 3 V and it rounds to the closest integer?
Assume that a temperature sensor is connected to the ADC of a MCU. The sensor outputs a voltage of 0.75 V at 25 ◦C.
(b) What is the minimum resolution the ADC should have in order to have a quantiza- tion error of not more than 5 mV?
The AnalogIn class provides two different functions in order to read from the ADC (read, read_u16)
(a) Describe the difference of the two functions by describing their return values.
The AnalogIn class provides two different functions in order to read from the ADC (read, read_u16)
(b) In what relationship do the two functions stand?
A 1 MHz clock signal is connected to a 16 bit counter. After the counter has reached its maximum value, the counter starts counting from 0 again. How many times will the counter overflow in one minute?
What is an ISR?
For every interrupt source, an interrupt flag exists in some register.
(a) What is the interrupt flag used for?
For every interrupt source, an interrupt flag exists in some register.
(b) Explain what happens if the interrupt flag is not cleared in the callback function of the interrupt?