0% found this document useful (0 votes)
41 views3 pages

INTERRUPT To Power Supply

An interrupt is an event that causes a microprocessor to temporarily pause its regular execution and run an interrupt service routine (ISR) before returning to its original task. When an interrupt occurs, the CPU stores its current state, loads the address for the ISR, runs the ISR, then restores its original state to continue regular execution. This allows the microcontroller to efficiently respond to external events like button presses without needing to continuously monitor sensor states.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views3 pages

INTERRUPT To Power Supply

An interrupt is an event that causes a microprocessor to temporarily pause its regular execution and run an interrupt service routine (ISR) before returning to its original task. When an interrupt occurs, the CPU stores its current state, loads the address for the ISR, runs the ISR, then restores its original state to continue regular execution. This allows the microcontroller to efficiently respond to external events like button presses without needing to continuously monitor sensor states.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

7.

INTERRUPT
An interrupt is an event that makes the microprocessor to temporarily suspend its regular
execution. Later it returns to its original execution task. Most programs use interrupts in their
regular execution. The purpose of the microcontroller is mainly to respond to changes in its
surroundings. For example, when you push a button on a remote controller, the
microcontroller stops its normal operation and take this as interrupt and respond by changing
a channel, turn the volume up or down, etc. Another example is when a computer systems use
interrupt driven I/O, a process where pressing a key on the keyboard or clicking a button on
the mouse triggers an interrupt. So it is very different for a microcontroller to monitor the
event that is triggered often. It takes time and not impractical.

One method to solve this issue is Interrupt Service Routine (ISR). In this, Microcontroller
need not run a set of programs or check a pin to monitor the triggers or events. Instead, it will
respond only when an interrupt happens. The signal which informs the Central Processor Unit
(CPU) about such an event is called an INTERRUPT. The program that runs after interrupt is
said to be interrupt service routine. The following steps will happen in a microcontroller
when an interrupt occurs.

1. When an interrupt event request for the control, the CPU stores its current address
(from program counter) and status into a memory location and loads the interrupt
routine address in the Program Counter(PC).
2. Once the Program Counter (PC) is loaded with the address the control will change and
starts to run the interrupt service routine.
3. Once the Interrupt program ends the program counter is again loaded with the normal
routine address to continue the normal execution.
4. By doing the above three steps any of the interrupt can be served by the
microcontroller.

CENTRAL PROCESSOR UNIT (CPU)

As its name suggests, this is a unit which monitors and controls all processes within the
microcontroller. It consists of several subunits, of which the most important are:
1. Instruction decoder:
Instruction decoder takes bits stored in the instruction register and decodes it and tells
the CPU what it has to do and enable the components for the operation. Simply,
instruction decoder is like a dictionary. It tells the meaning of the instruction and
commands all the components.

2. Arithmetic Logical Unit (ALU):


The ALU accepts 8-bit data words/16 bit from one or two sources and generates an 8-
bit result under the control of the instruction decoder. The ALU performs the
arithmetic operations add, subtract, multiply, divide, increment, decrement, BDC-
decimal-add-adjust and compare, and the logic operations AND, OR, Exclusive OR,
complement and rotate (right, left or swap nibbles (left four)). In most of the
arithmetic operations one of the data will be there in the accumulator. Boolean
processor performing the bit operations as set, clear, complement, jump-if-not-set,
jump-if-set-and-clear and move to/from carry. Between any addressable bit (or its
complement) and the carry flag, it can perform the bit operations of logical AND or
logical OR with the result returned to the carry flag. One of the SFRs, called a Status
Register (PSW), is closely related to the accumulator. It shows at any given time the
‘status' of a number stored in the accumulator (number is larger or less than zero etc.).
The accumulator is also called working register and is marked as W register or just W,
therefore.

BUS
A CPU can communicate with the memory and other peripherals through two buses. One is
address bus and the other is data bus. A bus consists of 8, 16 or more wires. The address bus
‘tells’ the memory (or the peripherals) wherein the memory data should be read or written.
Data is typically stored in consecutive blocks, which can be sub-divided into individual
words. A word is typically 8 bits (= 1 Byte), 16 bits, or 32 bits wide. The index of the array is
called the address of the respective word. To read data from the memory, one has to apply the
correct address through the address bus. The memory then presents the correct word on the
data bus. Writing to the memory is similar: First assert the address at which you would like to
store the data, and then write the data to the data bus.
The hardware automatically applies the specified address and reads or writes the data from/to
the data bus.

POWER SUPPLY CIRCUIT


To prevent the system from malfunction during the period of insufficient power supply
voltages two techniques are followed. One is “brownouts”, where the power supply voltage
drops to the insufficient level. Another is Black-out, where the power supply is completely
removed for a period of time.

Brown out is a potentially dangerous condition which occurs at many different times such as
inadequate power regulation, system components turning on or off, system malfunctions, etc.
Unfortunately, brown-out conditions often don’t show up in the system development stage,
but wait until the production run begins with all the system components installed to show
their ugly heads. In order to prevent it, the microcontroller usually has a built-in circuit for
brown out reset which resets the whole electronics as soon as the microcontroller incurs a
state of emergency.

Reset pin is usually marked as MCLR (Master Clear Reset). It is used for external reset of the
microcontroller by applying logic zero (0) or one (1) to it, which depends on the type of the
microcontroller. In case the brown out circuit is not built in, a simple external circuit for
brown out reset can be connected to the MCLR pin.

Another problem is Black-outs takes place when the power supply goes to OFF state. In this
scenario the process is completely shut down so no recover can be done, since the voltage
drop all of a sudden.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy