20
MICROCONTROLLER AND EMBEDDED SYSTEM

microcontroller and embedded system

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: microcontroller and embedded system

MICROCONTROLLER AND EMBEDDED SYSTEM

Page 2: microcontroller and embedded system

CONTENTS 1. EMBEDDED SYSTEM & CHARACTERSTICES 2. INTEGRATED CIRCUIT 3. FULL & SEMI CUSTOM DESIGN 4. PROGRAMABLE LOGIC DEVICE 5. DESIGN CHALLENGES IN EMBEDDED SYSTEM 6. EMBEDDED OPERATING SYSTEM 7. MICROCONTROLLERS & 8051

MICROCONTROLLER 8. SEVEN SEGMENT DISPLAY & KEYPAD

INTERFACING 9. LCD INTERFACING10. PROJECT - ELECTRONIC CODE LOCK WITH

USER -DEFINED PASSWORD

Page 3: microcontroller and embedded system
Page 4: microcontroller and embedded system
Page 5: microcontroller and embedded system

Processors are implemented on an integratedcircuit (IC). IC, often called as chip consists ofa set of transistors interconnected with otherdevices. There are different processes tofabricate semiconductors namely n-MOS, p-MOSand C-MOS.The most widely used process is CMOS(complementary metal oxide semiconductor).Semiconductors devices are built withdifferent layers. The bottom-most layers are oftransistors.

Integrated Circuit

Page 6: microcontroller and embedded system

EXAMPLES OF EMBEDDED SYSTEM

•Automated tiller machines (ATMS).•Cellular telephones and telephonic switches.•Computer printers, Copiers.•Disk drives (floppy disk drive and hard disk drive)•Engine controllers and antilock brake controllers for automobiles.•Home automation products like thermostat, air conditioners sprinkles and security monitoring system.•House hold appliances including microwave ovens, washing machines, TV sets DVD players/recorders. •Medical equipment.•Measurement equipment such as digital storage oscilloscopes, logic analyzers and spectrum analyzers.•Multimedia appliances: internet radio receivers, TV set top boxes.•Stationary video game controllers.

Page 7: microcontroller and embedded system

MICROPROCESSORA microprocessor is a general-purpose digital computer central processing unit (CPU). Although popularly known as a “computer on a chip” is in no sense a complete digital computer. The block diagram of a microprocessor CPU is shown, which contains an arithmetic and logical unit (ALU), a program counter (PC), a stack pointer (SP),some working registers, a clock timing circuit, and interrupt circuits

CPU

RAM ROM I/O Port Timer

Serial COM Port

Data Bus

Page 8: microcontroller and embedded system

MICROCONTROLLERS

A microcontroller is an economical computer-on-a-chip built for dealing with specific tasks, such as displaying or receiving information through LEDs or remote controlled devices. The most commonly used set of microcontrollers belong to 8051 Family. 8051 Microcontrollers continue to remain a preferred choice for a vast community of hobbyists and professionals. Through 8051, the world became witness to the most revolutionary set of microcontrollers. 

Page 9: microcontroller and embedded system

MICROCONTROLLER 8051

Microcontroller (also MCU or µC) is a computer-on-a-chip. It is a type of microprocessor emphasizing high integration, low power consumption, self-sufficiency and cost-effectiveness, in contrast to a general-purpose microprocessor (the kind used in a PC). In addition to the usual arithmetic and logic elements of a general purpose microprocessor, the microcontroller typically integrates additional elements such as read-write memory for data storage, read-only memory, such as flash for code storage, EEPROM for permanent data storage, peripheral devices, and input/output interfaces. At clock speeds of as little as a few MHz or even lower, microcontrollers often operate at very low speed compared to modern day microprocessors, but this is adequate for typical applications. They consume relatively little power .

Page 10: microcontroller and embedded system

Special features of 8051 are:

•8-bit data bus •16-bit address bus •32 general purpose registers each of 8 bits •16 bit timers (usually 2, but may have more, or less). •3 internal and 2 external interrupts. •Bit as well as byte addressable RAM area of 16 bytes. •Four 8-bit ports, (short models have two 8-bit ports). 16-bit program counter and data pointer

Page 11: microcontroller and embedded system

Transformercircuit symbol

Transformer

 

REGULATED POWER SUPPLY

Transformers convert AC electricity from one voltage to another with little loss of power. Transformers work only with AC and this is one of the reasons why mains electricity is AC. Step-up transformers increase voltage, step-down transformers reduce voltage. Most power supplies use a step-down transformer to reduce the dangerously high mains voltage (230V in UK) to a safer low voltage. The input coil is called the primary and the output coil is called the secondary. There is no electrical connection between the two coils, instead they are linked by an alternating magnetic field created in the soft-iron core of the transformer. The two lines in the middle of the circuit symbol represent the core. Transformers waste very little power so the power out is (almost) equal to the power in. Note that as voltage is stepped down current is stepped up.

Page 12: microcontroller and embedded system

STRUCTURE OF POWER SUPPLYThere are many types of power supply. Most are designed to convert high voltage AC mains electricity to a suitable low voltage supply for electronics circuits and other devices. A power supply can by broken down into a series of blocks, each of which performs a particular function. For example a 5V regulated supply:

Each of the blocks is described in more detail below: Transformer - steps down high voltage AC mains to low voltage AC. Rectifier - converts AC to DC, but the DC output is varying. Smoothing - smoothens the DC from varying greatly to a small ripple. Regulator - eliminates ripple by setting DC output to a fixed voltage.

Page 13: microcontroller and embedded system

SEVEN SEGMENT DISPLAY

A seven segment display is the most basic electronic display device that can display digits from 0-9. They find wide application in devices that display numeric information like digital clocks, radio, microwave ovens, electronic meters etc. The most common configuration has an array of eight LEDs arranged in a special pattern to display these digits. They are laid out as a squared-off figure ‘8’. Every LED is assigned a name from 'a' to 'h' and is identified by its name. Seven LEDs 'a' to 'g' are used to display the numerals while dot/decimal eighth LED 'h' is used to display them.  

Page 14: microcontroller and embedded system

LCD INTERFACING

The most commonly used Character based LCDs are based on Hitachi's HD44780 controller or other which are compatible with HD44580. In this tutorial, we will discuss about character based LCDs, their interfacing with various microcontrollers, various interfaces (8-bit/4-bit), programming, special stuff and tricks you can do with these simple looking LCDs .

Page 16: microcontroller and embedded system

INTRODUCTION

Page 17: microcontroller and embedded system

WORKINGA 4x3 matrix keypad and a 16x2 LCD have been used here. Keypad and LCD are very commonly used input & output devices, respectively. A four digit predefined password needs to be specified the user. This password is stored in the system.While unlocking, if the entered password from keypad matches with the stored password, then the lock opens and a message is displayed on LCD. Also an output pin is made high to be used for further purpose.

The connections in the circuit are as following: port P2 of microcontroller AT89C51 is used as data input port which is connected to data pins (7-14) of LCD. P1^0, P1^1 and P1^2 pins of microcontroller are connected to control pins RS, RW and EN of LCD. Port P0 is used to take input from keypad. P0^7 has been used as lock output pin of controller. 

Page 18: microcontroller and embedded system

To unlock, user needs to ‘Enter Password’ through keypad. Again the keypad is scanned for pressed keys and corresponding digits are identified. The passkey is displayed as ‘****’ on the LCD screen. After the four digits are entered, they are compared with the pre-set password. If all the four digits match with set password, LCD displays ‘Lock Open’ and the lock output pin goes high. If the security code is wrong, ‘Wrong Password’ is sent to be displayed on LCD. The system gets locked if more than three attempts are made with wrong password to open the electronic lock. The system needs to be reset in such a case.

As the program starts, string ‘Enter Password’ is displayed on LCD. The keypad is scanned for pressed digits one by one. Every time, row and column of the key pressed is detected and a ‘*’ is displayed on LCD corresponding to the entered number. After the four digits are entered, the user is prompted to ‘Confirm Password’ and again the input is taken through LCD. If the passwords do not match, a message is displayed to indicate ‘Wrong Password’; otherwise the user is prompted to unlock the device.  

Page 19: microcontroller and embedded system

CIRCUIT DIAGRAM

Page 20: microcontroller and embedded system

THANKS