HW 5 A2D, and Time Calculations CENG 5434 Fall 2018 Due 10/9 Remember to show all your calculations!

Problem 1 5 Points A 16-bit timer/counter has what timing range if the clock input frequency is 1. 8 MHz 2. 4 MHz Problem 2 5 Points Tolerances of input voltage dividers or the variable gain of an input system can cause inaccuracy in measurement. A voltmeter to read a 70.0 V input may have a ”5 % reading error” specification. What is the uncertainty (range) in measured voltages for the 70 V input? (This is not a great meter!)

Problem 3 10 Points We can state A/D resolution in many ways. For example, the resolution of an n bit A/D converter is given by

V V = full-scale value . resolution 2n For an 8-bit A/D with a 5 volt, full-scale range 1. What is the resolution in millivolts?

2. What is the resolution in terms of the % of full-scale value?

. Problem 4 10 Points Suppose an A/D converter has a conversion time of 100 µ seconds. 1. What is the sampling frequency?

. 2. What is the highest frequency that can be sampled without aliasing?

1 Problem 5 20 Points To choose an A/D converter and program it, we need to know the resolution (number of bits), the sampling rate (time between samples) and the number of points to sample (duration of the sampling period). Assume a sensor outputs .05 ◦ ◦ volts/ C with a range of up to 100 C. How many bit A/D converter is needed ◦ to get a resolution of 0.1 C?

. Problem 6 30 Points Suppose we wish to compute the frequency characteristics of a signal. We choose the sampling rate based on how fast the sampled signal can change and the duration of sampling based on the resolution in frequency. Note that the A/D is normally programmed to sample every Ts seconds and take N samples. Then, NTs determines the period of each frame of sampling and hense the resolution in frequency as ∆f =1/NTs 1. For a signal with frequencies up to 1200 Hz, what is the minumum time between samples?

. 2. To resolve the spectrum to 0.5 Hz, what is the length of time to sample the signal?

. 3. Assume that the number of samples is to be a power of 2. How many samples are taken?

2 Problem 7 10 Points Suppose a 16-bit timer is set to interrupt approximately every millisecond. a. If the timer clock is a 4.19 MHz clock, what is the closest programmable divider of the clock to cause the timer to overflow every ms? The values are powers of 2. b. How close to 1ms can the timer get in seconds and in percent?.

. Problem 8 10 Points Consider the list of serial protocols below. Pick 2 of them and describe charac- teristics and use. (Data rates, useful length, typical use, etc.)

ARINC 818 Digital Video CAN Control Area Network Vehicle Bus CoaXPress industrial camera protocol over Coax DC-BUS communication over DC power lines DMX512 control of theatrical lighting (high-speed, for connecting computers to mass storage devices) FireWire HyperTransport InfiniBand (very high speed, broadly comparable in scope to PCI) IC multidrop serial bus MIDI control of electronic musical instruments MIL-STD-1553A/B RS-232 (low-speed, implemented by serial ports) RS-422 multidrop serial bus RS-423 RS-485 multidrop multimaster serial bus SDI-12 industrial sensor protocol Serial Attached SCSI SONET and SDH (high speed telecommunication over optical fibers) SPI Universal Serial Bus (moderate-speed, for connecting peripherals to computers)

3