College Bell Using MC

51
1

Transcript of College Bell Using MC

Page 1: College Bell Using MC

1

Page 2: College Bell Using MC

2

Page 3: College Bell Using MC

3

Mr. B.L.REDDY

Ms. VASAVI

G.PRIYANKA – 08N71A0483

B.SWATHI – 08N71A0467

C.GOWTHAMI – 08N71A0469

S.DIVYA – 09N75A0403

Page 4: College Bell Using MC

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.

Page 5: College Bell Using MC

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.

Page 6: College Bell Using MC

6

Back-upBattery

DS 12887

RTC

Crystal

Crystal

RESET

AT89S52

With In-Built

Flash EPROM

16X2 LCD

Contrast Control

Transistor driver circuit

Relay

Page 7: College Bell Using MC

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.

Page 8: College Bell Using MC

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.

Page 9: College Bell Using MC

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.

Page 10: College Bell Using MC

10

Page 11: College Bell Using MC

11

Page 12: College Bell Using MC

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

Page 13: College Bell Using MC

13

USE OF PULL UP RESISTORS FOR PORT 0

Page 14: College Bell Using MC

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

Page 15: College Bell Using MC

15

PORT 3 – MULTIPLE FUNCTIONS

Page 16: College Bell Using MC

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

Page 17: College Bell Using MC

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

Page 18: College Bell Using MC

18

XTAL Connection to an External TTL oscillator

Using a TTL oscillator.

XTAL2 is unconnected.

NC

EXTERNALOSCILLATORSIGNAL

XTAL2

XTAL1

GND

Page 19: College Bell Using MC

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.

Page 20: College Bell Using MC

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.

Page 21: College Bell Using MC

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.

Page 22: College Bell Using MC

22

USE OF ALE

Page 23: College Bell Using MC

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)

Page 24: College Bell Using MC

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.

Page 25: College Bell Using MC

25

Timer 2 Operating Modes

Page 26: College Bell Using MC

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.

Page 27: College Bell Using MC

Interrupts Enable Register

Page 28: College Bell Using MC

28

Page 29: College Bell Using MC

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 .

Page 30: College Bell Using MC

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.

Page 31: College Bell Using MC

31

POWER SUPPLY CIRCUIT USIN IC VOLTAGE REGULATOR

Page 32: College Bell Using MC

32

IC Voltage regulator

Page 33: College Bell Using MC

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.

.

Page 34: College Bell Using MC

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.

Page 35: College Bell Using MC

35

Page 36: College Bell Using MC

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.

Page 37: College Bell Using MC

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

Page 38: College Bell Using MC

• 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

Page 39: College Bell Using MC

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

Page 40: College Bell Using MC

40

Page 41: College Bell Using MC

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

Page 42: College Bell Using MC

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.

Page 43: College Bell Using MC

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.

Page 44: College Bell Using MC

44

Start

Initialize Micro Controller

Initialize LCD

Initialize RTC(12887)

A

Page 45: College Bell Using MC

45

A

Monitoring Relay

If relay is loaded

If relay is unloaded

Bell is ON

Bell is OFF

Stop

Page 46: College Bell Using MC

46

Page 47: College Bell Using MC

47

Page 48: College Bell Using MC

48

Page 49: College Bell Using MC

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.

Page 50: College Bell Using MC

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

Page 51: College Bell Using MC

THANK YOU