college bell using mc
TRANSCRIPT
1
2
3
Mr. B.L.REDDY
Ms. VASAVI
G.PRIYANKA – 08N71A0483
B.SWATHI – 08N71A0467
C.GOWTHAMI – 08N71A0469
S.DIVYA – 09N75A0403
4
AIM: The aim of this project is to develop an embedded system to create an programmable automatic college bell system using Real Time Clock operation (RTC).
COMPONENTS: This project is built around 8052 architecture based microcontroller with RTC, alarm, LCD display, etc.
The microcontroller acts as the brain.
A real-time clock (RTC) is a computer clock to track of the current time.
The Real Time Clock is displayed on LCD display.
When this time is equal to the Bell ringing time, then the relay for the bell is switched on using the driver circuit.
5
Embedded systems are designed to do some specific task, rather than be a general-purpose computer for multiple tasks. An embedded system is a combination of computing H/W and S/W, and perhaps additional mechanical or other parts, designed to perform a specific function.
Embedded systems consist of• a processor and software • RAM and ROM
The program instructions written for embedded systems are referred to as firmware, and are stored in read-only memory or Flash memory chips.
6
Back-upBattery
DS 12887
RTC
Crystal
Crystal
RESET
AT89S52
With In-Built
Flash EPROM
16X2 LCD
Contrast Control
Transistor driver circuit
Relay
7
In 1981, Intel Corporation introduced an 8 bit microcontroller called 8051.It was also referred as “A SYSTEM ON A CHIP". This microcontroller had:
128 bytes of RAM 4K bytes of chip ROM two timers 6 interrupts one serial port four 8 bit wide ports all on a single chip
The 8051 is an original member of the 8051 family. There are two other members in the 8051 family of microcontrollers:8052 and 8031.
8
All the three microcontrollers will have the same internal architecture, but they differ in the following aspects.
8052
8052 has 256 bytes of RAM and 3 timers. It has 8K bytes of on-chip program ROM instead of
4K bytes.8031
This chip is often referred to as a ROM-less 8051 since it has 0K bytes of on-chip ROM.
To use this chip you must add external ROM to it.
9
8Kbytes of Flash memory256 x 8-Bit Internal RAM.32 Programmable I/O Lines.Three 16-Bit Timer/Counters.Eight Interrupt Sources.a full duplex serial porton-chip oscillator, and clock circuitryLow Power Idle and Power Down Modes.
10
11
PORT 0 To use the pins of port 0 as both input and
output each pin must be connected externally to a 10 K ohm pull-up resistor.
Also designated as ADO - AD7, allowing it to be used for both address and data.
ALE indicates if P0 has address or data. When ALE = 0, it provides data D0 - D7,
but when ALE = 1 it has address A0 - A7. 12
13
USE OF PULL UP RESISTORS FOR PORT 0
PORT 1 It is a general purpose 8 bit R/W port. It can be used for input or output.
PORT 2 Port 2 is also designated as A8 - A15, indicating the
higher order bits of address bus for external memory. It is a general purpose 8 bit R/W port.
PORT 3 Port 3 has the additional function of providing some
extremely important signals such as interrupts, serial I/O, timer/counter and read/write control for external memory.
14
15
PORT 3 – MULTIPLE FUNCTIONS
16
Vcc: pin 40Vcc provides supply voltage to the chip. The voltage source is +5V.
GND: pin 20
XTAL1 and XTAL2: pins 19,18These 2 pins provide external clock.using a quartz crystal oscillator using a TTL oscillator
17
QUARTZ CRYSTAL OSCILLATOR
XTAL 1 and XTAL2 also needs two capacitors of 30 pF value. We can observe the frequency on the XTAL2 pin.
C2
30pF
C1
30pF
XTAL2
XTAL1
GND
18
XTAL Connection to an External TTL oscillator
Using a TTL oscillator.
XTAL2 is unconnected.
NC
EXTERNALOSCILLATORSIGNAL
XTAL2
XTAL1
GND
19
RST - RESET
Pin 9 is the RESET pin. It is an input and is active high (normally low).
The high pulse must be high at least 2 machine cycles.
This is also referred to as power-on reset. Upon applying a high pulse to RST, the
microcontroller will reset and all values in registers will be lost.
20
EA & PSEN
PSEN and ALE are used for external ROM.
EA: pin 31(external 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. For 8051, EA pin is connected to Vcc. active low.
PSEN: pin 29(program store enable) The read signal for external program memory (active low). This is an output pin and is connected to the OE pin of the
ROM.
21
ALE
ALE: pin 30(address 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.
22
USE OF ALE
23
There are three timers in AT89C52 as TIMER0, TIMER1 and TIMER 2.
each 16-bit timer is accessed as two separate registers of low byte and high byte.
TIMER 0 and TIMER 1 REGISTERS
low byte register is called TL0 (Timer 0 low byte) and the high byte register is referred to as TH0 (Timer 0 high byte)
24
low byte register is called TL1 (Timer 1 low byte) and the high byte register is referred to as TH1 (Timer 0 high byte)
TIMER 2
Timer 2 is a 16-bit Timer/Counter that can operate as either a timer or an event counter.
Timer 2 has three operating modes: capture, auto-reload (up or down counting), and baud rate generator.
25
Timer 2 Operating Modes
26
The AT89C52 has a total of six interrupt vectors: two external interrupts (INT0 and INT1)three timer interrupts (Timers 0, 1, and 2) the serial port interrupt.
Interrupts Enable Register
28
29
A regulated power supply is an embedded circuit, or stand alone unit, the function of which is to supply a stable voltage(or less often current),to circuit or device that must be operated within certain power supply limits.
The output from the regulated power supply may be alternating or unidirectional , but is nearly always DC The type of stabilization used may be restricted to ensuring that the output remains within certain limits under various load conditions.
It may also include compensation for variations in its own supply source. The latter is much more common today.
Most digital logic circuits and processors need a 5 volt power supply.
To make a 5 volt power supply, we use a LM7805 voltage regulator IC .
30
IC VOLTAGE REGULATOR
A voltage regulator is an electrical regulator designed to automatically maintain a constant voltage level.
A voltage regulator may be a simple "feed-forward" design or may include negative feedback control loops.
It may use an electromechanical mechanism, or electronic components. Depending on the design.
It may be used to regulate one or more AC or DC voltages.
31
POWER SUPPLY CIRCUIT USIN IC VOLTAGE REGULATOR
32
IC Voltage regulator
33
A liquid crystal display (LCD) is a flat panel display, electronic visual display, or video display that uses the light modulating properties of (LC’s). LC’s do not emit light directly.
.
34
LCD’s are more energy efficient and offer safer disposal than CRTs. Its low electrical power consumption enables it to be used in battery powered electronic equipment
LCD’s have replaced cathode ray tube (CRT) displays in most applications.
They are available in a wider range of screen sizes than CRT and plasma displays, and since they do not use phosphors, they cannot suffer image burn-in.
LCD’s are, however, susceptible to image persistence
They are used in a wide range of applications, including computer monitors, television, instrument panels, aircraft cockpit displays, etc.
35
36
It is an electronically modulated optical device made up of any number of segments filled with liquid crystals and arrayed in front of a light source (backlight) or reflector to produce images in color or monochrome
The most flexible ones use an array of small pixels. The earliest discovery leading to the development of LCD technology, the discovery of liquid crystals, dates from 1888.
By 2008, worldwide sales of televisions with LCD screens had surpassed the sale of CRT units.
37
The LCD discussed in this section has 16 pins. The function of each pin is given below:Pin Symbol I/O Description1 Vss - Ground2 Vcc - +5V Power supply3 VEE - Power supply to control Contrast4 RS I RS = 0 to select command register RS = 1 to select data register5 R/W I R/W = 0 for write, R/W = 1 for read6 E I/O Enable7 DB0 I/O The 8-bit data bus8 DB1 I/O The 8-bit data bus9 DB2 I/O The 8-bit data bus10 DB3 I/O The 8-bit data bus11 DB4 I/O The 8-bit data bus12 DB5 I/O The 8-bit data bus13 DB6 I/O The 8-bit data bus14 DB7 I/O The 8-bit data bus15 LED- I Ground for LED backlight16 LED+ I +5v for LED backlight
• 38
Features :
Drop-in replacement for IBM AT computer clock/calendar
Pin-compatible with the MC146818B and DS1287
Totally nonvolatile with over 10 years of operation in the absence of power Self- contained subsystem includes lithium, quartz, and support circuitry
Counts seconds, minutes, hours, days, day of the week, date, month, and year with leap-year compensation valid up to 2100
Binary or BCD representation of time, calendar, and alarm
12-hour or 24-hour clock with AM and PM in 12-hour mode
Daylight Savings Time option
39
Selectable between Motorola and Intel bus timing
Multiplex bus for pin efficiency
Interfaced with software as 128 RAM locations 14 bytes of clock and control registers 114 bytes of general-purpose RAM
Programmable square-wave output signal
Bus-compatible interrupt signals ( IRQ )
Three interrupts are separately software-maskable and testable Time-of-day alarm once/second to once/day Periodic rates from 122ms to 500ms End-of-clock update cycle
Underwriters Laboratory (UL) recognized
40
41
AD0–AD7 - Multiplexed Address/Data BusNC - No ConnectMOT - Bus Type SelectionCS - RTC Chip Select InputAS - Address StrobeR/W - Read/Write InputDS - Data StrobeRESET - Reset InputIRQ - Interrupt Request OutputSQW - Square-Wave OutputVCC - +5V Main SupplyRCLR - RAM ClearGND - Ground
42
The DS12C887A real-time clock plus RAM is designed to be a direct upgrade replacement for the DS12887A .
It also provides additional 64 bytes of general-purpose RAM. Access to this additional RAM space is determined by the logic level presented on AD6 during the address portion of an access cycle.
The RCLR pin is used to clear (set to logic 1) all 113 bytes of general purpose RAM but does not affect the RAM associated with the real time clock.
In order to clear the RAM, RCLR must be forced to an input logic 0 (-0.3V to +0.8V) during battery-backup mode when VCC is not applied.
43
Keil provides a broad range of development tools like:
ANSI C compiler, macro assemblers, debuggers and simulators, linkers, IDE, library managers, real-time operating systems and evaluation boards for 8051, 251, ARM, and XC16x/C16x/ST10 families.
44
Start
Initialize Micro Controller
Initialize LCD
Initialize RTC(12887)
A
45
A
Monitoring Relay
If relay is loaded
If relay is unloaded
Bell is ON
Bell is OFF
Stop
46
47
48
49
ADVANTAGESAutomatic scheduling of college bell is possible.The components used for the assembling of this circuit are very cheap and are easily available in the market. Hence the initial cost of setting up the circuit is minimal.Compact in size so takes less space.Easy to install.This project is much suitable college, schools, institutions etc.Time editable facility is available.
CONCLUSION
Present day manual operation for ringing the bell in colleges or schools are carried out. The main disadvantage of this is one person is to be keep alert for this. At the same time during that time he could not be engaging another task.
To overcome from this, we have decided to prepare the circuit which will be operated automatically and the ringing of bell will start by its own time. The time input can be edited as per requirements.
This circuit is simple to prepare and easy to install. We can say that it will be much useful for colleges or schools or other educational institutions
THANK YOU