Self-assessment whether or not a specific parameter

Self-assessment test

Embedded
Systems Design EEE502

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

 

Q1.

CPU

An Embedded Processor is a microprocessor that is used in an embedded system.

These processors are usually smaller, use a surface mount form factor and
consume less power.

Sensors and Actuators

Establishing a natural interface requires that the embedded system
interface with the physical world directly through sensors, which read the state of the world, and actuators, which
change the state of the world.

Memory

The memory used in embedded
systems can be either internal or external. The internal memory of a processor
is very limited. For small applications, if this memory is sufficient, there is
need to used external memory.

ADC and DAC

Embedded systems receive their
inputs from the external world in the form of analogue signals. An analogue signal
needs to be converted into a digital signal as processor only takes digital
signals. These conversions are performed by Analog-to-Digital and the reverse
conversion of digital to analogue by Digital-to-Analog.

Every analogue signal has a
bandwidth to convert such a signal into digital, first the signal needs to be
sampled. After sampling the signal is quantized to give a digital signal.

Display units

LEDs indicators: Some of
embedded systems use LED indicators to provide status information, such as
power on, or whether or not a specific parameter being measured is within the
prescribed limit. They come in different colours to provide such status
information.

Keypads

Each embedded system offers
different capabilities for providing user input. Handheld computers are
provided with either keyboard or a form of handwriting recognition. Depending
on the needs they can vary from few keys to a complete keyboard.

Communication Interfaces

Embedded Systems need to
interface with the external devices, thus they need communication interfaces.

Most processors provide a serial interface to send and receive data in serial
form. Networked embedded systems are provided with Ethernet interface.

Dedicated Subsystems

Application Specific Circuits
(ASIC) is another option for embedded systems. ASIC needs to be custom-built
for specific application so it can cost high.

 

Q2.

The CPU, RAM, and ROM can process continuous analogue signals.

The DSP is a specialised microprocessor that could also convert the signals. Digital signal
processing algorithms typically require a large number of
mathematical operations to be performed quickly and repeatedly on a series of
data samples. Signals are constantly converted from analogue to digital,
manipulated digitally, and then converted back to analogue form. For example,
the ECG signal is a continuous signal and the microcontroller clock doesn’t have
to be as fast as the audio signal because it has a higher amplitude variation.

Whereas the clock has to be faster on the audio signal to capture as much
signal as possible to allow the digital audio to be as accurate as the
analogue. The ADC resolution in the ECG signal doesn’t have to be as high as in
the audio. The audio needs a higher ADC resolution to produce a better digital
signal. The memory requirements for the audio of the song don’t have to be high
because songs don’t last for very long. Though the ECG signal won’t be turned
off for a considerable amount of time depending on how long the patient needs
it. So, the memory has to be much higher. The transient variation in the audio
is higher than in the ECG signal. The Amplitude variation is higher in the ECG
than the audio signal.

 

Q3.

A

Vout
= Vin * R2 / R1 + R2

Vout
= 3.3v * 4K / 4K + 4K = 1.65

1023
/ 3.3v * 1.65 = 512

Binary
= 1000000000

 

B

Vout
= Vin * R2 / R1 + R2

Vout
= 3.3v * 8K / 4K + 8K = 2.2

1023
/ 3.3v * 2.2 = 682

Binary
= 1010101010

 

Q4.

Amplitude
= +3.3V

 

Duty
Cycle (i) = 100%

 

Duty
Cycle (ii) = 50%

10/20
= 0.5

 0.5*100 = 50%

 

Duty
Cycle (iii) = 33.33%

5/15
= 0.333

0.333
* 100 = 33.33%

 

Duty
Cycle (iv) = 10%

1/10
= 0.1

0.1
* 100 = 10%

 

Q5.

When
peripherals are connected to a computer, they require a physical cord to send
signals backwards and forwards. This way the processor can communicate with
these devices and send data to them. Communication occurs when the computer
sends electronic pulses to the peripheral. These pulses combine into a message,
a data file or a command. The alternating pulses are organized based on the
type of peripheral device and how it interacts with the computer system.

Parallel
transmission occurs across a parallel wire. Parallel wires are flat,
constituting multiple, smaller cables. Each cable can carry a single bit of
information. A parallel cable can carry multiple bits at the same time, one for
each cable. An eight-cable parallel wire, for example, could carry an entire
byte of data. This results in faster data transmission per second, all things
being equal.

Serial
transmission occurs over a single cable, one bit at a time. This type of
communication is named serial not simply because data travels one bit at a
time, but also because these bits must be organized in a particular way so that
transmissions can be organized and considered trustworthy. For example, a
single transmission from a peripheral device using serial data might take only
6 bits, so the serial mechanism has a way to dictate how to signal things like
an end of transmission.

Parallel
connections are, all things being equal, faster due to a higher rate of
transfer. However, parallel ports also require more hardware, making them more
expensive to implement. Furthermore, data transfer rates have increased to such
an extent that serial connections can transfer entire gigabytes per second.

Serial connections are also easier to implement, making them the go-to hardware
choice for plug-and-play peripheral devices such as external hard drives and
MP3 players.

 

Q6.

The UART controller handles
the asynchronous serial communication between a computer and a peripheral
device connected to the serial port of the computer and converts data from
serial to parallel and vice-versa. This allows the computer to talk to modems and
other serial devices. A UART is basically a microchip that conditions the data
coming in and out of serial ports. Converts parallel data into serial data for
outbound communications. Converts serial
data into parallel data for inbound communications. Handles interrupt requests and device management
which may require the computer and the device to manage the speed of operation.

Converts the bytes it
receives from the computer along parallel circuits
into a single serial bit
stream for outbound transmission. On inbound transmission, converts the serial
bit stream into the bytes that the computer handles. Adds
a parity bit
on outbound transmissions and checks the parity of incoming bytes and discards
the parity bit.

Requires only two wires for
full duplex data transmission. No need for clock or any other timing signal. Parity
bit ensures basic error checking is integrated in to the data packet frame.

But size of the data in the
frame is limited and the speed for data transfer is less compared to parallel
communication. The transmitter and receiver must agree to the rules of
transmission and appropriate baud rate must be selected.

 

Q7.

 

 

D

E

Q

Not Q

0

0

latch

latch

1

0

latch

latch

0

1

0

1

1

1

1

0

 

Q8.

int And(int a, int b)

{

 int output;

 if(a==0 && b==0)

  output=0;

  if(a==1 && b==0)

  output=0;

 if(a==0 && b==1)

  output=0;

 if(a==1 && b==1)

  output=1;

 return (output);

}

 

Q9.

int Nor(int a, int b)

{

 int output;

 if(a==0 && b==0)

  output=1;

  if(a==0 && b==1)

  output=0;

 if(a==1 && b==0)

  output=0;

 if(a==1 && b==1)

  output=0;

 return (output);

}

 

Q10.

Min
Resistor: 82 ohm.

Recommended
Resistor = 330 ohm.

 

int ledPin=10;        // declaring and initializing a
variable   ledPin  for output port;

int delay_ms = 1000;  // declaring and initializing a variable  delay_ms 
for delay;

 

// the setup function runs once
when you press reset or power the board

 

void setup() {

 
// initialize digital pin ledPin as an output.

   

 
pinMode(ledPin, OUTPUT);

}

 

 

// the loop function runs over and
over again forever

 

void loop() {

 

 
digitalWrite(ledPin, HIGH);   //
turn the LED on (HIGH is the voltage level)

 
delay(delay_ms);                      
// wait for a second

 

 
digitalWrite(ledPin, LOW);    //
turn the LED off by making the voltage LOW

delay(delay_ms);                       // wait for a second

 

}

 

Q11.

// Define the pins being used

int pin_LED = 10;

int pin_switch = 3;

 

// variables used to control the
LED

boolean LEDstatus = LOW;

 

 

void setup()

{

   
Serial.begin(9600);

   
pinMode(pin_LED, OUTPUT); 

   
digitalWrite(pin_LED,LOW);

   
pinMode(pin_switch, INPUT);

 

   
attachInterrupt( digitalPinToInterrupt(pin_switch), blink, RISING );

}

 

void loop()

{

}

 

void blink()

{

      if (LEDstatus == LOW) { LEDstatus = HIGH;
} else { LEDstatus = LOW; }  

      digitalWrite(pin_LED, LEDstatus);

}

LED off

Turns LED On

Main Loop

Start

Initialization

Wait for push
button to be pressed

Button Pressed

LED on

LED Status?

Turns LED Off

Interrupt

 

The difference
is in the time spent. When you do a polling, it means you are regularly checking that a bit is set or
not. This takes time and you can do a lot of things before checking again and
see that the bit actually changed. When working on interruption, the program continues running and do anything it
wants and when the event occurs, your software is stopped and execute the
interrupt to deal with the event. It means you react immediately to the event
and that you don’t need to check if the bit is set or not. With interrupt, you have a better reaction
time as the event triggers the interrupt. With polling, you are talking CPU load to do a check that are usually
not met, until the check works.

 

Q12.

A blood pressure meter, or sphygmomanometer, is a
device that is used to measure blood pressure. The meter is used with an
inflatable cuff for restricting blood flow and a pump to inflate the cuff.

Digital blood pressure meters typically measure both systolic and diastolic
pressures by an oscillo-metric detection method, using a piezoelectric pressure
sensor.

Power supply is supplied by either batteries or a USB.

The 5/6V is then passed through a regulator to make the voltage 3.3v. There are
multiple components which help to measure. The pressure sensor keeps receiving
data to see how much the pressure is. The signal is passed through an amplifier
and then some analogue signal conditioning takes place. The microcontroller
then processes the data and then sends digital signal to the air pump control
and the solenoid valve control to tell them to add more air or release air. This
data is being displayed as soon as the microcontroller processes it. So, the
user can see values/numbers which they can understand. Instead of being shown digital
signals. The data is displayed on the LCD. This is part of the user interface.

The buzzer sounds when the operation is complete. This is for ease of use with
the user. The final part of the user interface is touch pads. This allows the
user to change functions/display types and start and stop the operation of the
device. Debugging is performed by PicKit Serial. This device has two methods of
communication, which are Wi-Fi and Bluetooth. This increases the ease of compatibility
with the other devices the user has. Finally, the data is logged via a USB to
the computer, to allow bugs or errors to be investigated.

 

Start

Initialization

Checking
the push Buttons

Inflating
cuff

Enable ADC
sample list 1 interrupts for taking ADC samples from CH1 and CH2
channels

Processing
ADC data

Release Air

Calculating
blood pressure and pulse rate

Display rate

Main Loop

Start Button Pressed