Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ABSTRACT
The project is designed to automatically operate an electric bell several times as
required in an educational institution like school or college. It overcomes the
difficulties of switching the bell on/off manually.
When this time equals to the programmed ON time, then the corresponding Relay
for the device is switched ON and then OFF as per the OFF time that finally
switches the load ON or OFF. Matrix keypad helps entering the time while relays used
with relay drivers for the loads.
Furthermore, this project can be enhanced by interfacing a GSM modem to the
existing project so that the bell ringing system can be controlled by sending an SMS
to the control unit.
INTRODUCTION OF PROJECT
INTRODUCTION OF PROJECT
BLOCK DIAGRAM:
need for costly call centers. Copy machines that can order
their own replacement cartridges will save businesses
time and money. Remember, the fact the technology is
embedded is not what important, and neither is the
device.
APPLICATIONS
Telecom
Automotive application
Domestic application
Robotic
Aerospace application
Medical equipment
Defense system
Office automation
MICROCONTROLLER AT89S52:
The AT89S52 is a low-power, high-performance CMOS 8-bit microcomputer with 64 Kbytes
of Flash Programmable and Erasable Read Only Memory (PEROM). The device is
manufactured using Atmels high density non-volatile memory technology and is compatible
with the industry standard MCS-51 instruction set and pin out.
The on-chip Flash allows the program memory to be reprogrammed in-system or by a
conventional non-volatile memory programmer. By combining a versatile 8-bit CPU with
Flash on a monolithic chip, the Atmel AT89s52 is a powerful microcomputer which provides a
highly flexible and cost effective solution to many applications.
LCD Display:
It will display the time, date as well as current room temperature. Output of microcontroller
is applied to the LCD display.
Buzzer & Buzzer driver:
Output of microcontroller is applied to buzzer driver which drives buzzer after lecture.
POWER SUPPLY
BRIDGE RECTIFIER
OPERATION
During the positive half cycle of the input supply, the upper end A
of the transformer secondary becomes positive with respect to its
lower point B. This makes Point1 of bridge Positive with respect to
point 2. The diode D1 & D2 become forward biased & D3 & D4
become reverse biased. As a result a current starts flowing from
point1, through D1 the load & D2 to the negative end. During
negative half cycle, the point2 becomes positive with respect to
point1. Diodes D1 & D2 now become reverse biased. Thus a
current flow from point 2 to point1.
TRANSFORMER
1.Step up transformer
DIODE
APPLICATION
RESISTORS
FUNCTION
TYPES OF RESISTORS
Metal film and metal oxides resistors are made in a similar way,
but can be made more accurately to within 2% or 1% of their
nominal vale there are some difference in performance between
these resistor types, but none which affects their use in simple
circuit.
TESTING
CAPACITORS
BASIC
TESTING
l digital meters with the specified function are used. The nonelectrolyte capacitor can be tested by using the digital meter.
LED
LED falls within the family of P-N junction devices. The light
emitting diode (LED) is a diode that will give off visible light when
it is energized. In any forward biased P-N junction there is, with in
PREHISTORY: 8048
The 8048 already had a lot of useful features known well to 8051users: external code memory support; external data memory
support (inherently only 256 bytes addressed indirectly by R0 and
R1 as there is no 16 bit pointer register such as the DPTR in 8051 the 8051 inherited this 8-bit external data access);
quasibidirectional I/O ports. Maximum clock is 11MHz, but an
instruction cycle takes 15 oscillator clocks. The "A" version
(advanced) introduced powerdown mode There were multiple
variations of the 8048 around, mostly with different numbering,
but generally denoted as the MCS-48 family. 8048 itself denoted a
mask-ROM part, 8748 an EPROM part - windowed (CERDIP erasable) for development, and unwindowed (PDIP) OTP. The
romless part was a bit surprisingly marked 8035 (probably most of
the parts sold as romless were parts with unusable ROM, due to
error in the "programmed" firmware). There was a low-cost version
with reduced pin count and omitted some of the features as 8021,
and versions with more ROM and RAM as 8049 (2kB ROM/128B
on chip. Pin compatibility was not maintained, but it was not a real
issue. Software compatibility is not binarywise but source-wise, but
that is also acceptable. The preliminary datasheet read: "Enhanced
MCS-48 Architecture". The extensions included code and data
memory extended to 64kB with appropriate support in instruction
set and registers (DPTR), relative conditional and unconditional
jumps (conditionals and DJNZ were constrained within a 256-byte
page in 8048), four register banks instead of two, "unlimited" stack
(8048 had stack limited to 16 bytes), multiple and divide
instructions. As for peripherals,
Keypad Section
When we have to learn about a new computer we have to familiarize about the
machine capability we are using, and we can do it by studying the internal hardware
design (devices architecture), and also to know about the size, number and the size of
the registers.
A microcontroller is a single chip that contains the processor (the CPU), nonvolatile memory for the program (ROM or flash), volatile memory for input and
output (RAM), a clock and an I/O control unit. Also called a "computer on a chip,"
billions of microcontroller units (MCUs) are embedded each year in a myriad of
products from toys to appliances to automobiles. For example, a single vehicle can
use 70 or more microcontrollers. The following picture describes a general block
diagram of microcontroller.
AT89S52:
The pin diagram of the 8051 shows all of the input/output pins unique to
microcontrollers:
Internal ROM 8k
clock circuits.
PIN DESCRIPTION
Ground
RST (Pin 9)
RESET pin
2.INPUT pin
External Access: EA 31
Output Pin
PORT 0
Pins 32-39
PORT 1
Pins 1 through 8
No dual function
PORT 2
Pins 21 through 28
Dual Function: Along with Port 0 used to provide the 16Bit address for external memory. It provides higher
address A8-A16
PORT 3
Pins 10 through 17
ALU
REGISTERS
WORKING REGISTERS
INDEX REGISTERS
Memory Organization
Program Memory
Data Memory
The right half of the internal and external data memory spaces available on
Atmels Flash microcontrollers. Hardware configuration for accessing up to 2K
bytes of external RAM. In this case, the CPU executes from internal Flash.
Port 0 serves as a multiplexed address/data bus to the RAM, and 3 lines of
Port 2 are used to page the RAM. The CPU generates RD and WR signals as
needed during external RAM accesses. You can assign up to 64K bytes of
external data memory. External data memory addresses can be either 1 or 2
bytes wide. One-byte addresses are often used in conjunction with one or
more other I/O lines to page the RAM. Two-byte addresses can also be used,
in which case the high address byte is emitted at Port 2.
Internal data memory addresses are always 1 byte wide, which implies an
address space of only 256 bytes. However, the addressing modes for internal
RAM can in fact accommodate 384 bytes. Direct addresses higher than 7FH
access one memory space, and indirect addresses higher than 7FH access a
different memory space. Thus, the Upper 128 and SFR space occupying the
same block of addresses, 80H through FFH, although they are physically
separate entities. The lowest 32 bytes are grouped into 4 banks of 8 registers.
Program instructions call out these registers as R0 through R7. Two bits in the
Program Status Word (PSW) select which register bank is in use. This
architecture allows more efficient use of code space, since register
instructions are shorter than instructions that use direct addressing.
All members of the Atmel microcontroller family execute the same instruction set. This
instruction set is optimized for 8- bit control applications and it provides a variety of fast
addressing modes for accessing the internal RAM to facilitate byte operations on small
data structures. The instruction set provides extensive support for 1-bit variables as a
separate data type, allowing direct bit manipulation in control and logic systems that
require Boolean processing. The following overview of the instruction set gives a brief
description of how certain instructions can be used.
The bits RS0 and RS1 select one of the four register banks shown in Figure 8. A number
of instructions refer to these RAM locations as R0 through R7. The status of the RS0 and
RS1 bits at execution time determines which of the four banks is selected. The Parity bit
reflects the number of 1s in the Accumulator: P=1 if the Accumulator contains an odd
number of 1s, and P=0 if the Accumulator contains an even number of 1s.
Thus, the number of 1s in the Accumulator plus P is always even. Two bits in the PSW
are uncommitted and can be used as general purpose status flags.
Addressing Modes
The addressing modes in the Flash microcontroller instruction set are as follows.
Direct Addressing
In direct addressing, the operand is specified by an 8-bit address field in the instruction.
Only internal data RAM and SFRs can be directly addressed.
Indirect Addressing
In indirect addressing, the instruction specifies a register that contains the address of the
operand. Both internal and external RAM can be indirectly addressed. The address
register for 8-bit addresses can be either the Stack Pointer or R0 or R1 of the selected
register bank. The address register for 16-bit addresses can be only the 16-bit data
pointer register, DPTR.
Register Instructions
The register banks, which contain registers R0 through R7, can be accessed by
instructions whose opcodes carry a 3- bit register specification. Instructions that access
the registers this way make efficient use of code, since this mode eliminates an address
byte. When the instruction is executed, one of the eight registers in the selected bank is
accessed. One of four banks is selected at execution time by the two bank select bits in
the PSW.
Register-Specific Instructions
Some instructions are specific to a certain register. For example, some instructions
always operate on the Accumulator, so no address byte is needed to point to it. In these
cases, the opcode itself points to the correct register. Instructions that refer to the
Accumulator as A assemble as Accumulator-specific opcodes.
Indexed Addressing
Program memory can only be accessed via indexed addressing. This addressing mode is
intended for reading look-up tables in program memory. A 16-bit base register (either
DPTR or the Program Counter) points to the base of the table, and the Accumulator is set
up with the table entry number. The address of the table entry in program memory is
formed by adding the Accumulator data to the base pointer. Another type of indexed
addressing is used in the case jump instruction. In this case the dest ination address of
a jump instruction is computed as the sum of the base pointer and the Accumulator data.
SRAM
DRAM
OTP ROM
EPROM
EEPROM
FLASH
BUSES
Data bus
Address bus
Control bus
CONTROLLER LOGIC
I/O Peripherals
Parallel Ports.
Serial Ports.
ADC/DAC.
Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation selected by
the user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2, DB3,
DB4, DB5, DB6, and DB7.
Liquid Crystal Display also called as LCD is very helpful in providing user interface as well
as for debugging purpose. The most common type of LCD controller is HITACHI 44780
which provides a simple interface between the controller & an LCD. These LCD's are very
simple to interface with the controller as well as are cost effective.
Symbol
Function
Vss
Ground
Vdd
Supply Voltage
Vo
Contrast Setting
RS
Register Select
R/W
Read/Write Select
En
A/Vee
16
When RS is low (0), the data is to be treated as a command. When RS is high (1), the data
being sent is considered as text data which should be displayed on the screen.
When R/W is low (0), the information on the data bus is being written to the LCD. When RW
is high (1), the program is effectively reading from the LCD. Most of the times there is no
need to read from the LCD so this line can directly be connected to Gnd thus saving one
controller line.
The ENABLE pin is used to latch the data present on the data pins. A HIGH - LOW signal is
required to latch the data. The LCD interprets and executes our command at the instant the
EN line is brought low. If you never bring EN low, your instruction will never be executed.
LAYERS OF PCB:
*.BOT - bottom copper
*.SMB - Solder mask bottom
*.SST - Silk screen top
*.ASY - Assembly top, contains the board outline
*.DS - drill sizes
Tracks Restricted Area
Tracks should not be located on the areas that can cause them to be peeled off easily. One of
the restricted areas is holes on the PCB which are used to mount screws or PCB spacers.
These holes are usually used to secure the PCB to a casing or to secure it in a fixed place.
The edges of the PCB should not have any tracks as these areas are usually used to transport
the PCB from one process to another process by using a conveyor belt. These edges are
places where the possibility of scratches and cracking of the PCB happens. The
recommended areas that should not have any track is as shown in the diagram below
assuming a hole diameter of 4 mm which is used to mount a PCB spacer.
Take great care to avoid touching the mains flex with the tip of the iron.
The iron should have a heatproof flex for extra protection. An ordinary plastic flex
will melt immediately if touched by a hot iron and there is a serious risk of burns and
electric shock.
Always return the soldering iron to its stand when not in use.
Never put it down on your workbench, even for a moment!
PCB LAYOUT:
Microcontroller with LCD
Power Supply:
Keypad:
Applications:
Advantages:
There is no requirement of any labour, it runs automatically & decreases dependability on
human.
The chances of errors are less compared to manual system.
Future Scope:
REFERENCE BOOKS:
WEB-SITES:
www.alldatasheets.com
www.datasheetarchieve.com
www.atmel.com