You are on page 1of 53

HBeonLabs

Off. No. 46, 1st Floor, Kadamba Complex


Gamma-I, Greater Noida (India) - 201308

Contact us:

+91-120-4298000
+91-9212314779


info@hbeonlabs.com

training@hbeonlabs.com

www. hbeonlabs.com




CHAPTER 1 INTRODUCTION & COMPONENTS
INTRODUCTION

Automatic College Bell (AT89S52 & DS1307).
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) which track 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 LCD 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.

This is very wonderful project to control the working of College Bell. These
bell are equipped with the CPU which control the bell.
1. 8051 Microcontroller
2. DS1307
3. LCD .
4.Relay
In this project we try to give the same prototype as Manual Switching Bell
with the help of programmed micro-controller . We are using ATMEL
microcontroller 8051 to control all the function as CPU. Microcontroller
controls the ringing of bell
WHAT IS EMBEDDED TECHNOLOGY

Embedded technology is software or hardware that is hidden embedded
in a large device or system. It typically refers to a fixed function device,
as compared with a PC, which runs general purpose application.
Embedded technology is nothing new. It all around us and has been for
years. An early example of embedded technology is the engine control
unit in a car, which measures what setting to give the engine. Your
coffee maer has embedded technology in the form of a
microcontroller, which is what tells it to mae the coffee at ! a.m. the
vending machine has it too. "verall, billions of devices woven into
everyday life use embedded technology. In the past embedded
technology existed in standalone device vending machines and copiers
that did their #obs with little regard for what went on around them,. $ut
as technology has learned to connect device to the internet and to each
other, embedded technology potential has grown. %uddenly it is and
what actions those connections let them perform. Cell phone companies
figured that out a long time ago, which is why cell phones are cheap and
the service, plans are expensive. It is not the phone itself that matters,
but the connectivity to a vast networ of other phones, other people
and the internet. &ntil you download software that lets you find a local
restaurant or mange your finances. 'et say you mae free(ers the big,
expensive ind that grocery stores buy. You sell ne and you are done
with that customer. )hen it braes the customer calls a service person,
who probably comes from somewhere other than your company. $ut let
us say that free(er nows that it is about to go on the frit(. 'et say three
refrigerator alerts the customer before it breas. $etter yet, let us say
the free(er alerts the manufacturer and you are able to send a service
person to do preventative wor and save a lot of haagen* da(s from
melting. Embedded technology allows all of that to happen. You, the
free(er company have
transformed yourself from a product company to product and services
company. +he possibilities go beyond that programming device to
communicate with businesses can eliminate the need for costly call
centers. Copy machines that can order their own replacement cartridges
will save businesses time and money. ,emember, the fact the
technology is embedded is not what important, and neither is the
device.



APPLICATIONS
Telecom
-obile phone systems .handsets and base stations/, modems,
routers
Automotive application
$raing system, +raction control, Airbag release system,
-anagement units, and %teer*by*wire systems.
Domestic application
0ishwasher, television, washing machines, microwave ovens,
1ideo recorders, %ecurity system, 2arage door controllers,
Calculators, 0igital watches, 1C,s, 0igital cameras, ,emote
Controls, +readmills
Robotic
3ire fighting robot, Automatic floor cleaner, robotic arm
Aerospace application
3light control system, Engine controllers, Autopilots, Passenger
entertainment system
Medical equipment
Anesthesia monitoring system, EC2 monitors, Pacemaers, 0rug
delivery systems, -,I scanners
Defense system
,adar systems, 3ighter aircraft flight control system, ,adio system,
-issile guidance systems
Office automation
'aser printers, 3ax machines, Pagers, Cash registers, 2as pumps,
Credit 40ebit card readers, +hermostats, 2rain analy(ers.

COMPONENTS
LIST OF COMPO!TS "S!D
A"TOMATIC COLL!#! $!LL
5ame Capacity 6uantity Codes
,egulators 789: ; &;
78;< ; &=
Capacitor ;999>f ; C;
Capacitor ;9>f ; C<
Ceramic
Capacitor
<<pf < C=,C?
0iode ? 0;,0<,0=,0?
Push $utton : %);,%)<,%)=,%)?,%)7
?9 Pin $ase ; &<
8 Pin $ase ; &?
89:; .A+8@%:</ ; &<
,+C 0%;=97 ; &?
"scillator ;;.9:@<mh( ; A+';
"scillator =<.7!8h( ; A+'<
'C0 ;!B< ; 'C0
'E0 = 0:,0!,07
,esistance <<9C ! ,?,,;,,!,,7,,:,,8
,esistance ; ; ,=
,esistance ;9 ? ,<,,@,,;;,,;9
$attery =1 ; $+;
+ransistors $C:?7 = 6;,6<,6=
$&DDE, ; $&D
=1 cell holder
base
$+;
< pin %C,E)
connector
; E;



COMPONENT DESCRIPTION
MICRO%COTROLL!R &'() D!SCRIPTIO
+he IC 89:; is a low*powerF high*performance C-"% 8*bit
microcomputer with ?G bytes of 3lash programmable and erasable read
only memory .PE,"-/. +he device is manufactured using AtmelHs high*
density nonvolatile memory technology and is compatible with the
industry*standard -C%*:; instruction set and pin out. +he on*chip 3lash
allows the program memory to be reprogrammed in*system or by a
conventional nonvolatile memory programmer. $y combining a versatile
8*bit CP& with 3lash on a monolithic chip, the Atmel IC 89:; is a
powerful microcomputer which provides a highly*flexible and cost*
effective solution to many embedded control applications. +he IC 89:;
provides the following standard featuresI ?G bytes of 3lash, ;<8 bytes of
,A-, =< I4" lines, two ;!*bit timer4counters, a five vector two*level
interrupt architecture, full duplex serial port, on*chip oscillator and cloc
circuitry. In addition, the IC 89:; is designed with static logic for
operation down to (ero freJuency and supports two software selectable
power saving modes. +he Idle -ode stops the CP& while allowing the
,A-, timer4counters, serial port and interrupt system to continue
functioning.
+ransformer ;<*9*;< ;
Printed PC$ ;
,elays < ,';,,'<
<pin connectors male < E:,E!
;!pin connector male ; 'C0
Pin Description of the 8051
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
P1.0
P1.1
P1.2
P1.3
P1.4
P1.5
P1.6
P1.7
RST
(RXD)P3.0
(TXD)P3.1
(T0)P3.4
(T1)P3.5
XTAL2
XTAL1
GND
(INT0)P3.2
(INT1)P3.3
(RD)P3.7
(WR)P3.6
Vcc
P0.0(AD0)
P0.1(AD1)
P0.2(AD2)
P0.3(AD3)
P0.4(AD4)
P0.5(AD5)
P0.6(AD6)
P0.7(AD7)
EA/VPP
ALE/PROG
PSEN
P2.7(A15)
P2.6(A14)
P2.5(A13)
P2.4(A12)
P2.3(A11)
P2.2(A10)
P2.1(A9)
P2.0(A8)
8051
(8031)

Figure No. 1.1: Pin Diagram of 8051




PROC!SSOR
A processor is an electronic device capable of manipulating data in a way
specified by a seJuence of instructions.
ISTR"CTIOS
Instructions in a computer are binary numbers #ust lie data. 0ifferent
numbers, when read and executed by a processor, cause different things
to happen. +he instructions are also called opcodes or machine codes.
0ifferent bit patterns activate or deactivate different parts of the
processing core. Every processor has its own instruction set varying in
number, bit pattern and functionality.
PRO#RAM
+he seJuence of instructions is what constitutes a program. +he
seJuence of instructions may be altered to suit the application.
ASS!M$L* LA#"A#!
)riting and understanding such programs in binary or hexadecimal
form is very difficult ,so each instructions is given a symbolic notation in
English language called as mnemonics. A program written in mnemonics
3orm is called an assembly language program. $ut it must be converted
into machine language for execution by processor.

ASS!M$L!R
An assembly language program should be converted to machine
language for execution by processor. %pecial software called A%%E-$'E,
converts a program written in mnemonics to its eJuivalent machine
opcodes.
+I#+ L!,!L LA#"A#!
A high level language lie C may be used to write programs for
processors. %oftware called compiler converts this high level language
program down to machine code. Ease of programming and portability.
PI D!SCRIPTIO
1CC .Pin ?9/
Provides voltage to the chip . K:1
250 .Pin <9/
2round
A+A'; .Pin ;@/ and A+A'< .Pin ;8/
Crystal "scillator connected to pins ;8, ;@.+wo capacitors of =9p3 value.
+ime for one machine cycleI;;.9:@<4;<L;.98: > secs

,%+ .Pin @/
,E%E+ pin
;.Active high. "n applying a high pulse to this pin, microcontroller will
reset and terminate all activities.
<.I5P&+ pin
=.-inimum < machine cycles reJuired to mae ,E%E+
?.1alue of registers after ,E%E+


!-ternal Access. !A /)
MConnected to 1CC for on chip ,"-
MConnected to 2round for external ,"- containing the code Input Pin
Pro0ram Store !nable. PS! 12
M"utput Pin
MIn case of external ,"- with code it is connected to the "E pin of the
,"-
Address Latc3 !nable. AL! /'
M "utput Pin. Active high
MIn case of external ,"- ,A'E is used to de multiplex .P",+ 9/ the
address and data bus by connecting to the 2 pin of 7?'%=7= chip
I4O Port Pins and t3eir Functions.
M3our ports P9,P;,P<,P= with 8 pins each, maing a total of =<
input4output pins
M"n ,E%E+ all ports are configured as output. +hey need to be
programmed to mae them function as inputs
PORT '
MPins =<*=@
MCan be used as both Input or "utput
MExternal pull up resistors of ;9G need to be connected
M0ual roleI 89:; multiplexes address and data through port 9 to save
pins .A09*A07
MA'E is used to de multiplex data and address bus
PORT )
MPins ; through 8
M$oth input or output
M5o dual function
MInternal pull up registers
M"n ,E%E+ configured as output
PORT 1
MPins <; through <8
M5o external pull up resistor reJuired
M$oth input or output
M0ual 3unctionI Along with Port 9 used to provide the ;!*$it address for
external memory. It provides higher address A8*A;!
PORT /
MPins ;9 through ;7
M5o external pull up resistors reJuired
PROC!SSOR ARC+IT!CT"R!
Block Diagram
CPU
On-chip
RAM
On-chip
ROM for
program
code
4 I/O Ports
Timer 0
Serial
Port
OSC
Interrupt
Control
External interrupts
Timer 1
Timer/Counter
Bus
Control
TxD RxD
P0 P1 P2 P3
Address/Data
Counter
Inputs











3igure 5o. ;.=I $loc 0iagram of -icrocontroller

AL"
+he Arithmetic 'ogic &nit .A'&/ performs the internal arithmetic
manipulation of data line processor. +he instructions read and executed
by the processor decide the operations performed by the A'& and also
control the flow of data between registers and A'&. "perations
performed by the
A'& are Addition , %ubtraction , 5ot , A50 , 5A50 , ", , 5", , A", ,
%hift 'eft4,ight , ,otate 'eft4right , Compare etc. %ome A'& supports
-ultiplication and 0ivision. "perands are generally transferred from
two registers or from one register and memory location to A'& data
inputs. +he result of the operation is the placed bac into a given
destination register or memory location from A'& output.
R!#IST!RS
,egisters are the internal storage for the processor. +he number of
registers varies significantly between processor architectures.
M)",GI52 ,E2I%+E,%
+emporary storage during A'& "perations and data transfers.
MI50EA ,E2I%+E,%
Points to memory addresses.
M%+A+&% ,E2I%+E,%
%tores the current status of various flags denoting conditions resulting
from various operations.
MC"5+,"' ,E2I%+E,%
Contains configuration bits that affect processor operation and the
operating modes of various internal subsystems.

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.









Programming Status Word:



The Instruction Set
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.

Program Status Word
The Program Status Word (PSW) contains status bits that reflect the current state of the
CPU. The PSW, shown in Figure 11, resides in SFR space. The PSW contains the
Carry bit, the Auxiliary Carry (for BCD operations), the tworegister bank select bits, the
Overflow flag, a Parity bit, and two user-definable status flags. The Carry bit, in addition
to serving as a Carry bit in arithmetic operations, also serves as the Accumulator for a
number of Boolean operations.
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.


5SRAM
1olatile, fast, low capacity, expensive, reJuires lesser external support circuitry.
5DRAM
1olatile, relatively slow, highest capacity needs continuous refreshing. Nence
reJuire external circuitry.
5OTP ROM
"ne time programmable, used for shipping in final products.
5!PROM
Erasable programmable, &1 Erasing, &sed for system development and
debugging.
5!!PROM
Electrically erasable and programmable, can be erased programmed in* circuit,
&sed for storing system parameters.
5FLAS+
Electrically programmable O erasable, large capacity, organi(ed as sectors.
$"S!S
A bus is a physical group of signal lines that have a related function. $uses allow
for the transfer of electrical signals between different parts of the processor
Processor buses are of !ree "#es$
M0ata bus
MAddress bus
MControl bus
COTROLL!R LO#IC
Processor brain decodes instructions and generate control signal for various sub
units. It has full control over the cloc distribution unit of processor.
I4O Perip3erals
+he I4" devices are used by the processor to communicate with the external
world
MParallel Ports.
M%erial Ports.
MA0C40AC.

About 6eil u,ision /

Geil %oftware to provide you with software development tools for 89:;
based microcontrollers. )ith the Geil tools, you can generate
embedded applications for virtually every 89:; derivative. +he
supported microcontrollers are listed in the >1ision
De7ice Database8. +he Geil %oftware 89:; development tools are
designed for the professional software developer, but any level of
programmer can use them to get the most out of the 89:;
microcontroller architecture.
6eil soft9are con7erts t3e C%codes into t3e Intel +e- code:







A 7ie9 of 6eil u,ision /



&'() $urner Soft9are


51 BURNER provides you with software burning tools for 8051 based
Microcontrollers in there Flash memory. The 51 BURNER tools, you can burn
AT89SXXXX series of ATMEL microcontrollers .










DESCRIPTION OF

DESCRIPTION OF REAL TIME CLOCK TIME CLOCK


DETAILED DESCRIPTION

The DS1307 is a low-power clock/calendar with 56 bytes of battery
clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The
date at the end of the month is automatically adjusted fo
including corrections for leap year. The DS1307 operates as a slave device on the I2C bus.
Access is obtained by implementing a START condition and providing a device identification
code followed by a register address. Sub
STOP condition is executed. When VCC falls below 1.25 x VBAT, the device terminates an
access in progress and resets the device address counter. Inputs to the device will not be
recognized at this time to prevent erroneous data from being written to the device from an out
tolerance system. When VCC falls below VBAT, the device switches into a low
backup mode. Upon power-up, the device switches from battery to VCC when VCC is greater
DETAILED DESCRIPTION
power clock/calendar with 56 bytes of battery
clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The
date at the end of the month is automatically adjusted for months with fewer than 31 days,
including corrections for leap year. The DS1307 operates as a slave device on the I2C bus.
Access is obtained by implementing a START condition and providing a device identification
code followed by a register address. Subsequent registers can be accessed sequentially until a
STOP condition is executed. When VCC falls below 1.25 x VBAT, the device terminates an
access in progress and resets the device address counter. Inputs to the device will not be
to prevent erroneous data from being written to the device from an out
tolerance system. When VCC falls below VBAT, the device switches into a low
up, the device switches from battery to VCC when VCC is greater

power clock/calendar with 56 bytes of battery-backed SRAM. The
clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The
r months with fewer than 31 days,
including corrections for leap year. The DS1307 operates as a slave device on the I2C bus.
Access is obtained by implementing a START condition and providing a device identification
sequent registers can be accessed sequentially until a
STOP condition is executed. When VCC falls below 1.25 x VBAT, the device terminates an
access in progress and resets the device address counter. Inputs to the device will not be
to prevent erroneous data from being written to the device from an out-of-
tolerance system. When VCC falls below VBAT, the device switches into a low-current battery-
up, the device switches from battery to VCC when VCC is greater
than VBAT +0.2V and recognizes inputs when VCC is greater than 1.25 x VBAT. The block
diagram in Figure 1 shows the main elements of the serial RTC.
OSCILLATOR CIRCUIT

The DS1307 uses an external 32.768kHz crystal. The oscillator circuit does not require any
external resistors or capacitors to operate. Table 1 specifies several crystal parameters for the
external crystal. Figure 1 shows a functional schematic of the osci
with the specified characteristics, the startup time is usually less than one second.

CLOCK ACCURACY

The accuracy of the clock is dependent upon the accuracy of the crystal and the accuracy of the
match between the capacitive load of the oscillator circuit and the capacitive load for which the
crystal was trimmed. Additional error will be added by crystal frequency drift caused by
temperature shifts. External circuit noise coupled into the oscillator circuit may result
clock running fast. Refer to Application Note 58:
Clocks for detailed information
han VBAT +0.2V and recognizes inputs when VCC is greater than 1.25 x VBAT. The block
diagram in Figure 1 shows the main elements of the serial RTC.

The DS1307 uses an external 32.768kHz crystal. The oscillator circuit does not require any
external resistors or capacitors to operate. Table 1 specifies several crystal parameters for the
external crystal. Figure 1 shows a functional schematic of the oscillator circuit. If using a crystal
with the specified characteristics, the startup time is usually less than one second.
The accuracy of the clock is dependent upon the accuracy of the crystal and the accuracy of the
pacitive load of the oscillator circuit and the capacitive load for which the
crystal was trimmed. Additional error will be added by crystal frequency drift caused by
temperature shifts. External circuit noise coupled into the oscillator circuit may result
clock running fast. Refer to Application Note 58: Crystal Considerations with Dallas Real
for detailed information
han VBAT +0.2V and recognizes inputs when VCC is greater than 1.25 x VBAT. The block
The DS1307 uses an external 32.768kHz crystal. The oscillator circuit does not require any
external resistors or capacitors to operate. Table 1 specifies several crystal parameters for the
llator circuit. If using a crystal
with the specified characteristics, the startup time is usually less than one second.
The accuracy of the clock is dependent upon the accuracy of the crystal and the accuracy of the
pacitive load of the oscillator circuit and the capacitive load for which the
crystal was trimmed. Additional error will be added by crystal frequency drift caused by
temperature shifts. External circuit noise coupled into the oscillator circuit may result in the
Crystal Considerations with Dallas Real-Time

RTC AND RAM ADDRESS MAP

Table 2 shows the address map for the DS1307 RTC and RAM registers. The RTC registers are
located in address locations 00h to 07h. The RAM registers are located in address locations 08h
to 3Fh. During a multibyte access, when the address pointer reaches 3Fh, the end of RAM space,
it wraps around to location 00h, the beginning of the clock space.

CLOCK AND CALENDAR

The time and calendar information is obtained by reading the appropriate register bytes. Table 2
shows the RTC registers. The time and calendar are set or initialized by writing the appropriate
register bytes. The contents of the time and calendar registers are in the BCD format. The day-of-
week register increments at midnight. Values that correspond to the day of week are user-defined
but must be sequential (i.e., if 1 equals Sunday, then 2 equals Monday, and so on.) Illogical time
and date entries result in undefined operation. Bit 7 of Register 0 is the clock halt (CH) bit. When
this bit is set to 1, the oscillator is disabled. When cleared to 0, the oscillator is enabled. On first
application of power to the device the time and date registers are typically reset to 01/01/00 01
00:00:00 (MM/DD/YY DOW HH:MM:SS). The CH bit in the seconds register will be set to a 1.
The clock can be halted whenever the timekeeping functions are not required, which minimizes
current (IBATDR).

The DS1307 can be run in either 12-hour or 24-hour mode. Bit 6 of the hours register is defined
as the 12-hour or 24-hour mode-select bit. When high, the 12-hour mode is selected. In the 12-
hour mode, bit 5 is the AM/PM bit with logic high being PM. In the 24-hour mode, bit 5 is the
second 10-hour bit (20 to 23 hours). The hours value must be re-entered whenever the 12/24-
hour mode bit is changed.

When reading or writing the time and date registers, secondary (user) buffers are used to prevent
errors when the internal registers update. When reading the time and date registers, the user
buffers are synchronized to the internal registers on any I2C START. The time information is
read from these secondary registers while the clock continues to run. This eliminates the need to
re-read the registers in case the internal registers update during a read. The divider chain is reset
whenever the seconds register is written. Write transfers occur on the I2C acknowledge from the
DS1307. Once the divider chain is reset, to avoid rollover issues, the remaining time and date
registers must be written within one second.




,OLA#! R!#"LATOR
1oltage regulator ICs are available with fixed .typically :, ;< and ;:1/ or variable
output voltages. +he maximum current they can pass also rates them. 5egative
voltage regulators are available, mainly for use in dual supplies. -ost regulators
include some automatic protection from excessive current .over load protection/
and overheating .thermal protection/. -any of fixed voltage regulator ICs has =
leads. +hey include a hole for attaching a heat sin if necessary.

3igure 5o. ;.:I 789: 1oltage ,egulator


D!SCRIPTIO
+hese voltage regulators are monolithic circuit integrated circuit designed as
fixed voltage regulators for a wide variety of applications including local, on card
regulation. +hese regulators employ internal current limiting, thermal shutdown,
and safe*area compensation. )ith adeJuate heat sining they can deliver output
current in excess of ;.9 A. Although designed primarily as a fixed voltage
regulator, these devices can be used with external components to obtain
ad#ustable voltage and current.
F!AT"R!S
M"utput current in Excess of ;.9 A
M5o external component reJuired
MInternal thermal overload protection
MInternal short circuit current limiting
M"utput transistor safe*area compensation
M"utput voltage offered in <P and ?P tolerance
MAvailable I n surface mount 0<PAG and standard =*lead transistor pacages
MPrevious commercial temperature range has been extended to a #unction
temperature range of *?9 degree C to K;<: degree C.

LCD DISPLAY
D!SCRIPTIO OF LCD DISPLA*
+his is the first interfacing example for the Parallel Port. )e will start with
something simple. +his example doesnQt use the $i*directional feature found on
newer ports, thus it should wor with most, if not all Parallel Ports. It however
doesnQt show the use of the %tatus Port as an input. +hese 'C0 -odules are very
common these days, and are Juite simple to wor with, as all the logic reJuired to
run them is on board.
SC+!MATIC DIA#RAM


3igure 5o. ;.8I %chematic 0iagram of 'C0 0isplay



CIRC"IT D!SCRIPTIO
Above is the Juite simple schematic. +he 'C0 panelQs Enable and ,egister %elect
is connected to the Control Port. +he Control Port is an open collector 4 open
drain output. )hile most Parallel Ports have internal pull*up resistors, there is a
few which donQt. +herefore by incorporating the two ;9G external pull up
resistors, the circuit is more portable for a wider range of computers, some of
which may have no internal pull up resistors. )e mae no effort to place the
0ata bus into reverse direction. +herefore we hard wire the ,4) line of the 'C0
panel, into write mode. +his will cause no bus conflicts on the data lines. As a
result we cannot read bac the 'C0Qs internal $usy 3lag which tells us if the 'C0
has accepted and finished processing the last instruction. +his problem is
overcome by inserting nown delays into our program. +he ;9 Potentiometer
controls the contrast of the 'C0 panel. 5othing fancy here. As with all the
examples, IQve left the power supply out. You can use a bench power supply set to
:v or use an onboard K: regulator. ,emember a few de*coupling capacitors,
especially if you have trouble with the circuit woring properly. +he < line x ;!
character 'C0 modules are available from a wide range of manufacturers and
should all be compatible with the N0??789. +he diagram to the right shows the
pin numbers for these devices. )hen viewed from the front, the left pin is pin ;!
and the right pin is pin ;.





3igure 5o. ;.@I 'C0 0isplay
Figure 1 shows how to inte ace 7*seg display to a microcontroller. 5ow we create
a looup table containing the seven segment pattern to display the corresponding
hex digits. e.g. consider we have to display Q;Q from the above figure we come to
now that turning "5 segment $ O C will show Q;Q on the 7*seg display so P<.; O
P<.< should be '"2IC 9 whereas rest of the pins should be '"2IC ;. FIGURE 2
shows the looup table for CA display.





POWER SUPPLY


$RID#! R!CTIFI!R
$ridge rectifier circuit consists of four diodes arranged in the form of a bridge as
shown in figure.

OP!RATIO
0uring the positive half cycle of the input supply, the upper end A of the
transformer secondary becomes positive with respect to its lower point $. +his
maes Point; of bridge Positive with respect to point <. +he diode 0; O 0<
become forward biased O 0= O 0? become reverse biased. As a result a current
starts flowing from point;, through 0; the load O 0< to the negative end. 0uring
negative half cycle, the point< becomes positive with respect to point;. 0iodes 0;
O 0< now become reverse biased. +hus a current flow from point < to point;.
TRANS%ORMER
+ransformer is a ma#or class of coils having two or more windings usually
wrapped around a common core made from laminated iron sheets. It has two cols
named primary and secondary. If the current flowing through primary is
fluctuating, then a current will be inducted into the secondary winding. A steady
current will not be transferred from one coil to other coil.

Tra&sfor'ers are of (o "#es$
;.%tep up transformer
<.%tep down transformer
In the power supply we use step down transformer. )e apply <<91 AC on the
primary of step down transformer. +his transformer step down this voltages to !1
AC. )e 2ive !1 AC to rectifier circuit, which convert it to :1 0C.

DIODE
+he diode is a p*n #unction device. 0iode is the component used to control the
flow of the current in any one direction. +he diode widely wors in forward bias.


0iode )hen the current flows from the P to 5 direction. +hen it is in forward
bias. +he Dener diode is used in reverse bias function i.e. 5 to P direction. 1isually
the identification of the diodeRs terminal can be done by identifying he
silver4blac line. +he silver4blac line is the negative terminal .cathode/ and the
other terminal is the positive terminal .cathode/.
APPLICATIO
M0iodesI ,ectification, free*wheeling, etc
MDener diodeI 1oltage control, regulator etc.
M+unnel diodeI Control the current flow, snobbier circuit, etc
RESISTORS
+he flow of charge through any material encounters an opposing force similar in
many respects to mechanical friction .this opposing force is called resistance of
the material .in some electric circuit resistance is deliberately introduced in form
of resistor. ,esistor used fall in three categories , only two of which are color
coded which are metal film and carbon film resistor .the third category is the wire
wound type ,where value are generally printed on the vitreous paint finish of the
component. ,esistors are in ohms and are represented in 2ree letter omega,
loos as an upturned horseshoe. -ost electronic circuit reJuire resistors to mae
them wor properly and it is obliviously important to find out something about
the different types of resistors available. ,esistance is measured in ohms, the
symbol for ohm is an omega ohm. ; ohm is Juite small for electronics so
resistances are often given in ohm and -ohm.
,esistors used in electronics can have resistances as low as 9.; ohm or as high as
;9 -ohm.

F"CTIO
,esistor restrict the flow of electric current, for example a resistor is placed in
series with a light*emitting diode.'E0/ to limit the current passing through the
'E0.
TYPES O% RESISTORS
FI;!D ,AL"! R!SISTORS
It includes two types of resistors as carbon film and metal film .+hese two types
are explained under
): CAR$O FILM R!SISTORS
0uring manufacture, at in film of carbon is deposited onto a small ceramic rod.
+he resistive coating is spiraled away in an automatic machine until the resistance
between there two ends of the rods is as close as possible to the correct value.
-etal leads and end caps are added, the resistors is covered with an insulating
coating and finally painted with colored bands to indicate the resistor value




3igure 5o. ;.;:I Carbon 3ilm ,esistors
Another example for a Carbon <<999 "hms or << Gilo*"hms also nown as <<G
at :P toleranceI $and ; L ,ed, ;st digit $and < L ,ed, <nd digit $and = L "range,
=rd digit, multiply with (eros, in this case = (eroQs $and ? L 2old, +olerance, :P


M!TAL FILM R!SISTORS
-etal film and metal oxides resistors are made in a similar way, but can be made
more accurately to within S<P or S;P of their nominal vale there are some
difference in performance between these resistor types, but none which affects
their use in simple circuit.
WIRE WOUND RESISTOR
A wire wound resistor is made of metal resistance wire, and because of this, they
can be manufactured to precise values. Also, high wattage resistors can be made
by using a thic wire material. )ire wound resistors cannot be used for high
freJuency circuits. Coils are used in high freJuency circuit. )ire wound resistors
in a ceramic case, strengthened with special cement. +hey have very high power
rating, from ; or < watts to do(ens of watts. +hese resistors can become
extremely hot when used for high power application, and this must be taen into
account when designing the circuit.

T!STI#
,esistors are checed with an ohm meter4millimeter. 3or a defective resistor the
ohm*meter shows infinite high reading.
CAPACITORS
In a way, a capacitor is a little lie a battery. Although they wor in completely
different ways, capacitors and batteries both store electrical energy. If you have
read Now $atteries )or , then you now that a battery has two terminals. Inside
the battery, chemical reactions produce electrons on one terminal and absorb
electrons at the other terminal.
$ASIC
'ie a battery, a capacitor has two terminals. Inside the capacitor, the terminals
connect to two metal plates separated by a dielectric. +he dielectric can be air,
paper, plastic or anything else that does not conduct electricity and eeps the
plates from touching each other. You can easily mae a capacitor from two pieces
of aluminum foil and a piece of paper. It wonQt be a particularly good capacitor in
terms of its storage capacity, but it will wor.
In an electronic circuit, a capacitor is shown lie thisI



3igure 5o. ;.;7I %ymbol of Capacitor
)hen you connect a capacitor to a battery, hereHs what happensI
M+he plate on the capacitor that attaches to the negative terminal of the battery
accepts electrons that the battery is producing.
M+he plate on the capacitor that attaches to the positive terminal of the battery
loses electrons to the battery.

T!STI#
+o test the capacitors, either analog meters or specia
l digital meters with the specified function are used. +he non*electrolyte capacitor
can be tested by using the digital meter.
-ulti T meter mode I Continuity Positive probe I "ne end 5egative probe I
%econd end 0isplay I R9R.beep sound occur/ R"'R ,esult I 3aulty "G


LED
'E0 falls within the family of P*5 #unction devices. +he light emitting diode .'E0/ is
a diode that will give off visible light when it is energi(ed. In any forward biased
P*5 #unction there is, with in the structure and primarily close to the #unction, a
recombination of hole and electrons. +his recombination reJuires that the energy
possessed by the unbound free electron be transferred to another state. +he
process of giving off light by applying an electrical source is called
electroluminescence.


'E0 is a component used for indication. All the functions being carried out are
displayed by led .+he 'E0 is diode which glows when the current is being flown
through it in forward bias condition. +he 'E0s are available in the round shell and
also in the flat shells. +he positive leg is longer than negative leg.



CHAPTER ) LITERATURE RE*IEW
PR!+ISTOR*. &'<&
In fact, it should have started with chapter *<, the invention of microprocessor.
Intel introduced a single*chip processor, the ?99?, in ;@7;. It was a ?*bit
microprocessor, with whopping processing speed of ;99 thousand operations per
second, and was meant for an electronic calculator. +here is a lot of ?*bit
processing in calculators, especially if the software is based on $C0 arithmetics.
'ater Intel introduced the 8*bitter 8998 and itQs grown*up brother * the famous
8989 .which then was perfected by an ex*Intel employee as Dilog D89, one of the
best 8*bit microprocessors of all times/. In ;@7!, Intel introduced its first
microcontroller, 89?8. It integrated the processing core with code and data
memory and certain peripherals. +he code memory was a ;$ mas ,"- .defined
by the last metallisation mas during the chip processing/ or EP,"- .after all,
Intel invented EP,"-/, the data memory was !? bytes of ,A- .including the 8*
level stac and two pages of eight general purpose registers/. $esides general*
purpose I4" .see below/, peripherals included a timer and an external interrupt
.plus the necessary interrupt system/. Although the 89?8 is clearly an 8*bit
architecture, it is said to be an ancestor of the ?*bit ?99? rather than the 8989.
Also it is said to bear remarable similarities to 3airchild 38 microprocessor.
+oday, it is hard to say whether something of this is true, but one thing is sure,
the 89?8 has a couple of strange features. &sing four of its general purpose
input4output ports, and adding one or more 8<?=*type chip * and the I4" expand
into another four ?*bit ports. +his expansion has not only support in the hardware
* dedicated pins on 89?8 * but also in the instruction set, having dedicated
instructions for I4" operations .including A50 and ",.U// via the expander.
+he 89?8 already had a lot of useful features nown well to 89:;*usersI external
code memory supportF external data memory support .inherently only <:! bytes
addressed indirectly by ,9 and ,; as there is no ;! bit pointer register such as the
0P+, in 89:; * the 89:; inherited this 8*bit external data access/F
Juasibidirectional I4" ports. -aximum cloc is ;;-N(, but an instruction cycle
taes ;: oscillator clocs. +he VAV version .advanced/ introduced powerdown
mode +here were multiple variations of the 89?8 around, mostly with different
numbering, but generally denoted as the -C%*?8 family. 89?8 itself denoted a
mas*,"- part, 87?8 an EP,"- part * windowed .CE,0IP * erasable/ for
development, and unwindowed .P0IP/ "+P. +he romless part was a bit
surprisingly mared 89=: .probably most of the parts sold as romless were parts
with unusable ,"-, due to error in the VprogrammedV firmware/. +here was a
low*cost version with reduced pin count and omitted some of the features as
89<;, and versions with more ,"- and ,A- as 89?@ .<$ ,"-4;<8$ ,A-/ and
89:9 .?$ ,"-4<:!$ ,A-/F with ,"-less versions as 89=@ and 89?9F and 89?@
had also an EP,"- version 87?@ .the funny thing is, that 87?@ came in ;@8;, one
year after 89:;487:;/. 89?8Qs were second sourced by a number of
manufacturers, including 5EC, +oshiba, and were cloned also behind the then iron
curtain in C(echoslovaia .+esla -N$89?8489=:/ and &%%,. Application specific
versions of 89?8 were also built Juite early, with adding of various peripherals,
such as 8*bit A0C in 89<< and a parallel*bus slave interface in 89?;489?<. +he
-C%*?8 family was used in a Juite wide range of applications. "ne of the first
applications of 89?8 was in a gaming console .-agnavox "dyssey</, but there
were also more VseriousV applications, for example in one of the first car engine
Vcomputeri(edV control units. $ut the biggest hit came when I$- decided to use
89?8 in its original PC eyboard. Although in the A+ eyboard I$- used the
.presumably cheaper/ !89:, it used 89?< as a co*processor on the mainboard,
communicating with the eyboard. +he 89?< is still present in almost each and
every PC even today, but donQt search for a chip with V89?<V on it * it is integrated
in the chipset. It may come as a surprise to somebody, but thans to this fact the
89?8 with its derivatives is most probably the most widespread microcontroller at
all.
As in the 79s there were no pdf*s and no world*wide web, datasheets and other
documentation is hardly available over the internet. I believe Intel will give out a
copy if one really wants it .there is a Vliterature reJuestV form at their VmuseumV
pages/. Nowever, there seems to be a couple of enthusiastic people, one of the
maintaining a wonderful document called W2roing the -C%*?8 %ystemX at
httpI44home.mnet*online.de4al4mcs*?84mcs*?8.pdf .
+,-1$ THE CLASSICS
In ;@89, Intel introduced the successor to 89?8, the 89:;. Intel made sure that
the transition from the already successful model will be as smooth as possible.
Architecturally, the 89:; is an extension to 89?8. Almost every feature and
resource of 89?8 is present in 89:; in same or superior form. ?$ ,"- and ;<8$
,A- on chip. Pin compatibility was not maintained, but it was not a real issue.
%oftware compatibility is not binarywise but source*wise, but that is also
acceptable. +he preliminary datasheet readI VEnhanced -C%*?8 ArchitectureV.
+he extensions included code and data memory extended to !?$ with
appropriate support in instruction set and registers .0P+,/, relative conditional
and unconditional #umps .conditionals and 0E5D were constrained within a <:!*
byte page in 89?8/, four register bans instead of two, VunlimitedV stac .89?8
had stac limited to ;! bytes/, multiple and divide instructions. As for peripherals,
second timer was added and both were extended to ;! bits with multiple modes
.including 8*bit autoreload mode/, and an &A,+ .which was a luxury that many
lower*end microcontrollers didnQt have even a couple of years ago/. +he raw cloc
freJuency did not increase considerably, being ;<-N(, but an instruction cycle is
;< clocs now. %imilarly to 89?8, also the 89:; had variants, but there was no
cut*down Vlow*costV version .presumably because of the cost of ,"-4,A- and
the 0IP?9 pacage went low enough/. +he romless version was 89=; and the
EP,"- version was 87:;. +he VextendedV version * 89:< .with 89=< and 87:</
came = years later and featured besides 8$ ,"- and <:!$ ,A- also an extra
;!*bit timer. An unusual chip was the 89:<AN*$A%IC, which according to Intel was
Vsoftware*onsilicon version of the 89:< microcontroller with a $A%IC interpreter
on*chip in 8G ,"-V. +he whole family was eventually called -C%*:; and was
manufactured in 5-"%, since ;@8! in C-"%. Intel provided all the needed initial
tools and support with the 89:; * assembler, application notes, example
software, in*circuit emulator. %ome of the appnotes and software still can be
found on IntelQs webpages and are of excellent Juality. +he basic datasheet set *
dubbed in the community as Vthe bibleV * is still +NE reference source of
information on 89:; and its derivatives, even today. %o, Intel did its #ob,
providing everything needed to mae 89:; successful, and the rest is history.
T+! $IRDS AR! O"T OF
T+! !ST

%imilar to 89?8, also the 89:; has been licensed to various manufacturers
worldwide. %ome of the early adopters include Philips, %ignetics, -N% .-atra/ and
%iemens. -ost of these companies donQt exist any more, some have been taen
over, others have been renamedF but most of them still manufacture some
derivative of 89:;. +he licensees started to mae fully compatible models.
5aturally, they too over also the datasheets, for example the VbibleV is better
used in the Philips version, which is a verbatim copy of the Intel version, except
that it is a true searchable pdf, while the Intel is a scanned copy of paper
document, unsearchable. -ore than that, the manufacturers too over the
annoying practice of Intel to include in datasheets only the specific differences to
the VbibleV, very confusing for the newbies .but there are opinions on this, some
of the users consider this arrangement better than having huge datasheets
containing all the WcommonX details/. +he manufacturers published their own
appnotes, which all together form a huge nowledge base and code library, but...
due to competition it is scattered across the manufacturersQ sites, an another
confusing fact for the newbies. 'ater, the manufacturers rolled out their own
derivatives and variants with varying maring * there is no real standard in it
.although there are some idiosyncrasies present in the maring of most
manufacturers/. All types of modifications described in the following chapters
were appliedF but the compatibility to the original 89:; was usually maintained.
+his, together with the availability of second*, third*,...,=:th*,...*source of 89:; is
the true source of its immortality.

EMBEDDED IN EMBEDDED
Intel and the licensees soon reali(ed that 89:; is a nice core that can be
embedded in various A%IC chips to perform setup and control tass. +ypically, the
resources of the A%IC are mapped as external data memory, as if the A%IC would
be connected to a conventional 89:; chip. +his approach allows to use an
unmodified core, which speeds up the chip development and decreases the
chance for errorF also the A%IC could be breadboard*prototyped in this form
easily. As an example, Intel produced 89C:;%', a descendant of 89?<. Philips has
a line of 89:;*based teletext controllers. In a particular &%$ webcamera, the chip
interfacing the CC0 and &%$ was controlled by an embedded 89:;. +here are
probably much more examples around, but most of them never get public. In
spite of this, the 89:; in this form is produced probably in much higher volumes
than as general*purpose microcontrollers.



!;TRAS
$esides application*specific, also general purpose derivatives have been
introduced by Intel and the licensees, with enhanced features and increased code
and data memories. In contrast with the A%ICs mentioned above, these chips tend
to implement the extra features in the core itself, acces allows faster code as %3,s
are accessed by all the instructions using direct addressing .mov, logic/, and some
of them by the bit*manipulation instructions, too. "ne of the first such derivative
by Intel was the 89C:;3A, which introduced the programmable counter array
.PCA/ .and was a 89:< otherwise/. It was intended for automotive applications
.brae control/. %oon, 3$ and 3C continued, with more and more code memory.
89C:;,A4,$4,C followed, with added Vinternal externalV data memory. +hese
were the basis for the todayQs 8@C:;,0< Vsub*familyV, produced by Philips, Atmel
.as ex*+emic/, %%+ and )inbond.

FAT $O*S. )=%$IT !;T!SIOS
)hen the 89:; was accepted widely enough, some of the applications started to
grow and soon reJuired more power than the 89:; even with enhancements
could provide. +here were ;!*bit microcontrollers around .e.g. Intel had itQs
89C;@! line/, but it seemed a good idea to provide a more natural migration path
by creating a ;!*bit version of 89:;. Intel addressed the problem by introducing
89C<:;. It went all the way to achieve compatibility * it was able to run 89:;
binary code .being able to switch to native ;!*bit <:;*mode/ and had a pacage
pin*compatible with 89:;. It was not a big success, most probably for bad maret
timing .although it is second sourced by +emic4Atmel/. Philips on the other hand
employed source*compatibility for its AA family, which seems to be adeJuate for
most of the applications, where legacy code has to be maintained or parallel
development with 89:; is neededF and poses little constraint on the chip design
itself. All in all, the ;!*bit versions of 89:; gained far less popularity than the
89:; and are less widespread.

FLAS+ FOR T+! MASS!S

In the @9s, Atmel introduced a derivative of 89:; with 3lash code memory,
enabling fast erasure and reprogramming. It enabled to use the production*grade
chip in development, and enabled the chips used in the product to be
reprogrammed when upgrade or a bugfix was needed, cutting down costs. It
brought down the 89:; to the masses * the small VgarageV companies and
hobbyists. $esides that, Atmel introduced also 8@C<9:; with decreased pin count
.and price/.+his was a smart move, the chip proved to be extremely popular in
many small applications. +oday, virtually all manufacturers produce 89:;
derivatives with 3lash, most of them able to be programmed via some few*pin
serial interface .called in*situ programming .I%P/, %PI*style or &A,+*style/ and the
higher*end versions also able to reprogram themselves .in*application
programming, IAP/. -as,"- and EP,"- * windowed or "+P * seems to become
extinct, at least in the mainstream applications.

!!D FOR SP!!D

+he need for higher processing power, addressed unsuccessfully by the ;!*bit
versions, has been solved by introducing the high speed derivatives of 89:;. +he
original ;<*cloc instruction cycle scheme is obviously inefficient and also the
technology progressed enough to achieve higher cloc rates than the original
;<-N(. +he first derivative addressing this in a radical way is the now legendary
0allas 0%89C=<9. It featured a ?*clocer core with incompatible timing, and could
be cloced as high as ==-N(. &nfortunately, it was produced as ,"-less only.
+he following step was taen by Cygnal, where a single*cloc core has been
developed. In the top*range models, the clocing is as high as ;99-N(, being the
fastest 89:;s around.
+oday, there are many 89:; derivatives with sped*up cores available. +hey can be
divided into two groupsI the !*clocers .e.g. the 8xC:;,0</ and <*clocers
.Philips 'PC@xx/ have the same number of instruction cycle per instruction as the
originalF while the ?*clocers and singleclocers are incompatible in this way,
reJuiring recalculation of timing loops if used.

>+!R! IS IT #OI#?

+he 89:; is a sound mcu core with rich history. Nowever, it seems that it is
already over its pea, although it might tae Juite a lot of time until it will be
completely replaced by most modern microcontrollers. %o we now have
superfast 89:; derivatives with loads of internal 3'A%N and ,A-. I%P and IAP
seems to be the standard these days. +here are the 89:;s built around advanced
analog circuits, mainly high resolution A0C. +here are derivatives suitable for
extreme applications T high temperature, radiation hardened. +here are softcores
around, tuned up, and even open source. +here is a wealth of nowledge and
experience, however, it is scattered around and the newbies tend to get the
easier path * competing 8*bit microcontrollers usually do have a single*stop
information resource site, so this nowledge and experience seems to die out as
the Vold boysV retire gradually. +he price difference between the high*end 8*
bitters and the much more powerful low*end =<*bit ,I%Cs .such as the A,-s/
seems to decrease rapidly and will change eventually, as the =<*bitters are
becoming the standard in all but the least demanding applications.%o there is
perhaps still a need for the 89:;s, but this need is decreasing and 89:;s life cycle
is slowly approaching its end.


CHAPTER .
P:C:$: D!SI#I# @ >OR6I#
P:C:$: D!SI#I#
P:C:$: LA*O"T
+he entire circuit can be easily assembled on a general purpose P.C.$. board
respectively. 'ayout of desired diagram and preparation is first and most
important operation in any printed circuit board manufacturing process. 3irst of
all layout of component side is to be made in accordance with available
components dimensions. +he following points are to be observed while forming
the layout of P.C.$.
;.$etween two components, sufficient space should be maintained.
<.Nigh voltage4max dissipated components should be mounted at sufficient
distance from semiconductor and electrolytic capacitors.
=.+he most important points are that the components layout is maing proper
compromise with copper side circuit layout. Printed circuit board .P.C.$.s/ is used
to avoid most of all the disadvantages of conventional breadboard. +hese also
avoid the use of thin wires for connecting the componentsF they are small in si(e
and efficient in performance.
PR!PARI# CIRC"IT LA*O"T
3irst of all the actual si(e circuit layout is to be drawn on the copper side of the
copper clad board. +hen enamel paint is applied on the tracs of connection with
the help of a shade brush. )e have to apply the paints surrounding the point at
which the connection is to be made. It avoids the disconnection between the leg
of the component and circuit trac. After completion of painting wor, it is
allowed to dry.


DRILLI#
After completion of painting wor, holes ;4<=inch.;mm/ diameter are drilled at
desired points where we have to fix the components.
!TC+I#
+he removal of excess of copper on the plate apart from the printed circuit is
nown as etching. 3rom this process the copper clad board wit printed circuit is
placed in the solution of 3eCl with =*? drops of NC' in it and is ept so for about
;9 to ;: minutes and is taen out when all the excess copper is removed from the
P.C.$. After etching, the P.C.$. is ept in clean water for about half an hour in
order to get P.C.$. away from acidic, field, which may cause poor performance of
the circuit. After the P.C.$. has been thoroughly washed, paint is removed by soft
piece of cloth dipped I thinner or turbine. +hen P.C.$. is checed as per the layout,
now the P.C.$. is ready for use.
SOLD!RI#
%oldering is the process of #oining two metallic conductor the #oint where two
metal conductors are to be #oin or fused is heated with a device called soldering
iron and then as allow of tin and lead called solder is applied which melts and
converse the #oint. +he solder cools and solidifies Juicly to ensure is good and
durable connection between the #ointed metal converting the #oint solder also
present oxidation.
SOLD!RI# AD D!SOLD!RI# T!C+IA"!SI
+hese are basically two soldering techniJues.
M-anual soldering with iron.
M-ass soldering.
SOLDERING WITH IRON
+he surface to be soldered must be cleaned O fluxed. +he soldering iron switched
on and bellowed to attain
soldering temperature. +he solder in form of wire is allied hear the component
to be soldered and heated with iron. +he surface to be soldered is filled, iron is
removed and #oint is cold without disturbing.
SOLD!R BOIT AR! S"PPOS!D TO
;.Provide permanent low resistance path.
<.-ae a robust mechanical lin between P.C.$. and leads of components.
=.Allow heat flow between component, #oining elements and P.C.$.
?.,etain adeJuate strength with temperature variation. +he following precaution
should be taen while solderingI
;.&se always an iron plated copper core tip for soldering iron.
<.%lightly for the tip with a cut file when it is cold.
=.&se a wet sponge to wipe out dirt from the tip before soldering instead of
asing the iron.
?.+ighten the tip screw if necessary before iron is connected to power supply.
:.Clean component lead and copper pad before soldering.
!.Apply solder between component leads, P.C.$. pattern and tip of soldering iron.
7.Iron should be ept in contact with the #oint for <*= seconds only instead of
eeping for very long or very small time.
8.&se optimum Juantity of solder

>OR6I#

+his pro#ect uses a stepper motor to control the position of solar energy
collectors, using Intel 89:; .

PRO$L!M FAC!D
M3irst problem that was in maing the circuit of %"'A, +,ACE, that, it
is difficult to match time with rotation of stepper motor O 'C0.
M%econd problem is faced due to redundancy in handling the rotation
of %+EPPE, -"+",
M)e have to tae extra care while soldering < line 'C0
M0uring soldering, many of the connection become short ctd. %o we
desolder the connection and did soldering again.
MA leg of the crystal oscillator was broen during mounting. %o it has to
be replaced.
M'E0Rs get damaged when we switched "5 the supply so we replace it
by the new one.
+,"&$'E%N""+
MCare should be taen while soldering. +here should be no shorting of
#oints.
MProper power supply should maintain.
MPro#ect should be handled with care since IC are delicate
MComponent change and chec again circuit

You might also like