Categories
RTOS in Embedded

Top 10 RTOS interview questions with answers 2021

In this article we will see Top 10 RTOS interview questions with answers in 2021 so Let’s see:

1) Explain in detailed what is embedded system ?

An embedded system is a part of a larger system or machine in engineering wold.
or It is a system with a dedicated function within a larger electrical or mechanical system.

python interview question

2) Which is essential components of embedded system?

  • Following are the Essential components of embedded system which includes
  • Timers
  • I/O circuits
  • System application specific circuits
  • Hardware
  • Processor
  • Memory
  • Software
  • It ensures the availability of System Memory
  • It checks the Processor Speed availability
  • The need to limit power lost when running the system continuously
  • Real Time Operating System

3) Explain how to I/O devices are classified for embedded system?

The I/O devices of embedded system are classified into two Types
Serial
Parallel

SerialInputOutput
Synchronous :Audio/VideoAudio/Video
Asynchronous :Mouse/KeyboardPrinter/Modem
I/O devices of embedded system
ParallelInputOutput
Single BitRotation, Threshold sensorsPulses to external circuit
Multi BitVp from ADC, sensorsLCD, Printer
I/O devices of embedded system

4) Explain in detailed Why embedded system is useful?

With embedded system, it is possible to replace dozens or even more of timing circuits, output drivers, hardware logic gates, input buffers, etc. with a relatively cheap microprocessor.

5) Explain what are real-time embedded systems (RTOS)?

Real-time embedded systems (RTOS) are computer systems that monitor, respond or control an external environment. This environment is connected to the computer system through different actuators, sensors, and other input-output interfaces or devices.

6) Explain what is microcontroller in embedded System ?

The microcontroller is a self-contained system with different peripherals, memory and a processors that can be used as embedded system.

7) difference between microprocessor and microcontroller?

Microprocessor is managers of the resources like I/O, memory which lie outside of its architecture

Microcontroller have I/O, memory, etc. built into it and specifically designed for control

8) What does DMA address will deal with?

DMA address is nothing but physical addresses. It is a device which directly drives the data and address bus during data transfer. So, it is purely physical address.

9) what are buses used for communication in embedded system?

For embedded system, following buses used for communication

  • CAN: It is used in automobiles with centrally controlled network
  • I2C: It is used for communication between multiple ICs
  • USB: It is used for communication between CPU and devices like mouse, etc.
  • While ISA, EISA, PCI are standard buses for parallel communication used in PCs, computer network devices, etc.
10) List out various uses of timers in embedded system?

Timers in embedded system are used for multiple purposed

  • Between two events finding the time interval
  • Time slicing for various tasks
  • Time division multiplexing
  • Scheduling of various tasks in RTOS
  • Real Time Clock (RTC) for the system
  • Initiating an event after a preset time delay
  • Initiating an even after a comparison of preset times
  • Capturing the count value in timer on an event

Summary :

In this article we saw Top 10 RTOS interview questions with answers 2021 so about this section you have any query then free to ask me

Categories
RTOS in Embedded

How to 8 Bit Mode LCD Interfacing with 8051 microcontroller using Keil C

We know that Liquid Crystal Display (LCD) is a mostly used electronic display module and having a wide range of applications such as Timer, mobile phones, calculators, laptops, etc. 16×2 character lcd display is very basic module which is commonly used in electronics devices and projects.
It can display 2 lines of 16 characters.

Liquid Crystal Display

Interfacing 16×2 LCD with 8051 microcontroller using Keil is complex because there is no powerful libraries available in Keil C. To solve this problem we have developed a LCD library which includes commonly used features, you just need to download header file and use it.

Circuit Diagram For 8 Bit Mode LCD Interfacing with 8051 microcontroller

Below Block Diagram or Circuit Diagram show How to Connect 8 Bit Mode LCD Interfacing with 8051 microcontroller

Circuit Diagram For 8 Bit Mode LCD Interfacing with 8051 microcontroller

Source Code for Interfacing LCD with 8051 microcontroller using Keil C

#include<reg52.h> //including sfr registers for ports of the controller
#include<lcd.h> // Can be download from bottom of this article

//LCD Module Connections
sbit RS = P0^0;
sbit EN = P0^1;
sbit D0 = P2^0;
sbit D1 = P2^1;
sbit D2 = P2^2;
sbit D3 = P2^3;
sbit D4 = P2^4;
sbit D5 = P2^5;
sbit D6 = P2^6;
sbit D7 = P2^7;
//End LCD Module Connections
void Delay(int a)
{
  int j;
  int i;
  for(i=0;i<a;i++)
  {
    for(j=0;j<100;j++)
    {
    }
  }
}
void main()
{
  int i;
  Lcd8_Init();
  while(1)
  {
    Lcd8_Set_Cursor(1,1);
    Lcd8_Write_String("electroSome LCD Hello World");
    for(i=0;i<15;i++)
    {
      Delay(1000);
      Lcd8_Shift_Left();
    }
    for(i=0;i<15;i++)
    {
      Delay(1000);
      Lcd8_Shift_Right();
    }
    Lcd8_Clear();
    Lcd8_Write_Char('e');
    Lcd8_Write_Char('S');
    Delay(3000);
  }
}

Note that : You can also download header file, keil c files and proteus files etc here LCD interfacing with 8051 using Keil C

Summary :

In this article we saw How to 8 Bit Mode LCD Interfacing with 8051 microcontroller using Keil C.

Categories
RTOS in Embedded

How to 12 volt dc motor interfacing with 8051 using L293D

We know that in engineering life we used DC motor with 8051 microcontroller so For the beginner one question is Commonly ask How to connect DC motor to controller ?
or Can we directly connect DC motor to pic controller ? Answer is NO. because for 12 volt dc motor required 12v input supply it not drive directly on 15 mA at 5v

How to drive DC motor with 8051 microcontroller

To remove or overcome this problem We can use L293D driver IC.
Explain L293D Driver IC
L293D Driver IC is a Quadruple Half H-Bridge driver and it solves the problem completely. You not need to connect any transistors, resistors or diodes. We can easily control the switching of L293D using a microcontroller.

Block Diagram of dc motor interfacing with 8051 using L293D

Below block diagram or schematic show you how to connect dc motor to controller through L293D

How to 12 volt dc motor interfacing with 8051 using L293D

As shown in figure EN1 is used to enable pair 1 (IN1-OUT1, IN2-OUT2) and EN2 is used to enable pair 2 (IN3-OUT3, IN4-OUT4). We can drive here only one DC motor. You can connect second DC Motor to driver pair 2 according to your needs.

Source code for Drive 12 volt dc motor using L293D

#include<reg52.h>
#include<stdio.h>

void delay(void);

sbit motor_pin_1 = P2^0;
sbit motor_pin_2 = P2^1;

void main()
{
  do
  {
    motor_pin_1 = 1;
    motor_pin_2 = 0; //Rotates Motor Anit Clockwise
    delay();
    motor_pin_1 = 1;
    motor_pin_2 = 1; //Stops Motor
    delay();
    motor_pin_1 = 0;
    motor_pin_2 = 1; //Rotates Motor Clockwise
    delay();
    motor_pin_1 = 0;
    motor_pin_2 = 0; //Stops Motor
    delay();
  }while(1);
}

void delay()
{
  int i,j;
  for(i=0;i<1000;i++)
  {
    for(j=0;j<1000;j++)
    {
    }
  }
}

Compiler Output Windows :

Below windows shows that source code compile with zero error and Warning

How to 12 volt dc motor interfacing with 8051 using L293D

Explanation About Control Signals and Motor Status

P2.0/IN1P2.1/IN2Motor Status
LOWLOWStop
LOWHIGHClockwise
HIGHLOWAnti-clockwise
HIGHHIGHstop
Explanation About Control Signals and Motor Status

Summary :

In this article we saw How to 12 volt dc motor interfacing with 8051 using L293D so about this section you have any query then free to ask me

Categories
RTOS in Embedded

serial communication protocols in embedded c

Introduction to serial communication in embedded :

In Embedded Systems, Communication means the exchange of data in the
form of bits by some set of defined rules between two micro – controller.
Serial Communication in embedded systems is the way of exchanging data
using different methods in the form of serial digital binary pulses where
binary one represents logic High or 5 volts and binary zero represents logic
Low or 0 volts.
Serial communication sends data bit by bit at one clock pulse which makes
the communication speed slow as compared to parallel communication.
Since serial communication sends data bit by bit,therefore it requires one
wire to transmit the data and fewer input-output lines. It is preferred for
long distance communication.
Serial Communication is popular because most computers have one or
more serial ports , so no extra hardware is needed other than a cable to
connect the instruments to the computer or two computers together.

serial communication protocols in embedded c

Transmission modes of serial communication in embedded:

Serial communication has many forms based on types of modes which are
as follow:-
a. Simplex mode
It is a one-way communication technique. Only one client either receiver
or sender is active at a time. Ex-radio, TV.
b. Half Duplex mode
In this mode, both the clients receiver and the sender are active but not
at a time. Ex- Internet.
C. Full Duplex mode
Here, both the clients, sender and the receiver can transmit and receive
At the same time. Ex-smartphone.

SerialCommunication classification on the basis of Clock Synchronization

a. synchronous serial communication

In this type of communication both transmitter and receiver share a
common clock to remain in sync with each other.
b. Asynchronous serial communication
This type of serial communication does not require any common clock
source between the transmitter and receiver. Both sides work according
to their independent clock.

  1. How does serial Data Transfer work?
    It requires mainly four rules.
    a. Baud rate control
    b. Framing
    c. synchronization and asynchronization
    d. Error control
    e. full or half –duplex operation

Summary :

In this article we saw serial communication protocols in embedded c so about this secion you have any query then free to ask me

Categories
RTOS in Embedded

how to write and run embedded c program in keil software

Hello everyone, we know that most of the embedded developer use 8051 microcontroller to create simple to complex project. Keil software provide user friendly interface and update all support file up to date on time so mostly we are use keil version for 8051.

Steps to run embedded c program in keil software

We are commonly use 7 steps to run embedded c program in keil software

Following some important steps to run embedded c program in keil software :

Step 1 : Open keil software (micro version 5)

we need to install keil micro version 5 software from it’s official site

click on keil software for download purpose setup file is no much big i.e. only 94 mb

run embedded c program in keil software

Step 2nd : Create new project in keil software

After successful installation of software we need to create our new project so for that click on project Tab and select New microvision project

Create new project in keil software

After the selection of this file we need to give name for the project file

Create new project file in keil software

In this article we are give file name as sachinexd

Step 3 : selection of Target device in keil

selection of Target device in keil

The next step is select device for Target so in this article we use AT89C52 Target device. In description window we are clearly visible what is property of the selected devices.

add file to project in keil

we know that it is possible to write code in embedded c as well as assembly language so if we want to write code in assembly language then we are click on No Tab if write this code in embedded c then click on yes tab.

In this article we click on Yes because we are use here assembly language

Step 4 : Add New Item group in keil software

Add New Item group in keil software

Next step is Add New Item group in keil software so for that click right on Source group 1 and select Add New Item to group ‘source Group 1’

Following windows are open after the Add New Item group in keil software so select C file (.c) and give the name for this file . in below file we give simplepro name and add this file to source group.

Create new c source file and add this file to project in keil

Step 5 : how to write embedded c program in keil software

At the left hand side we see created different Target file so for write embedded code click on file and click on new.

Know we are ready to write embedded c code .

how to write embedded c program in keil software

Here we are write simple embedded code for practice purposed.

Step 6 : How to Build the embedded c program in keil

after the write source code we need to compile this program so click on build program menu . then compiler execute our program one by one line and show result as like below pop-up window

How to Build the embedded c program in keil

Build output show zero error and zero warning

Step 7 : How to use Start Stop debug section

For debug purpose we can use Start/ Stop debug section Tab

Start stop debug section

Summary :

In this article we saw how to write and run embedded c program in keil software so about this article you have any query then free to ask me

Categories
RTOS in Embedded

Introduction to Watchdog timer and Significance of watchdog timer in embedded

Introduction to Watchdog timer in embedded c

Watchdog timers are hardware count down timers, which when enabled in microcontrollers will generate a microcontroller reset (or) interrupt if the program running on the microcontroller fails to reload the watchdog timer within the predetermined time interval. Therefore, it is the responsibility of the running program to reload the watchdog timer before it reaches zero, or else the watchdog timer circuitry will reset the system. 

Significance of watchdog timer in embedded

The reloading of the watchdog timer value by the software is called kicking the watchdog. The watchdog timers can be clocked from the internal RC oscillators, RTC oscillators. When the watchdog timer underflows, the program counter will start from 0x0000 0000 as in the case of external reset. Some systems refer the watchdog timers as Computer Operating Properly Timer (COP Timer). Most microcontrollers have the watchdog timers in their hardware.

Embedded systems need to self-reliant since it is not possible for someone to reboot the whole system when a problem occurs. If there are any problems in the systems that are used in space probes, satellites etc., no one is there to reset the system.  Here is where the watchdog timer comes into play. If the system fails to reload the watchdog timer before it hits zero, the watchdog timer circuitry will reset the whole system presuming there is a malfunction. 

There are a several ways an embedded system can hang. For instance, the memory might get corrupted and the program can get stuck in an infinite loop; a hardware component might not work properly and not respond to requests; a high priority task might take a lot of CPU cycles that the low priority task might not run at all resulting in cases like data loss. 

Now for example consider a watchdog timer working on 4kHz clock. Let us assume the time for finishing a task is 100ms. 

Given 4kHz, one tick equals = ¼ = 0.25 ms

For 100ms the watchdog timer ticks 400 times. So, if the system does not reload the watchdog timer before it ticks 400 times, the system will reset fully. This is how the watchdog timers are implemented in embedded systems. The watchdog timers can be internal watchdog timers, or external watchdog timers. 

Significance of watchdog timer in embedded c

In real-time operating systems, the watchdog timers ensure that each task is completed within the given time limit. This way it is helps in better functioning of the system. The watchdog timers can also be used in computers, where it can be used to limit the CPU time available for any untrusted piece of code and thus preventing attacks like the denial-of-service attack.

The output of the watchdog timer is directly given to the microcontroller’s reset signal. This way, if the watchdog timer is not reloaded, the microcontroller resets. Every watchdog timer has a counter register whose value is set by the control status register of the watchdog timer. When executing the program loop, the counter register count will be cleared. If the program has an error in any instruction, the counter register will not be cleared which then provides signal to reset the microcontroller. As told earlier there are two types of watchdog timers: Internal watchdog timers and External watchdog timers. Internal watchdog timers are those that are built-in the microcontroller while manufacturing. These use software instructions to enable the timer and reboot the microcontroller. If the watchdog timer is not in-built in a microcontroller, externally these are connected to the microcontroller. These are enabled through hardware connections between the microcontroller and the timer. The external watchdog timers have separate clock for themselves. This means there will be better reliability since a separate clock is used.

Watchdog timers have many advantages. They are used in fault detection in the system, so no human intervention is needed to reboot the system. Since humans cannot go to all the places, where the embedded systems are used, watchdog timers make the whole system self-reliant. The use of watchdog timers results in better performance of the whole system. This saves the time and cost. The Arduino uses Atmega328p microcontroller. Watchdog timer can be implemented in Arduino using Arduino IDE and the watchdog timer library. Careful measures must be taken when implementing watchdog timers in an embedded system. The timeout of the watchdog timer must be calculated carefully since wrong timeout can result in improper working of the system. The watchdog timers can not only be used for resetting the system. Due to environmental noises, electrical noises, the software running might get corrupt and stop immediately. At this time, the watchdog timer when connected to the reset line can reset the system. It can also be used to switch on alarms to notify the fault, stop the working of the component that caused the fault in the system. This way the watchdog timers are used in embedded systems.

Summary :

In this section we saw Introduction to Watchdog timer and Significance of watchdog timer in embedded so about this section you have any query then free to ask me

Categories
RTOS in Embedded

keyboard switches matrix in embedded c

Switch Matrix in embedded c

A keyboard matrix is a circuit used in most electronic computer keyboards in which the key switches are connected by a grid of wires. Without a matrix circuit, each switch would require its own input pin to the controller. Keyboard switch matrices are arranged in rows and columns. if a key is pressed, a column wire makes contact with a row wire and completes a circuit. This closed circuit, triggers the algorithm in the controller and output is given.

keyboard switches matrix in embedded c

CODE FOR BASIC BUTTON MATRIX AND TO CONTROL LEDs.

//4*3 Switch Matrix

//all 12 outputs are given with a LED turned ON for 0.8 second

//LDR* are the switches

//LDR1-LDR3 is the row

//LDR4-LDR7 is the column

//LED* are the outputs

//The output can be changed based of the needs



int LDR1 = A0;

int LDR2 = A1;

int LDR3 = A2;



int LDR4 = A3;

int LDR5 = A4;

int LDR6 = A5;

int LDR7 = A6;



int LED1 = 13;

int LED2 = 12;

int LED3 = 11;

int LED4 = 10;

int LED5 = 9;

int LED6 = 8;

int LED7 = 7;

int LED8 = 6;

int LED9 = 5;

int LED10 = 4;

int LED11 = 3;

int LED12 = 2;



void setup()



{

pinMode(LDR1, INPUT);

pinMode(LDR2, INPUT);

pinMode(LDR3, INPUT);

pinMode(LDR4, INPUT);

pinMode(LDR5, INPUT);

pinMode(LDR6, INPUT);

pinMode(LDR7, INPUT);

pinMode(LED1, OUTPUT);

pinMode(LED2, OUTPUT);

pinMode(LED3, OUTPUT);

pinMode(LED4, OUTPUT);

pinMode(LED5, OUTPUT);

pinMode(LED6, OUTPUT);

pinMode(LED7, OUTPUT);

pinMode(LED8, OUTPUT);

pinMode(LED9, OUTPUT);

pinMode(LED10, OUTPUT);

pinMode(LED11, OUTPUT);

pinMode(LED12, OUTPUT);

}

void loop()

{

if ((analogRead(LDR1) < 150) && (analogRead(LDR4) < 150))

{

digitalWrite(LED1, HIGH);

delay(800);

digitalWrite(LED1, LOW);

}

else if ((analogRead(LDR1) < 150) && (analogRead(LDR5) < 150))

{

digitalWrite(LED2, HIGH);



delay(800);

digitalWrite(LED2, LOW);

}

else if ((analogRead(LDR1) < 150) && (analogRead(LDR6) < 150))

{

digitalWrite(LED3, HIGH);

delay(800);

digitalWrite(LED3, LOW);

}

else if ((analogRead(LDR1) < 150) && (analogRead(LDR7) < 150))

{

digitalWrite(LED4, HIGH);

delay(800);

digitalWrite(LED4, LOW);

}

else if ((analogRead(LDR2) < 150) && (analogRead(LDR4) < 150))

{

digitalWrite(LED5, HIGH);

delay(800);

digitalWrite(LED5, LOW);

}

else if ((analogRead(LDR2) < 150) && (analogRead(LDR5) < 150))

{

digitalWrite(LED6, HIGH);

delay(800);

digitalWrite(LED6, LOW);

}

else if ((analogRead(LDR2) < 150) && (analogRead(LDR6) < 150))

{

digitalWrite(LED7, HIGH);

delay(800);

digitalWrite(LED7, LOW);



}

else if ((analogRead(LDR2) < 150) && (analogRead(LDR7) < 150))

{

digitalWrite(LED8, HIGH);

delay(800);

digitalWrite(LED8, LOW);

}

else if ((analogRead(LDR3) < 150) && (analogRead(LDR4) < 150))

{

digitalWrite(LED9, HIGH);

delay(800);

digitalWrite(LED9, LOW);

}

else if ((analogRead(LDR3) < 150) && (analogRead(LDR5) < 150))

{

digitalWrite(LED10, HIGH);

delay(800);

digitalWrite(LED10, LOW);

}

else if ((analogRead(LDR3) < 150) && (analogRead(LDR6) < 150))

{

digitalWrite(LED11, HIGH);

delay(800);

digitalWrite(LED11, LOW);

}

else if ((analogRead(LDR3) < 150) && (analogRead(LDR7) < 150))

{

digitalWrite(LED12, HIGH);

delay(800);

digitalWrite(LED12, LOW);

}}

Summary :

In this article we saw keyboard switches matrix in embedded c so about this section you have any query then free to ask me

Name of intern who share this task : Pratham bhomkar

Categories
RTOS in Embedded

Sensing Devices in Embedded C code

Sensing devices also known as sensors is widely used in almost all applications of embedded systems whether it be Rain sensing wipers in cars or sensing an upcoming missile from opponent. Sensors are everywhere. The use of sensors is to minimize human efforts and efficiently use the time so that upcoming situation can be handled well in advance.

Today a large variety of sensors are connected through internet, this field is booming by the name of IOT i.e. Internet of things. What happens in IOT is that sensors send the real time value of data to the system which can be collected by the user at any point of time provided with Internet connectivity at both ends.

Sensing Devices in Embedded C code

which is Sensing Devices in Embedded

Now to gather the information provided by the sensor, we need to program the sensors and microcontroller or microprocessor by a means of language which is understood by the computer. Here the gap is bridged by using a variety of Programming languages like Python, C, assembly, etc. Widely Embedded C is used. C language when used in the application of Embedded System is referred to Embedded C.

As we discussed in the above section (ADC0808), sensors send the values in analog but computers only understand Binary i.e. the digital language. So we need an interfacing medium that is ADC’s which we have studied above.

Apart from ADC we need a sensing medium which is created after a lot of research and practice which actually senses the physical aspect of the environment and convert into useful graphs which can be later processed by the microcontroller.

For eg. as you can see in the image of the MQ-135 Gas sensor , this is the main sensor, which extracts the data of air quality in the form of graph and later sampled to create an array of binary values. So to interface the tis gas sensor to the microcontroller we need to first study the data sheet, Pin description to understand the requirements of the device. After that we need to create libraries or function that would extract the data from physical world and give it back to us in the usable form.

Once we have all the resources we can start programming. In programming first we need to assign all the pins to the microcontroller bins so that we can communicate it later easily.(Usually we use Sbit ) Next step is to write the function and set values of register as per preference. Now we need to run the function and display the value. Now there are 2 ways to display – Serial Monitor or LCD displays. LCD displays are used when building an autonomous system. Serial Monitor is usually used for testing circuits. So we need to display it on LCD we need to write a code again to interface with microcontroller. We can use a library in case of Arduino which is a development board. So instead of writing code in binary or assembly we use C language to ease out the difficulty of understanding of the code at user end. Because Human tend to learn C language easily as compared to Binary or coding via instruction sets.

Summary :

In this article we learn Sensing Devices in Embedded C code so about this section you have any query then free to ask me

Categories
RTOS in Embedded

how bit fields used and how it is stored in memory database

In programming terminology, a bit field is a data structure that allows the programmer to allocate memory to structures and unions in bits in order to utilize computer memory in an efficient manner.

Here is a code in C that illustrates the implementation of a structured time without the use of bit fields:
CODE:

how bit fields used and how it is stored in memory database
#include <stdio.h>
struct time
{
unsigned int hours;
unsigned int minutes;
unsigned int seconds;
}; 
int main()
{

struct time t = {11, 30, 10}; 
printf("Intern Task");
printf("The time is %d : %d : %d\n", t.hours, t.minutes, t.seconds);
printf("The size of time is %ld bytes.\n", sizeof(struct time));
return 0; 
}

OUTPUT:
Intern Task
The time is 11: 30: 10
The size of time is 12 bytes.

Clearly, we know that, for a 24-hour clock, the range of hours should be from 0 to 23, minutes, and seconds should be from 0 to 59.So, that we could apply bit memory concept on the above code and make it use less space.
In the above code the size is 12 bytes.

Here is a code in C that illustrates the use of bit-fields with the help of the previous example:

#include <stdio.h>
struct time
{
unsigned int hours: 5; // Size restricted to 5 bits
unsigned int minutes:6; // Size restricted to 6 bits
unsigned int seconds:6; // Size restricted to 6 bits
}; 
int main()
{

struct time t = {11, 30, 10}; // Here t is an object of the structure time
printf("Intern Task");
printf("The time is %d : %d : %d\n", t.hours, t.minutes, t.seconds);
printf("The size of time is %ld bytes.\n", sizeof(struct time));
return 0; 
}
OUTPUT:
Intern Task
The time is 11: 30: 10
The size of time is 4 bytes.

Summary :

In this article we saw how bit fields used and how it is stored in memory database so about this article you have any query then free to ask me

Categories
RTOS in Embedded

difference between fifo and memory in embedded python

fifo in embedded c program example

FIFO :Every memory in which the data word that is written first also comes out first when the memory is read is a first-in first-out memory.

 FIFO – First in first out memory. Data read /write will happen in an order. Each time the address pointer will increment by one. FIFO empty and full flags will indicate the status of fifo. FIFO will clear the data if you read it. RAM – Random access memory(Volatile). We can read/write from any location of a RAM. But in FIFO you don’t have this freedom and it will always start from one address and the address pointer keeps on incrementing. Stored data in a RAM will be there even after you read the data, but in FIFO, if you read one address, the data will get cleared.

Types of FIFO

Types- There are three kinds of FIFO

• Shift register: FIFO with an invariable number of stored data words and the necessary synchronism between the read and write operations because a data word must be read every time.

• Exclusive read/write FIFO: FIFO with a variable number of stored data words and, because of the internal structure,the necessary synchronism between the read and the write operations.

• Concurrent read/write FIFO: FIFO with a variable number of stored data words and possible asynchronism between the read and write operation.

Memory :It refers to the processes that are used to acquire, store, retain, and later retrieve information. There three major processes involved in memory are encoding, storage and retrieval.

Types of Memory in embedded c

Types of Memory in embedded c

  The three main forms of memory storage are,

● sensory memory

● short-term memory 

● long-term memory

Sensory memory is not consciously controlled and it also allows individuals to retain impressions of sensory information after the original stimulus has ceased.

Sensory Memory:

    Sensory memory is the earliest stage of memory. At this stage, sensory information from the environment is stored for a very brief period of time, generally for no longer than a half-second for visual information and 3 or 4 seconds for auditory information. We attend to only certain aspects of this sensory memory, allowing some of this information to pass into the next stage and thus be called short-term memory.

Short-Term Memory:

    Short-term memory which is also known as active memory. While many of our short-term memories are quickly forgotten, attending to this information allows it to continue to the next stage. Most of the information stored in active memory will be kept for approximately 20 – 30 seconds. The term short-term memory is often used interchangeably with working memory, which refers to the processes that are used to temporarily store, organize, and manipulate information.

Long-Term Memory :

    Long-term memory refers to the continuing storage of information. The information is largely outside of our awareness but can be called into working memory to be used when needed. Some of this information is fairly easy to recall, while others are much more difficult to access.

Losing Memory:

    Forgetting is a surprisingly common event. Just consider how often you forget someone’s name or overlook an important appointment. Why do we forget information we have learned in the past? There are four basic explanations for why forgetting occurs:

● Failure to store

● Interference

● Motivated forgetting

● Retrieval failure

    During research it was found that one of the critical factors that influence memory failure is time. Information is often quickly forgotten, more importantly if people do not actively review and rehearse the information.

    Sometimes information is simply lost from memory and it was never stored correctly in the first place. Sometimes memories compete with one another, making it difficult to remember certain information. In other cases, people actively try to forget things that they simply don’t want to remember.

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

    FIFO does not have address lines.

    RAM is used for storage purposes whereas FIFO is used for synchronization purposes.

FIFO does not have address lines.

    RAM is used for storage purposes whereas FIFO is used for synchronization purposes.