Lecture 3 worksheet .edu



EE319K Lecture Lec11.ppt in class worksheet

Question 1. What is a transducer? Draw a picture of the transducer in Lab 8 showing how it is used.

Question 2. What is the range of an unsigned 16-bit decimal fixed-point system with Δ=0.01?

Question 3. What is the range of a signed 8-bit binary fixed-point system with Δ=2-2?

Question 4. If range is defined as (max-min) and precision is in bits, what equation related range, precision, and resolution?

Question 5. Can the sum of two fixed-point numbers overflow? How does one detect overflow?

Question 6. What error might occur with multiply? Prove this equation has no overflow (where N comes from a 12-bit ADC)

I = (75•N)/1024

Question 7. What errors occur with these poorly written equations?

I = 75•(N/1024) I = N •(75/1024)

Question 8. Why is binary fixed-point faster than decimal fixed-point?

Question 9. Why do we use decimal fixed-point in Lab 8?

Question 10. With a bus clock at 80 MHz, the slowest we can run SysTick interrupts is 80,000,000/16777216 = 4.768 Hz. How could we sample at 1 Hz (trigger ADC exactly every 1sec)? Give a flow chart including a mailbox used to pass data to the foreground.

Question 11. List the factors that limit accuracy?

Answer 1. From Latin transducer means to lead across. In general it means to convert one signal into another. In EE319K it converts a physical signal into an electrical signal. In Lab 8 it converts distance to resistance.

Answer 2. An unsigned 16-bit integer ranges from 0 to 65535. A decimal fixed-point with Δ=0.01 ranges from 0.00 to 655.35.

Answer 3. A signed 8-bit integer ranges from -128 to +127. The range of a signed 8-bit binary fixed-point system with Δ=2-2 is -128/4 (-64) to +127/4 (63.75).

Answer 4. Range = 2precision * resolution

Answer 5. Yes, just like integer math, the sum of two fixed-point numbers can overflow. We detect overflow in the same manner as integer math

In assembly, look at C-bit or V-bit after ADDS instruction

In C, promote to a higher precision, add, and check the sum before demotion

Answer 6. In general 75*N might overflow. However, if N is 12 bits and 75 is 7 bits then 75*N will fit into 19 bits, so with the 32-bit ARM, this cannot overflow.

Answer 7. These are examples of dropout.

Answer 8. Binary fixed-point is faster than decimal fixed-point because shift is faster than multiply/divide.

Answer 9. We use decimal fixed-point in Lab 8 to make a LCD output that humans can understand.

Answer 10. Set RELOAD to 799,999 so SysTick occurs at 10 Hz. Use a counter to sample the ADC every tenth interrupt. Give a flow chart including a mailbox used to pass data to the foreground.

void SysTickHandler(void){

static uint32_t count=0;

count++;

if(count==10){

count = 0;

MailBox = ADC_In();

Flag = 1;

}

}

Answer 11. The factors that limit accuracy include noise, calibration drift, and accuracy of the calibration standard.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download