HW 5 A2D, Serial, and Time Calculations CENG 5434 Fall 2017 Due 10/16

To Go Over In Class. Remember to show all your calculations! Problem 1 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 2 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 3 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 4 20 Points Suppose we wish to compute the Fourier Transform (FFT)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 5 10 Points Assume that the baud rate is 9600 bits/second for serial transfer of characters. Each character is 8-bit ASCII with one start bit and one stop bit. The least significant digit is transmitted first in the ASCII character. What is the total time to transmit the three characters?

Problem 6 10 Points Consider an SCI transmitting at 19.2 kbaud. The format is seven data bits, even parity, a start and stop bit. a. How long will it take to send a document that is one Megabyte (220) long? b. If each transfer requires a CPU interrupt, how often is the CPU interrupted?

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?.

3 Problem 8 10 Points Consider the list of serial protocols below. Pick 3 of them and describe charac- teristics and use.

ARINC 818 Digital Video Atari SIO (Joe Decuir credits his work on Atari SIO as the basis of USB) CAN Control Area Network Vehicle Bus ccTalk Used in the money transaction and point-of-sale industry 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 Morse code telegraphy PCI Express 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 ATA Serial Attached SCSI SONET and SDH (high speed telecommunication over optical fibers) SpaceWire Spacecraft communication network SPI T-1, E-1 and variants (high speed telecommunication over copper pairs) Universal Serial Bus (moderate-speed, for connecting peripherals to computers) UNI/O multidrop serial bus 1-Wire multidrop serial bus

4