ECET311-HW10
1-) If XTAL = 4MHz, which value should we load into OCR0 to generate a delay of
51.2ms? (1 points) Consider using Time 0, CTC mode, prescaler = 1024. Which is the
value of TCCR0 under those conditions? (1 points)
2-) Assuming XTAL = 4MHz and using a prescaler of 64, write a delay routine to
generate a delay of 960 us using Timer2. (2 points).
3-) Suppose that there is a 12-bit A/D converter with VRL= 1 V and VRH=4V.
Find the corresponding voltage values (3 digits after decimal point) for the A/D
conversion result of 80, 139, 180, 480, 640, 960, 1600, 2048, 3200, 4000. (3.5 points)
4-) In an ADC, assume that Vref is connected to 3.3 V. Find the following. Assume an 8-
bit option. (2.5 points)
(a) step size =
(b) maximum range for Vin =
(c) D7 - D0 values if Vin = 1.3V
(d) Vin if D7 - D0 = 01111111
(e) Vin if D7-DO = 11010101