You are on page 1of 33

EMBEDDED SYSTEMS

INTERNSHIP
Microwave Oven Simulation
College: Sree Vidyanikethan Engineering College
Rangampeta , Tirupati.
PRESENTED BY:
Patil Nagalakshmi
Email:patilnagalakshmi9347@gmail.com
Neelam Lahari
Email:neelamlahari315@gmail.com
Chigullarevu Hema
Email: chigullarevuhema@gmail.com
TOPICS LEARNT DURING THE INTERNSHIP
• Introduction to C
• Variables and Data Type
• Conditional statements , loops and operators
• Arrays and Pointers
• Functions and Strings
• Storage classes
• Introduction to Embedded systems
• MPLAB IDE, XCB, PICSIMLAB
• Introduction to various peripherals of PIC 16F877A
• Interfacing various peripherals of PIC 16F877A
CONTENTS

• What is Microwave Oven?


• Requirements
• Microcontroller and Microprocessor
• PICSIMLAB
• CLCD
• Matrix Key Pad(MKP)
• ISR
• Timer
• Project Implementation
Introduction to C
• C language is a fundamental programming language widely used in
Embedded systems development.
• C is a powerful and Versatile programming language for embedded
systems.
• C language offering the control, efficiency, and portability necessary
for developing reliable and efficient embedded applications.
• It remains a popular choice for embedded software developers
around the world.
Variables and Data Types
• Variables and Data Types in embedded systems plays a crucial role in
managing data and optimizing resource usage.
• VARIABLES : A variable is used hold a value, can be varied at any time
Each variable must be defined only once, but it can be used multiple
times with variable assignments in the program.
• Data Type: Data Types are used to specify the kind of data that a
variable can hold and the way in which it is represented in memory.
• Ex: int a;
• Int – Datatype which tells about how much space the variable will
occupy in memory.
• a – name of the variable which will be assigned to a value
• Semi-colon(;) – will help the compiler to separate the sentence
Data Types
S.No. Data type Format Size Acceptable Example
Specifiers

1. int %d 2 or 4 bytes Both positive 0,-2,8,9,97


and negative

2. float %f 4 bytes fractional 5.7,9.7

3. char %c 1 byte Single character A,k

4. double %lf 8 bytes fractional 7.85,908.65


Conditional Statements ,loops and operators
For loop While loop Do while loop
Arrays

• Arrays are used to store multiple values in a single variable, instead of


declaring separate variables for each value.
• To create an array, defines the data type (like int)and specify the
name of the array followed by square brackets [ ].
• All arrays consist of contiguous memory locations, the lowest address
corresponds to the first element and the highest address to the last
element.
• Ex: int myNumbers[] = {25,56,67,78,89}
Pointers
• A pointer is a variable that stores the memory address of another
variable as its value.
• A pointer variable points to a datatype (like int) of the same type and
is created with the * operator ,the address of the variable you are
working with this is assigned to the pointer.
• Syntax: datatype*var_name;
• int myAge=21;
• Printf(“%d”,myAge);
• Output:21
Functions
• Function is basically set of instructions that takes two inputs performs
some computation and produces output.
• return_ type function_ name(set_ of_ inputs);
• return type is the output returned by the function, an output could be
int type, char type, or float type.
• Function name indicates the name of the function.
• Set of inputs provides input to the information to perform
compilation
Strings
• Strings are arrays of chars, String literals are words surrounded by double
quotation marks.
“This a static string”
• The string in C programming language is actually a one-dimensional array
of characters which is terminated by a null character “\0”.
• A string can be declared as a character array or with a string pointer.
char greeting[6]={ ‘H’, ’e’, ’l’, ’l’, ‘o’,’\0’};
or
char greeting[]=“Hello”;
or
char *greeting =“Hello”
Storage Classes
• In C language , each variable has a storage class which decides scope,
visibility and lifetime of that variable.
• The storage class determines the part of the memory where the
variable would be stored.
• There are two storage locations in computer :CPU Register & Memory
• The following are most oftenly used in C programming:
1. Automatic Variables
2.External Variables
3. Static Variables
4. Register Variables
Storage Specifier Storage Initial Value Scope Life

auto Stack Garbage Within block End of block

extern Data segment Zero Global multiple Till end of program


files

static Data segment Zero Within block Till end of program

register CPU register Garbage Within block End of block


Introduction to Embedded Systems
• An Embedded system is a special purpose
computer system designed to perform certain
dedicated functions.
• It is usually embedded as part of a complete
device including hardware , software and
mechanical parts
• Significance: Due to their compact size, low
cost and simple design aspects made
embedded systems very popular and
encroached into human lives and have become
indispensable. They are found everywhere from
kitchenware to space craft.
Block diagram of Embedded Systems:
Applications of Embedded Systems:
PIC 16F877A

• PIC16F877A is a 40 pin microcontroller ,


designed using RISC architecture.
• Manufactured by Microchip and is used
in embedded projects.
• 5 ports on it starting from Port A to PortE
• Has 3 Timers , two of 8-bit timers while
one is 16-bit
• Widely used in modern Electronics
applications
What is Microwave Oven?
• A Microwave oven is a relatively small,
boxlike oven that raises the temperature
of food by subjecting it to a high-
frequency electromagnetic field.
• The microwaves are absorbed by water,
fats, sugars and certain other molecules,
whose consequent vibrations produce
heat.
How a Microwave oven works
• There are several modes in various Microwave oven.
• We are going to implement 4 modes
1. Micro mode
2.Grill mode
3.Convection mode
4.Start
Micro mode:
• This is the standard mode for heating or cooking food.
• It emits microwaves that make water molecules that make water
molecules in the food vibrate, creating heat to cook or warm the food.
• It uses a maximum power of 900W
• It is the maximum time that you set for cooking 60 mins.
Grill Mode:
• Which uses a heating element or grill to brown or crisp the top of your food.
• Common uses of the grill mode include i) browning the top of casseroles
ii) Melting cheese on dishes
iii)Toasting the surface of sandwiches
• Mainly used to cook meat and bread.
• User can set time as per the cooking time of the meat.
Convection Mode:
• This is a like a mini oven , uses a fan to circulate hot air so you can bake and cook.
• Excellent for baking, roasting and boiling.
• It’s versatile feature that makes a microwave oven more like a mini convection
oven.
Requirements:
• MPLAB X IDE
• XC8 Compiler
• PICSIMLAB
1)PIC 16F877A
2)16*4 CLCD
3)MKP
4)Timer 2
5)Tactile switch
Microprocessor Vs Microcontroller
PICSIM Lab
• Picsimlab is an open-source software
simulation environment for PIC
microcontrollers .
• PIicsimlab is like a special computer
program that helps people design and test
electronic things ,like a microwave oven,
before they actually built them in real life.
• You can create , test, and fix programs that
can control things like buttons, displays, and
sensors.
• It’s a useful tool for learning and developing
PIC-based projects.
Character Liquid Crystal Display(CLCD)
• Print all the ASCII values and few special symbols.
• In PICSimLab there are 2 types of display.
1.16x2 Display
2.16x4 Display
• It is most commonly used display.
• 2 types of communication modes.
1.4bit mode
2.8bit mode
• 16 interfacing line
Matrix Key Pad(MKP)

• This is a keypad in which number of tactile


switches are connected in row and column
concept.
• This is used when more number of user inputs
are required and still want to save some
controller I/O lines.
• These keypads are most commonly used in
telephones, calculators, Digital lockers
Interrupt Service Routine
• Interrupts: An interrupt is a communication process set up in a
microprocessor or a microcontroller in which an internal or external
device requests the MPU or MCU to stop the processing.
• An ISR is a software routine that hardware invokes in response to an
interrupt.
• ISR attends to the request of an interrupting source by cleaning the
interrupt flag and should save register contents that may be affected by
the code in the ISR.
• It must be terminated with the instruction RETIE.
• When an interrupt occurs ,the MPU completes the instruction being
executed then it disables GIE.
Timers
• Timer is an important application in any embedded system which is a
default peripheral which maintains the timing of an operation in sync
with a system clock or an external clock
• It has many applications such as measuring time and generating delays.
• TIMER/COUNTER is a software designed to count the time intervals
between the events.
• Resolution(Register Width):
Timer=8 bit(0 to 255)
Timer=16 bit(0 to 65535)
THANK YOU

You might also like