Professional Documents
Culture Documents
. Provides R&D solutions in the area of Embedded Systems, VLSI, DSP and Embedded Wireless.
Special-purpose computer system designed to perform a dedicated function. Performs one or a few pre-defined tasks, usually with very specific requirements, and often includes task-specific hardware and mechanical parts not usually found in a general-purpose computer.
General-purpose microprocessor
CPU for Computers No RAM, ROM, I/O on CPU chip itself ExampleIntels x86, Motorolas 680x0
Data Bus
RAM
ROM
I/O Port
Timer
Microcontroller :
A smaller computer On-chip RAM, ROM, I/O ports... ExampleMotorolas 6811, Intels 8051, Zilogs Z8 and PIC 16X
CPU
RAM
ROM
A single chip
Serial I/O Timer COM Port Port Microcontroller
On-chip RAM
Timer 1 Timer 0
Counter Inputs
CPU
Serial Port
OSC
Bus Control
4 I/O Ports
P0 P1 P2 P3
TxD RxD
Address/Data
Feature 8051 ROM (program space in bytes) 4K RAM (bytes) 128 Timers 2 I/O pins 32 Serial port 1 Interrupt sources 6
8052 8K 256 3 32 1 8
8031 0K 128 2 32 1 6
8051 (8031)
Vccpin 40 Vcc provides supply voltage to the chip. The voltage source is +5V. GNDpin 20ground XTAL1 and XTAL2pins 19,18 These 2 pins provide external clock. Way 1using a quartz crystal oscillator Way 2using a TTL oscillator Example 4-1 shows the relationship between XTAL and the machine cycle.
RSTpin 9reset It is an input pin and is active highnormally low. The high pulse must be high at least 2 machine cycles. It is a power-on reset. Upon applying a high pulse to RST, the microcontroller will reset and all values in registers will be lost. Reset values of some 8051 registers Way 1Power-on reset circuit Way 2Power-on reset with debounce
/EApin 31external access There is no on-chip ROM in 8031 and 8032 . The /EA pin is connected to GND to indicate the code is stored externally. /PSEN ALE are used for external ROM. For 8051, /EA pin is connected to Vcc. / means active low. /PSENpin 29program store enable This is an output pin and is connected to the OE pin of the ROM. See Chapter 14.
ALEpin 30address latch enable It is an output pin and is active high. 8051 port 0 provides both address and data. The ALE pin is used for de-multiplexing the address and data by connecting to the G pin of the 74LS373 latch. I/O port pins The four ports P0, P1, P2, and P3. Each port uses 8 pins. All I/O pins are bi-directional.
The 8051 has four I/O ports Port 0 pins 32-39P0P0.0P0.7 Port 1pins 1-8 P1P1.0P1.7 Port 2pins 21-28P2P2.0P2.7 Port 3pins 10-17P3P3.0P3.7 Each port has 8 pins. Named P0.X X=0,1,...,7, P1.X, P2.X, P3.X ExP0.0 is the bit 0LSBof P0 ExP0.7 is the bit 7MSBof P0 These 8 bits form a byte. Each port can be used as input or output (bi-direction).
Embedded C
Compilers produce hex files that is downloaded to ROM of microcontroller
Testing an LED
Never connect an LED directly to a battery or power supply! It will be destroyed almost instantly because too much current will pass through and burn it out. LEDs must have a resistor in series to limit the current to a safe value, for quick testing purposes a 1k resistor is suitable for most LEDs.
7-segment Display
There are two important types of 7-segment LED digital display.
The Common Cathode Display (CCD) All cathodes are common and ground is being provided. The Common Anode Display (CAD) All anodes are common and Vcc is being provided.
By RS you can select register Data lines (DB7-DB0) used to transfer data and commands
Inside LCD
RAM In LCD we have two types of RAM
DDRAM - Display Data RAM Display data RAM (DDRAM) stores display data represented in 8-bit character codes. CGRAM - Character Generator RAM
CGRAM area is used to create custom characters in LCD. In the character generator RAM, the user can rewrite character patterns by program.
UART in 8051
One of the 8051s many powerful features is its integrated UART, An UART, universal asynchronous receiver / transmitter is responsible for performing the main task in serial communications with computers.
The device changes incoming parallel information to serial data which can be sent on a communication line. A second UART can be used to receive the information.
To communicate with pc or other devices we need some standards like RS232. A driver(MAX232) is used to convert TTL level to RS232 voltage level.
Max circuitry
Value of capacitors is 10uF Controller section
RS232 section
XTAL oscillator
12
32
28800 Hz
By UART To timer 1
To set the Baud rate
Timer 1
Timers
Timers are used
1. To generate time delay. 2. To generate baud rate. 3. To count an event(timer as a counter).
1.Timer 0 2. Timer 1
Relays
The term Relay generally refers to a device that provides an electrical connection between two or more points in response to the application of a control signal.
An Electromechanical device Relay operates on +5v switches to +12v or 220 v state Wide variety applications such as in telephone exchanges, digital computers and automation systems
Buzzer Interfacing
A buzzer is an audio signaling device, which may be mechanical, electromechanical or electronic. Typical uses of buzzers include alarms, timers and confirmation of user input such as a mouse click or keystroke.
Multi-Storey Car Parking is a method of parking and retrieving cars that typically use a system of pallets and lifts. The intention is to compact more cars in the same space, reduce the space needed to park the same number of cars.
1. 2. 3. 4. 5. 6. 7. 8.
Microcontroller 8051 PCB LCD LEDS IR pair Resistors 7404 IC Power jack
9. Capacitors 10. 10k potentiomete 11. MAX232 12. Adapter 5v 13. Switch 14. 7805 regulator 15. Transistors
Main sections
Indicator section
Sensor section
LED Glows Transmitter & receiver Displays
IR Pair
Display section
LCD
A sensor section consists of an IR pairs. A sensor is a device that measures physical quantity and converts it into a signal which can be read by an observer or by an instrument.
An IR pair is provided which will sense whether the car has reached towards the gate or not. There will be 2 IR pairs provided before the main gate at the ground floor. As soon as the car reaches between the 2 IR pairs. It will be sensed by the sensors and the display on the LCD automatically changes and it will show the particular floor on which the car can be parked.
Programming is done using embedded c. KeilC51 compiler is used for this language. A header file is to be added for the controller we are using otherwise we will not be able to access registers related to peripherals. When the program is built, it is then burn into the controller using RS232 cable.
Display is provided at the ground floor that displays where to park the car. Each floor is provided with green and red LEDS. Green for vacancy and Red for no space. Sensors sense the entry of each car and indicate a message on LCD about where to park car. If there is no space a message is displayed NO SPACE.
Erection of multistoried car parking with surface car parking It seeks permission for a larger multistoried car park and an amended parking layout to that approved. Eastside multistoried car park Greenside multistoried car park Minories multistoried car park Woodhouse multistoried car park Manors multistoried car park Westgate multistoried car park Multistoried car park Poole
Provides lower parking cost per building area Solves the problem of less space Reduces human effort in finding out the required space Fast
AUTOMOBILES: Fuel Injection control (for fuel efficiency), Air bags and Automatic braking (for safety), and car entertainment systems. MEDICAL ELECTRONICS: Many sophisticated medical instruments (Body Scanners, Heart rate monitors, Pacemaker etc) Industrial Control: such as CNC machines are example embedded systems. BUSINESS APPLICATIONS: Vending machines, scanners, printers. CONSUMER ELECTRONICS: Cameras, Toys, Cellular Phones, Washing Machines AVIONICS: Airplanes, Satellite Stations Defense: RADARs, SONARs (for surveillance), Guided Missile Systems