clg bell
-
Upload
nikhil-kumar-singh -
Category
Documents
-
view
218 -
download
0
Transcript of clg bell
-
7/30/2019 clg bell
1/24
CONTENTS
1 .INTRODUCTION
2 .DEVICES USED
3 .BLOCK DIAGRAM
4 .CIRCUIT DIGRAM
5 .AT MEGA 16 MICROCONTROLLER
6 .PIN DESCRIPTIONS
7 .32 BIT SERIAL IC BUS EEPROM
8 .FEATURES SUMMARY
9 .RTC(REAL TIME CLOCK)
10. PS/2KEYBOARD
11 .LED MATRIX DISPLAY
12 .BUZZER
13 .APPLICATION AND ADVANTAGE
-
7/30/2019 clg bell
2/24
INTRODUCTION
This Project takes over the task of Ringing of the Bell in Colleges. It replaces the Manual
Switching of the Bell in the College. It has an Inbuilt Real Time Clock (DS1307 /DS 12c887)
which tracks over the Real Time. When this time equals to the Bell Ringing time, then the Relay
for the Bell is switched on.The Bell Ringing time can be edited at any Time, so that it can be
used at Normal Class Timings as well as Exam Times. The Real Time Clock is displayed on
LCDt display. The Microcontroller AT89S52 is used to control all the Functions, it get the time
through the keypad and store it in its Memory. And when the Real time and Bell time get equal
then the Bell is switched on for a predetermined time.
DEVICES USED
-
7/30/2019 clg bell
3/24
BLOCK DIAGRAM
-
7/30/2019 clg bell
4/24
-
7/30/2019 clg bell
5/24
-
7/30/2019 clg bell
6/24
A BRIEF INTRODUCTION TO AT MEGA 16 MICROCONTROLLER
Features
High-performance, Low-power Atmel AVR
8-bit Microcontroller
Advanced RISC Architecture
131 Powerful InstructionsMost Single-clock Cycle Execution
32 x 8 General Purpose Working Registers
Fully Static Operation
Up to 16 MIPS Throughput at 16 MHz
On-chip 2-cycle Multiplier
High Endurance Non-volatile Memory segments
16 Kbytes of In-System Self-programmable Flash program memory
512 Bytes EEPROM
1 Kbyte Internal SRAM
Write/Erase Cycles: 10,000 Flash/100,000 EEPROM
Data retention: 20 years at 85C/100 years at 25C(1)
Optional Boot Code Section with Independent Lock Bits
In-System Programming by On-chip Boot Program
True Read-While-Write Operation
-
7/30/2019 clg bell
7/24
Programming Lock for Software Security
JTAG (IEEE std. 1149.1 Compliant) Interface
Boundary-scan Capabilities According to the JTAG Standard
Extensive On-chip Debug Support
Programming of Flash, EEPROM, Fuses, and Lock Bits through the JTAG Interface
Peripheral Features
Two 8-bit Timer/Counters with Separate Prescalers and Compare Modes
One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture
Mode
Real Time Counter with Separate Oscillator
Four PWM Channels
8-channel, 10-bit ADC
8 Single-ended Channels
7 Differential Channels in TQFP Package Only
2 Differential Channels with Programmable Gain at 1x, 10x, or 200x
Byte-oriented Two-wire Serial Interface
Programmable Serial USART
Master/Slave SPI Serial Interface
Programmable Watchdog Timer with Separate On-chip Oscillator
On-chip Analog Comparator
Special Microcontroller Features
-
7/30/2019 clg bell
8/24
Power-on Reset and Programmable Brown-out Detection
Internal Calibrated RC Oscillator
External and Internal Interrupt Sources
Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby
and Extended Standby
I/O and Packages
32 Programmable I/O Lines
40-pin PDIP, 44-lead TQFP, and 44-pad QFN/MLF
Operating Voltages
2.7V - 5.5V for ATmega16L
4.5V - 5.5V for ATmega16
Speed Grades
0 - 8 MHz for ATmega16L
0 - 16 MHz for ATmega16
Power Consumption @ 1 MHz, 3V, and 25C for ATmega16L
Active: 1.1 mA
Idle Mode: 0.35 mA
Power-down Mode: < 1 A
8-bit
Microcontroller
with 16K Bytes
-
7/30/2019 clg bell
9/24
In-System
Programmable Flash
ATmega16(L)
Pin Configurations
-
7/30/2019 clg bell
10/24
Pin Descriptions
VCC Digital supply voltage
.
GND Ground.
Port A (PA7..PA0) Port A serves as the analog inputs to the A/D Converter.
Port A also serves as an 8-bit bi-directional I/O port, if the A/D Converter is not used. Port pins
can provide internal pull-up resistors (selected for each bit). The Port A output buffers have
symmetrical
drive characteristics with both high sink and source capability. When pins PA0 to PA7
are used as inputs and are externally pulled low, they will source current if the internal pull-up
resistors are activated. The Port A pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
Port B (PB7..PB0) Port B is an 8-bit bi-directional I/O port with internal pull-up resistors
(selected for each bit). The
Port B output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port B pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port B pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
Port B also serves the functions of various special features of the ATmega16 as listed on
.
Port C (PC7..PC0) Port C is an 8-bit bi-directional I/O port with internal pull-up resistors
(selected for each bit). The
Port C output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port C pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port C pins are tri-stated when a reset condition becomes active,
even if the clock is not running. If the JTAG interface is enabled, the pull-up resistors on pins
PC5(TDI), PC3(TMS) and PC2(TCK) will be activated even if a reset occurs.
-
7/30/2019 clg bell
11/24
.
Port D (PD7..PD0) Port D is an 8-bit bi-directional I/O port with internal pull-up resistors
(selected for each bit). The
Port D output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port D pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port D pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
.
RESET Reset Input. A low level on this pin for longer than the minimum pulse length will
generate a
reset, even if the clock is not running.
.
XTAL1 Input to the inverting Oscillator amplifier and input to the internal clock operating
circuit.
XTAL2 Output from the inverting Oscillator amplifier.
AVCC AVCC is the supply voltage pin for Port A and the A/D Converter. It should be
externally connected
to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC
through a low-pass filter.
AREF AREF is the analog reference pin for the A/D Converter.
-
7/30/2019 clg bell
12/24
64Kbit and 32Kbit Serial IC Bus EEPROM
-
7/30/2019 clg bell
13/24
FEATURES SUMMARY
Two-Wire I
2
C Serial Interface
Supports 400kHz Protocol
Single Supply Voltage:
4.5 to 5.5V for M24Cxx
2.5 to 5.5V for M24Cxx-W
1.8 to 5.5V for M24Cxx-R
Write Control Input
BYTE and PAGE WRITE (up to 32 Bytes)
RANDOM and SEQUENTIAL READ Modes
Self-Timed Programming Cycle
Automatic Address Incrementing
Enhanced ESD/Latch-Up Protection
More than 1 Million Erase/Write Cycles
More than 40-Year Data Retention
-
7/30/2019 clg bell
14/24
RTC(REAL TIME CLOCK)
RTCDS1307
A real time clock is basically just like a watch - it runs on a battery and keeps time for you even
when there is a power outage! Using an RTC, you can keep track of long timelines, even if you
reprogram your microcontroller or disconnect it from USB or a power plug.
Most microcontrollers, including the Arduino, have a built-in timekeeper called millis() and
there are also timers built into the chip that can keep track of longer time periods like minutes or
days. So why would you want to have a seperate RTC chip? Well, the biggest reason is
that millis() only keeps track of time since the Arduino was last powered- . That means that
when the power is turned on, the millisecond timer is set back to 0. The Arduino doesn't know
that it's 'Tuesday' or 'March 8th', all it can tell is 'It's been 14,000 milliseconds since I was last
turned on'.
OK so what if you wanted to set the time on the Arduino? You'd have to program in the date and
time and you could have it count from that point on. But if it lost power, you'd have to reset the
time. Much like very cheap alarm clocks: every time they lose power they blink12:00
While this sort of basic timekeeping is OK for some projects, some projects such as data-loggers,
clocks, etc will need to have consistent timekeeping that doesn't reset when the Arduino
battery dies or is reprogrammed. Thus, we include a seperate RTC! The RTC chip is a
specialized chip that just keeps track of time. It can count leap-years and knows how many days
-
7/30/2019 clg bell
15/24
are in a month, but it doesn't take care of Daylight Savings Time (because it changes from place
to place)
-Time Clock (RTC) Counts Seconds,
Minutes, Hours, Date of the Month, Month, Day of
the week, and Year with Leap-Year
Compensation Valid Up to 2100
-Byte, Battery-Backed, General-Purpose RAM
with Unlimited Writes
2
-
7/30/2019 clg bell
16/24
C Serial Interface
-Wave Output Signal
-Fail Detect and Switch Circuitry
-Backup
Mode with Oscillator Running
-40C to +85C
-Pin Plastic DIP or SO
-
7/30/2019 clg bell
17/24
-
7/30/2019 clg bell
18/24
Ps/2keyboard
-
7/30/2019 clg bell
19/24
Physical Interface
The physical PS/2 port is one of two styles of connectors: The 5-pin DIN or the 6-pin mini-
DIN. Both connectors are completely (electrically) similar; the only practical difference between
the two is the arrangement of pins. This means the two types of connectors can easily be
changed with simple hard-wired adaptors. These cost about $6 each or you can make your own
by matching the pins on any two connectors.
PC keyboards use either a 6-pin mini-DIN or a 5-pin DIN connector. If your keyboard has a 6-
pin mini-DIN and your computer has a 5-pin DIN (or visa versa), the two can be made
compatible with the adaptors described above. Keyboards with the 6-pin mini-DIN are often
referred to as "PS/2" keyboards, while those with the 5-pin DIN are called "AT" devices ("XT"
keyboards also used the 5-pin DIN, but they are quite old and haven't been made for many
years.) All modern keyboards built for the PC are either PS/2, AT, or USB. This document does
notapply to USB devices, which use a completely different interface.
Mice come in a number of shapes and sizes (and interfaces.) The most popular type is probably
the PS/2 mouse, with USB mice gaining popularity. Just a few years ago, serial mice were also
quite popular, but the computer industry is abandoning them in support of USB and PS/2devices. This document applies only to PS/2 mice. If you want to interface a serial or USB
mouse, there's plenty of information available elsewhere on the web.
The cable connecting the keyboard/mouse to the computer is usually about six feet long and
consists of four to six 26 AWG wires surrounded by a thin layer of mylar foil sheilding. If you
need a longer cable, you can buy PS/2 extenstion cables from most consumer electronics
stores. You should not connect multiple extension cables together. If you need a 30-foot
keyboard cable, buy a 30-foot keyboard cable. Do not simply connect five 6-foot cables
together. Doing so could result in poor communication between the keyboard/mouse and the
host.
-
7/30/2019 clg bell
20/24
As a side note, there is one other type of connector you may run into on keyboards. While most
keyboard cables are hard-wired to the keyboard, there are some whose cable is not permanently
attached and come as a separate component. These cables have a DIN connector on one end (the
end that connects to the computer) and a SDL (Sheilded Data Link) connector on the keyboard
end. SDL was created by a company called "AMP." This connector is somewhat similar to a
telephone connector in that it has wires and springs rather than pins, and a clip holds it in
place. If you need more information on this connector, you might be able to find it on AM.Don't
confuse the SDL connector with the USB connector--they probably both look similar in my
diagram below, but they are actually very different. Keep in mind that the SDL connector has
springs and moving parts, while the USB connector does not.
The pinouts for each connector are shown below:
-
7/30/2019 clg bell
21/24
-
7/30/2019 clg bell
22/24
LED MATRIX DISPLAY
It is made up of number of led's connected together
To display a static message or running display. Now a days it has become Most favorable
because it can show alphanumeric characters as well as any shape. It can be of different sizes
(row x column)
We have used (7x40).
-
7/30/2019 clg bell
23/24
BUZZER
A buzzer or beeper is an audio signalling device, which mabe mechanical, electromechanical, or
piezoelectric. Typical uses of buzzers and beepers include alarm devices, timers etc.
-
7/30/2019 clg bell
24/24
Application and Advantage
It can be used in the college, school for bellingpurpose.
It can be used in the any type of examination for bellingbecause we can set the ringing time.
Automatic scheduling of college bell is possible. Compact in size so takes less space.
Time editable facility is available.