0% found this document useful (0 votes)
371 views

Microwave Oven Project Using Picsimlab

This document describes the design of a microwave oven project using a PIC microcontroller. It includes introductions to embedded systems and C programming, as well as details about the specific microcontroller, peripherals, and simulation used for the project.

Uploaded by

Dharani M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
371 views

Microwave Oven Project Using Picsimlab

This document describes the design of a microwave oven project using a PIC microcontroller. It includes introductions to embedded systems and C programming, as well as details about the specific microcontroller, peripherals, and simulation used for the project.

Uploaded by

Dharani M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

MICROWAVE OVEN PROJECT

USING PICSIMLAB

PRESENTED BY,
DHARANI M
ECE - FINAL YEAR
Content:

 INTRODUCTION
 EMBEDDED C
 MICROCONTROLLER AND MICROPROCESSOR
 REQUIREMENTS
 PERIPHERALS
 SIMULATION
INTRODUCTION:
Embedded System:
An embedded system is a combination of computer Hardware and Software designed
for a specific application/task.
It can be based on either microprocessor or microcontroller.
Example:
❑ Household appliances: Washing Machine, Smart TV’s, etc.,
❑ Automobiles (Car/Bike)- ECU, Airbags, ABS, Seat belt, Navigation System, Automatic
wiper, ADAS, etc.,
❑ Mobile Phones- GUI s/w and h/w, operating systems, cameras, microphones, USB
❑ Health Care- Medical equipments
BLOCK DIAGRAM FOR EMBEDDED SYSTEM
MICROWAVE OVEN:
Microwave Oven works on the principle of conversion of electromagnetic
energy into thermal energy.
It is an electric oven that heat and cook food by exposing it to
electromagnetic radiation.

MODES:
1. MICRO MODE
2. GRILL MODE
3. CONVECTION MODE
4. START MODE

1. MICRO MODE
It uses the maximum power of 900W.
2. GRILL MODE
It is equipped with heating coils that are responsible for grilling, roasting
and toasting food to make it brown and crispy.
3. CONVECTION MODE
Convection mode enables to set the temperature as required.
The maximum cooking time is 60 minutes.
If you want more cooking capabilities, larger cooking capacity and
have the space for it.
The baking is done by the convection mode.
User can set the oven to pre heat for a particular temperature and it
takes 3minutes to pre heat the oven.
After pre heating is done then the user can set the time as per the
requirements.
EMBEDDED C
Why C is used in Embedded System?
➢ In Embedded Systems, the program code should operate within a fixed
memory space to execute the code. C offers a level of control over the hardware.
➢ C programming produce efficient and compact code.
➢ It produces very reliable code to execute critical tasks.

Readability- It uses the meaningful variable, function names and comments to make
code more understandable.

Portability- It has the ability to run a program on different hardware and operating
systems.

Scalable- It is easier to reuse the code and can easily add modules to an existing
system.

Reliability- It helps to reduce the software bugs.


KEYWORDS:
In C programming language, there are 32 Keywords

Some of the Keywords are:


Data Types- char: char ch; (1 byte)
int num; (4 bytes)
float fnum; (4 bytes) -> Single Precision
double dnum; (8 bytes) -> Double Precision

char <= short <= int <= long

Modifiers- signed, unsigned, short, long


Qualifiers- const, volatile

For Conditional
Single iteration- if, if else, if else if and switch case
Multiple iteration- for, while, do -> Loops
Jump- break, go, continue (unconditional)
OPERATORS:
Operators are symbols that represent operations to be performed
on one or more operands.

Types of Operator:
Unary Operator (++, --)
Binary Operator
1. Relational Operators (<, <=, >, >=, ==, !=)
2. Arithmetic Operators (+, -, *, /, %)
3. Logical Operators (&&, ||, !)
4. Bitwise Operators (&, |, <<, >>, ~, ^)
5. Assignment Operators (=, +=, -=, *=, /=, %=)
Ternary Operator(?:)
ARRAY- Collection of same data type.
POINTERS- To store the memory address of other variables, functions or
even other pointers.
FUNCTION- It is a block of code which only runs when it is called.
PARAMETERS- The variables that are defined during a function
declaration.
STORAGE CLASSES- Used to describe the features of a variable/ function.
- auto, extern, static-> local & global, register
PREPROCESSOR DIRECTIVES- Preprocessor programs provide preprocessor directives
that tell the compiler to preprocess the source code before compiling.

#define-Used to define a macro.


#undef-Used to undefine a macro.
#include-Used to include a file in the source code program.
#ifdef-Used to include a section of code if a certain macro is not
defined by #define
#if-Used for the specified condition.
#else-Alternate code that executes when #if fails.
#endif-Used to mark the end of #if,#ifdef and #ifndef.
MICROCONTROLLER
A microcontroller is a compact integrated circuit design to govern a
specific operation in a embedded system. A typical microcontroller includes a
processor ,memory and input/output peripherals on a single chip.

Others supporting elements


-> Analog to Digital Convertor(ADC)
-> Digital to Analog Convertor(DAC)
-> System bus
-> Serial port
Things to be noted when choosing microcontroller
->Performance
->Price
->Applications
->Availability
MICROPROCESSOR:
It is a programmable device that takes in input performs some
arithmetic and logical operation over it and produces the desired output.
Computer’s Central Processing Unit(CPU) built on a single integrated
circuit (IC) is called a microprocessor.
The microprocessor contains millions of tiny components like
transistors, registers and diode that work together.

MICROPROCESSOR

ALU
INPUT DEVICE
OUTPUT DEVICE
CONTOL UNIT

REGISTER ARRAY

MEMORY UNIT
REQUIREMENTS:
❑ MPLAB IDE
❑ XC8 COMPILER
❑ PICSimLAB
PIC16F877A
16 x 4 CLCD
Tactile Switch
Timer 2
Matrix Keypad
ISR
PIC16F877A
It is a PIC Microcontroller and normally used in the embedded projects.

Properties:
It consists of 40 pins.
It has the 5 ports-Port A -> 6 bits(TRISA)
Pins- Analog pins(Analog port)
Port B -> 8 bits(TRISB)
Pins- Digital pins
Port C -> 8 bits(TRISC)
It is used for serial communication(Digital port)
Port D -> 8 bits(TRISD)
Pins- Digital pins
Port E -> 3 bits(TRISE)
It will work by uploading hex file.
All the 5 ports are Bidirectional

Size of Microcontroller=Size of
Data Bus
Data Bus=8 bits
Instruction set architecture- RISC
BLOCK DIAGRAM
PERIPHERALS:

PICSIMLAB ARCHITECTURE
LED:
LED is an external device connected to microcontroller port.
In PIC16F877A contains 14 LED’s which is connect to the Port D and Port B

LED-Array1 -> Port D(RD0 to RD7)


LED-Array2 -> Port B(RB0 TO RB7)

To turn LED on, LED=1


To turn LED off, LED=0

TRISB bit=1 -> make the corresponding Port B pin an input.


TRISB bit=0 -> make the corresponding Port B pin an output.
For example,
TRISB3=0; RB3 is the output
TRISB6=1;RB6 is the input
TRISB=0xF0; //0b 1111 0000
input -> RB7 – RB4
output -> RB3 – RB0
The address of Port B =06H or 0x06
The address of TRISB= 86H or 0x86

The address of Port D=08H or 0x08


The address of TRISD=88H or 0x88
CLCD:
CLCD- Character Liquid Crystal Display (hd44780)
In PICSimlab there are 2 types of Display.
1. 16x2 Display
2. 16x4 Display
It has totally 16 interface lines.
It displays the ASCII character and some special characters.
Communication Modes:
There are 2 Communication Modes-
-> 4 bit mode which has the 4 data lines(RD4- RD7)
-> 8 bit mode which has the 8 data lines(RD0- RD7)

RS Line -> Register Select line


RS= 1 for Data
RS=0 for Instruction
Here we use 4 bit mode
For 2 lines, it contains 32 characters.
In CLCD, Data lines are connected to PortD
RS and Enable pin are connected to PortE
(RS -> RE2, E-> RE1)

NIBBLES:
RD4-RD7 =Upper nibble = 0x4
RD4-RD7 =Lower nibble = 0x1

Data is processed by 2 methods:


Delay Method
Poll D7 Method
In this method, D7 is continuously monitored.

To read, R/W = 1
To write, R/W = 0 (or) grounded
Tactile Switch:
It is a switch whose operation is perceptible by touch.
Uses:
To select the mode of operation
To enter the temperature
To enter the time
It will produce a Bouncing Effect when a switch is pressed

It consist of metal plate and terminal


MATRIX KEYPAD:
The keypad, the tactile switches are connected as Rows and Columns
Rows- RD0 RD1 RD2 RD3
Columns- RB0 RB1 RB2
Initially it is 1 (Released State)
It is used to select the modes
Applications:
Telephones, Calculators, Digital lockers, etc.,
INTERRUPTS:
An interrupt is a communication process set up in a microprocessor or
microcontroller.
Interrupts are handled by ISR(interrupt Service Routine)

Process-
An external or internal requests MPU to stop the processing
The MPU acknowledges the request
Attends to the request
Goes back to the processing

Sources of Interrupts:
External Interrupt- Caused by onboard
Internal interrupt- Caused inside the microcontroller
Classification of Interrupts:

Maskable Interrupts are further classified into External and Internal Interrupts.
TIMERS

RESOLUTION (Register Width):


Timer = 8 Bit (0 - 255)
Timer = 16 Bit (0 - 65535)

TICK(Total tick = 255):


Up Count = 0 1 2 3 . . . . . . . . . . . . . . . . . 255
Down count = 255 254 253 252 . . . . . . . . . . . . . . . . . . . . . . . . .0

QUANTUM:
Quantum is a measure of time which is responsible for tick.
Depending on the system clock settings.
Tick is based on Instruction Cycle (IC).

1 IC time = 200 nsec = quantum


SCALE
1:1 = Tick increment after 1 IC -> 200nsec

PRE SCALING
1:2 = Tick increment after 2 IC -> 400nsec
1:4 = Tick increment after 4 IC -> 800nsec

POST SCALING
1:2 = After 2 overflow go to ISR -> 102.4usec
1:4 = After 4 overflow go to ISR -> 204.8usec

MODES:
❑ Counter
❑ PWM or Pulse generator
❑ PW or PP Measurement
SIMULATION of THE PROJECT
THANK YOU………….!!!

You might also like