C12 Embedded systems in MicroPython and C · Practice
Digital inputs and pull-ups
Problems dealt one at a time, with new numbers every time. The kinds you miss come back more often, and you can keep going as long as you like.
Check
A button pulls a 10 kΩ pull-up to ground. What current flows while it's held?
Write units the way you normally would: 1.5 µA, 1500 nA and 0.0015 mA are the same answer.
Check
A 10 kΩ pull-up charges 10 pF. How long until the pin crosses (70% of the supply)?
Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.
Check
On a 3.3 V CMOS input, a threshold is 0.3 × the supply. What voltage is that?
Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.
Check
GPIO_IN reads 0011. What does (GPIO_IN >> 4) & 1 give, the level of P4?
Check
A 47 kΩ pull-up's button is held for 1 hours a day. How much charge does the pull-up draw each day?
Write units the way you normally would: 1.5 mAh, 1500 µAh and 0.0015 Ah are the same answer.
Check
A button pulls a 10 kΩ pull-up on a 3.3 V pin to ground.
(a)
What current flows while it's pressed?
Write units the way you normally would: 1.5 mA, 1500 µA and 0.0015 A are the same answer.
(b)
How much power is wasted while it's pressed?
Check
A 47 kΩ pull-up charges 10 pF of pin and wire after a button is released; the pin reads 1 above 2.3 V.
(a)
How long until it reads 1?
Write units the way you normally would: 1.5 µs, 1500 ns and 0.0015 ms are the same answer.
(b)
What is the time constant?
Check
Current through a pressed 22 kΩ pull-up?
Write units the way you normally would: 1.5 µA, 1500 nA and 0.0015 mA are the same answer.
Check
Rise time to 70% through 5 kΩ into 15 pF?
Write units the way you normally would: 1.5 ns, 1500 ps and 0.0015 µs are the same answer.
Check
P4's level when GPIO_IN is 0030?
A kind of problem counts as solid once you've got it right on the first try twice in a row. Back to the lesson · Practice every topic in C12