microprocessor class 12
microprocessor class 12
PART 12
SIBIN K
Microcontroller has
● CPU (microprocessor)
● RAM
● ROM
● I/O ports
● Timer
● ADC and other peripherals
A Microcontroller is a programmable digital processor with necessary
peripherals
CY AC F0 RS1 RS0 OV - P
Carry Flag(CY):
● During addition and subtraction any carry or borrow is generated then carry flag is set
otherwise carry flag resets.
● It is used in arithmetic, logical, jump, rotate and Boolean operations.
Parity flag(P):
● If in result, even no. Of ones "1" are present than it is called even parity and parity flag
sets.
● In result odd no. Of ones "1"are present than it is called odd parity and parity flag resets
F0: It is user defined flag. The user defines the function of this flag. The user can set ,test n
clear this flag through software.
RS1 and RS0: These flags are used to select bank of register by resetting those flags which
are as shown in table :
Data pointer register (DTPR): It is a 16 bit register used to hold address of external or
internal RAM where data is stored or result is to be stored. It is used to store 16 bit data. It is
divided into2- 8bit registers, DPH-data pointer higher order and DPL-data pointer lower order.
Each register can be used as general purpose register to store 8 bit data and can also be
used as memory location. DPTR does not have single internal address.
The four 8-bit I/O ports P0, P1, P2 and P3 each uses 8 pins.
PORT 0: used as an I/O port. Used as a bidirectional lower order address and data bus for
external memory
PORT 2: used as an I/O port. Used as a higher order address bus for external memory
PORT 3: used as an I/O port. Also for serial data, external interrupt, external timer, memory
control applications
● PIN DIAGRAM