Search for question
Question

Q1

(a)

(b)

A modern embedded processor is used in the engine management unit for a

hybrid petrol/electric car - requiring precise measurement of engine emissions

in real time. Discuss whether single precision or double precision floating point

arithmetic is most appropriate for the software running on this processor. [4]

(c)

(d)

State the range of allowable values for the exponent and fraction of IEEE-754

single precision floating point numbers.

[3]

(e)

Obtain the IEEE single precision representation for the number -15.62510

showing your working at each point of the analysis.

[7]

Explain the key differences between the IEEE-754 numbers Ox7f800000 and

0x7fc00000.

[3]

The code of figure Q1 is executed on a Freescale Kenetis Microcontroller.

Assume that the function delayms (int n) creates a delay of n ms.

i)

ii)

iii)

Describe the purpose and action of the line PTB->PDDR = 0x080000

noting the pin on which it acts.

[4]

Why is the bitwise operation '=' not needed when acting upon the

registers PCOR and PSOR?

[2]

}

What changes would be necessary in this program so that the output

would be observed on port B, pin 3?

[2]

#include

void delayms (int n);

int main (void) {

SIM->SCGC5=

PORTB->PCR [19]

PTB->PDDR = 0x080000;"

while (1) 1

PTB-PCOR= 0x080000;

delayms (500)

PTB-PSOR = 6x080000;

delayms (500);

Fig: 1