# Embedded Systems Interview Preparation Guide **Download PDF** Add New Question

**Download PDF**

Embedded Systems frequently Asked Questions by expert members with experience in Embedded Systems. So get preparation for the Embedded Systems job interview

## 18 Embedded Systems Questions and Answers:

### 1 :: What is the difference between fifo and the memory?

Fifo(First In Last Out) is a memory sturcture where datas can be stored and retrived (in the order of its entery only). This is a queue,wheras Memory is a storage device which can hold datas dynamically or at any desired locations and can be retrived in any order.

### 2 :: Is it necessary to start the execution of a program from the main() in C?

"Normally you are at liberty to give functions whatever

names you like, but ``main'' is special - your program

begins executing at the beginning of main. This means that

every program must have a main somewhere." Kernighan &

Ritchie - The C Programming Language 2ed. p.6

names you like, but ``main'' is special - your program

begins executing at the beginning of main. This means that

every program must have a main somewhere." Kernighan &

Ritchie - The C Programming Language 2ed. p.6

### 3 :: Write a code in C / Verilog to implement a basic FIR filter?

%program for FIR filters

disp('choose the window from the list');

ch=menu('types of

windows','bartlett','blackman','hamming','hanning','kaiser',

'rectangular');

rp=input('enter the passband ripple in db');

rs=input('enter the stopband ripple in db');

wsample=input('enter sampling frequency in hertz');

wp=input('enter the passband frequency in hertz');

ws=input('enter the stopband frequency in hertz');

wp=2*wp/wsample; ws=2*ws/wsample;

p=20*log10(sqrt(rp*rs))-13;

q=14.6*(ws-wp)/wsample;

N=1+floor(p/q);

N1=N;

if(rem(N,2)==0)

N1=N+1;

else

N=N-1;

end

switch ch

case 1

y=bartlett(N1);

case 2

y=blackman(N1);

case 3

y=hamming(N1);

case 4

y=hanning(N1);

case 5

beta=input('enter beta for kaiser window');

y=kaiser(N1,beta);

case 6

y=boxcar(N1);

otherwise

disp('enter proper window number');

end

disp('select the type of filter from the list');

type=menu('types of

filters','lowpass','highpass','bandpass','bandstop');

switch type

case 1

b=fir1(N,wp,'low',y);

case 2

b=fir1(N,wp,'high',y);

case 3

b=fir1(N,[wp ws],'bandpass',y);

case 4

b=fir1(N,[wp ws],'stop',y);

otherwise

disp('enter type number properly');

end

[h,w]=freqz(b,1,512);

magn=20*log10(abs(h));

phase=(180/pi)*unwrap(angle(h));

w=(w*wsample)/(2*pi);

subplot(2,1,1); plot(w,magn),grid on;title('magnitude

plot'); subplot(2,1,2); plot(w,phase),grid on;title('phase

plot');

disp('choose the window from the list');

ch=menu('types of

windows','bartlett','blackman','hamming','hanning','kaiser',

'rectangular');

rp=input('enter the passband ripple in db');

rs=input('enter the stopband ripple in db');

wsample=input('enter sampling frequency in hertz');

wp=input('enter the passband frequency in hertz');

ws=input('enter the stopband frequency in hertz');

wp=2*wp/wsample; ws=2*ws/wsample;

p=20*log10(sqrt(rp*rs))-13;

q=14.6*(ws-wp)/wsample;

N=1+floor(p/q);

N1=N;

if(rem(N,2)==0)

N1=N+1;

else

N=N-1;

end

switch ch

case 1

y=bartlett(N1);

case 2

y=blackman(N1);

case 3

y=hamming(N1);

case 4

y=hanning(N1);

case 5

beta=input('enter beta for kaiser window');

y=kaiser(N1,beta);

case 6

y=boxcar(N1);

otherwise

disp('enter proper window number');

end

disp('select the type of filter from the list');

type=menu('types of

filters','lowpass','highpass','bandpass','bandstop');

switch type

case 1

b=fir1(N,wp,'low',y);

case 2

b=fir1(N,wp,'high',y);

case 3

b=fir1(N,[wp ws],'bandpass',y);

case 4

b=fir1(N,[wp ws],'stop',y);

otherwise

disp('enter type number properly');

end

[h,w]=freqz(b,1,512);

magn=20*log10(abs(h));

phase=(180/pi)*unwrap(angle(h));

w=(w*wsample)/(2*pi);

subplot(2,1,1); plot(w,magn),grid on;title('magnitude

plot'); subplot(2,1,2); plot(w,phase),grid on;title('phase

plot');

### 4 :: Suppose i am using I2C communication, in that first i am sending address of thesalve and then data then after i want to read the data which i was sent recently, in that case before i am reading is there any need to send a stop bit before read?

Before reading the data if you are giving the stop bit then

the communication is stopped.so after sending the data you

will give the stop bit.

the communication is stopped.so after sending the data you

will give the stop bit.

### 5 :: What is an anti aliasing filter? Why is it required?

Anti aliasing filter reduces errors due to aliasing. If a

signal is sampled at 8 kS/S, the max frequency of the input

should be 4 kHz. Otherwise, aliasing errors will result.

Typically a 3.4kHz will have an image of 4.6 khz, and one

uses a sharp cut off filter with gain of about 1 at 3.4kHz

and gain of about 0.01 at 4.6 kHz to effectively guard

against aliasing. Thus one does not quite choose max

frequency as simply fs/2 where fs is sampling frequency.

One has to have a guard band of about 10% of this fmax, and

chooses max signal frequency as 0.9*fs/2

signal is sampled at 8 kS/S, the max frequency of the input

should be 4 kHz. Otherwise, aliasing errors will result.

Typically a 3.4kHz will have an image of 4.6 khz, and one

uses a sharp cut off filter with gain of about 1 at 3.4kHz

and gain of about 0.01 at 4.6 kHz to effectively guard

against aliasing. Thus one does not quite choose max

frequency as simply fs/2 where fs is sampling frequency.

One has to have a guard band of about 10% of this fmax, and

chooses max signal frequency as 0.9*fs/2

### 6 :: How to implement a fourth order Butterworth LP filter at 1kHz if sampling frequency is 8 kHz?

A fourth order Butterworth filter can be made as cascade of

two seond order LP filters with zeta of 0.924 and 0.383.

One can use a bilinear transformation approach for

realising second order LP filters. Using this technique

described well in many texts, one can make two second order

LP filters and cascade them.

two seond order LP filters with zeta of 0.924 and 0.383.

One can use a bilinear transformation approach for

realising second order LP filters. Using this technique

described well in many texts, one can make two second order

LP filters and cascade them.

### 7 :: IS 8085 an embedded system?

its not a embedded system...bcoz it will be a part of a

embedded system and it does not work on any software..

embedded system and it does not work on any software..

### 8 :: What is the role of segment register?

In the x86 processor architecture, memory addresses are

specified in two parts called the segment and the offset.

One usually thinks of the segment as specifying the

beginning of a block of memory allocated by the system and

the offset as an index into it. Segment values are stored

in the segment registers. There are four or more segment

registers: CS contains the segment of the current

instruction (IP is the offset), SS contains the stack

segment (SP is the offset), DS is the segment used by

default for most data operations, ES (and, in more recent

processors, FS and GS) is an extra segment register. Most

memory operations accept a segment override prefix that

allows use of a segment register other than the default

one.

specified in two parts called the segment and the offset.

One usually thinks of the segment as specifying the

beginning of a block of memory allocated by the system and

the offset as an index into it. Segment values are stored

in the segment registers. There are four or more segment

registers: CS contains the segment of the current

instruction (IP is the offset), SS contains the stack

segment (SP is the offset), DS is the segment used by

default for most data operations, ES (and, in more recent

processors, FS and GS) is an extra segment register. Most

memory operations accept a segment override prefix that

allows use of a segment register other than the default

one.

### 9 :: What type of registers contains an (INTEL) CPU?

Special function registers like accumulator,Program

controller(PC),data pointer(DPTR),TMOD and TCON (timing

registers),3 register banks with r0 to r7,Bit addressable

registers like B.

controller(PC),data pointer(DPTR),TMOD and TCON (timing

registers),3 register banks with r0 to r7,Bit addressable

registers like B.

### 10 :: Explain what is plc system?

programming logical control system