remote digital clock

Upload: ardhika-dhennis-putra-ananda

Post on 03-Jun-2018

233 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Remote Digital Clock

    1/79

    HBeonLabs

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

    Gamma-I, Greater Noida (India) - 201308

    Contact us:

    +91-120-4298000

    +91-9212314779

    [email protected]@hbeonlabs.com

    www. hbeonlabs.com

  • 8/13/2019 Remote Digital Clock

    2/79

    REMOTE CONTROLLED DIGITAL CLOCK

  • 8/13/2019 Remote Digital Clock

    3/79

    INTRODUCTION

    This Project is made up with AT89C51 and the RTC DS1307. It

    has a large seven segment display. The standard remote control

    is used to change the Time.

    Procedure to enter the Time

    1-Press power button on the remote to enter new time

    2-Press the Numerical buttons to enter the time

    3-Press the Menu button to store the new time

    This system has a battery backup, so that the Clock will runduring power failure.

    Digital clocks typically use the 50 or 60 hertz oscillation of AC

    power or a 32,768 hertz crystal oscillator as in a quartz clock tokeep time. Most digital clocks display the hour of the day in 24

    hour format; in the United States and a few other countries, a

    more commonly used hour sequence is 12 hour format (with

    some indication of AM or PM). Some clocks can display either

    time mode according to the owner's preference. Emulations of

  • 8/13/2019 Remote Digital Clock

    4/79

    analog-style faces often use an LCD screen, and these are also

    sometimes described as "digital".

    Some people find difficulty in setting the time in some designs

    of digital clocks. Therefore in electronic devices where the clock

    is not a critical function, often they are not set at all, displaying

    the default after powered on, 00:00 or 12:00.

    Since they run on electricity, digital clocks must be reset every

    time the power is cut off. This is a particular problem with alarm

    clocks that have no "battery" backup, because even a very brief

    power outage during the night usually results in the clock failing

    to trigger the alarm in the morning.

    To reduce the problem, many devices designed to operate on

    household electricity incorporate a battery backup to maintain

    the time during power outages and during times of disconnection

    from the power supply. More recently, some devices incorporate

    a method for automatically setting the time, such as using abroadcast radio time signal from an atomic clock, getting the

    time from an existing satellite television or computer connection,

    or by being set at the factory and then maintaining the time from

    then on with a quartz movement powered by an internal

    rechargeable battery.

  • 8/13/2019 Remote Digital Clock

    5/79

    BRIEF INTRODUCTION TO 8051

    MICROCONTROLLER:

    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), non-volatile 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 AT89S52 is a low-power, high-performance

    CMOS 8-bit microcontroller with 8K bytes of in-system

    programmable Flash memory. The device is manufactured using

    Atmels high-density nonvolatile memory technology and is

  • 8/13/2019 Remote Digital Clock

    6/79

    compatible with the industry-standard 80C51 instruction set and

    pin out. The on-chip Flash allows the program memory to be

    reprogrammed in-system or by a conventional nonvolatilememory programmer. By combining a versatile 8-bit CPU with

    in-system programmable Flash on a monolithic chip, the Atmel

    AT89S52 is a powerful microcontroller, which provides a highly

    flexible and cost-effective solution to many, embedded control

    applications. The AT89S52 provides the following standard

    features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines,

    Watchdog timer, two data pointers, three 16-bit timer/counters, a

    six-vector two-level interrupt architecture, a full duplex serial

    port, on-chip oscillator, and clock circuitry. In addition, the

    AT89S52 is designed with static logic for operation down to zero

    frequency and supports two software selectable power saving

    modes. The Idle Mode stops the CPU while allowing the RAM,

    timer/counters, serial port, and interrupt system to continue

    functioning. The Power-down mode saves the RAM con-tents

    but freezes the oscillator, disabling all other chip functions until

    the next interrupt.

  • 8/13/2019 Remote Digital Clock

    7/79

  • 8/13/2019 Remote Digital Clock

    8/79

    The pin diagram o

    unique to microcon

    The following a

    microcontroller.

    1.Internal ROM and2.I/O ports with prog

    3.Timers and counter

    4.Serial data commun

    the 8051 shows all of the i

    rollers:

    e some of the capabili

    AM

    ammable pins

    ication

    put/output pins

    ties of 8051

  • 8/13/2019 Remote Digital Clock

    9/79

    The 8051 architecture consists of these specific features:

    16 bit PC &data pointer (DPTR)

    8 bit program status word (PSW)

    8 bit stack pointer (SP)

    Internal ROM 4k

    Internal RAM of 128 bytes.

    4 register banks, each containing 8 registers

    80 bits of general purpose data memory

    32 input/output pins arranged as four 8 bit ports: P0-P3

    Two 16 bit timer/counters: T0-T1

    Two external and three internal interrupt sources Oscillator andclock circuits.

  • 8/13/2019 Remote Digital Clock

    10/79

  • 8/13/2019 Remote Digital Clock

    11/79

  • 8/13/2019 Remote Digital Clock

    12/79

  • 8/13/2019 Remote Digital Clock

    13/79

  • 8/13/2019 Remote Digital Clock

    14/79

    RC-5 PROTOCOL

    A common used standard protocol for infrared data

    communication is the RC5 code, originally developed by Philips.

    This code has an instruction set of 2048 different instructions

    and is divided into 32 address for different devices the remote

    belongs to like TV,VCR etc. with each address having 64

    instructions each for different buttons on the remote. Every kind

    of equipment uses his own address, and every button has its own

    unique code. So this makes it possible to change the volume of

    the TV without change the volume of the stereo.

    The transmitted code is a data word which consists

    of 14 bits and is defined as:

    2 start bits for the automatic gain control in the

    infrared receiver.

    1 toggle bit (change every time when a new button is pressed on

    the ir transmitter).

    5 address bits for the system address

    6 instruction bits for the pressed key

  • 8/13/2019 Remote Digital Clock

    15/79

    We used a single remote to control all the devices so

    everything except the toggle bit and the and the command

    bits are same. We studied the codes for a particular TV

    remote

    to be used with our devices.

    The next challenge was to get something which would detect

    these codes so that Atmega 16 microcontroller would read

    these codes. The solution is TSOP 1738.

    TSOP 1738:-

    The TSOP 17XX series are miniaturized receivers for

    infrared remote control systems. PIN diode and preamplifier

  • 8/13/2019 Remote Digital Clock

    16/79

    are assembled on lead frame, the epoxy package is designed

    as IR filter. The demodulated output signal can directly be

    decoded by a microprocessor. TSOP 17XX is the standard

    IR remote control receiver series, supporting all major

    transmission codes. Here XX refers to the frequency of the

    infrared carrier signal on which the code is modulated,

    which is 38 KHz in our case. It has three pins .GND and

    Vcc are connected

    to the power supply with VCC as 5V and Vout which

    becomes 0V, or GND when the demodulated bit received is

    high i.e. 5V and vice versa.

    CODING:-

    After we have the code transmitted from the remote on

    the press of a button to the microcontroller through the

    infrared receiver, we wrote a code using CVAVR, a C

    compiler that would make a corresponding port of a

    microcontroller high when the incoming code matches

    the corresponding button code. We read the incoming

    code bit by bit by reading the Vout pin of the sensor to a

  • 8/13/2019 Remote Digital Clock

    17/79

    port of the microcontroller. To ensure each bit is read

    properly, we used a delay of 889 ms, which is the time

    period of the demodulated signal which we receive from

    the remote and stored it a character array .As we cannot

    store a bit directly in an array due to data type miss-match,

    we stored 1 in the array whenever the bit was high and vice

    versa. Then we compared the part of the code stored which

    changes from button to button i.e. the command bit to

    distinguish between different button presses and when a

    particular code matches, we make corresponding port high,

    i.e. give an output of 5V from that port which depends on

    the supply voltage we provide to the microcontroller i.e. if

    the supply would have been 6V; the high would

    correspond to the port giving 6V. The ON OFF condition

    of a device. I.e. the device turns on when we press a button

    one time and turns off when we press again is fulfilled by

    taking care of the toggle bit. We now needed a device

    which would turn a equipment on when it receives a

    particular voltage from the microcontroller.

  • 8/13/2019 Remote Digital Clock

    18/79

    BLOCK DIAGRAM

    CIRCUIT DIAGRAM

    8051

    MICROCONT

    ROLLER

    POWER

    SUPPLY

    IR

    REMOTE

    TSOP

    RTC IC

    DS 1307

    LCD

  • 8/13/2019 Remote Digital Clock

    19/79

    COMPONENT LIST

    IREMOTE CONTROLLED DIGITAL CLOCK

  • 8/13/2019 Remote Digital Clock

    20/79

    HARDWARE DESCRIPTION:

    1.POWER SUPPLY:

    Name Capacity Quantity

    Regulator 78! "

    Regulator 78"# "

    Capacitor "$% "

    Capacitor "$% "

    Ceramic Capacitor ##p% #

    Dio&e '

    (u)* +utton !

    ' (in +a)e "

    8!" ,AT8-.!#/ "

    O)cillator ""0!-#m*1 "

    LED 8

    Re)i)tance ##2 3

    Re)i)tance "4 "

    Re)i)tance "4 "

    T5.O( "

    T6 REMOTE "

    RTC D."37 "

    +TTON CELL 3 6OLT "

    RTC CR.TAL "

  • 8/13/2019 Remote Digital Clock

    21/79

    Power supplyis a reference to a source of electrical power. A device

    or system that supplies electrical or other types of energy to an output

    load or group of loads is called a power supply unit or PSU. The

    term is most commonly applied to electrical energy supplies, less

    often to mechanical ones, and rarely to others. Here in our application

    we need a 5v DC power supply for all electronics involved in the

    project. This requires step down transformer, rectifier, voltage

    regulator, and filter circuit for generation of 5v DC power. Here a

    brief description of all the components are given as follows:

    TRANSFORMER:

    transformer is a device that transfers electrical energy from one

    circuit to another through inductively coupled conductors the

    transformer's coils or "windings". Except for air-core transformers, the

    conductors are commonly wound around a single iron-rich core, or

    around separate but magnetically-coupled cores. A varying current in

    the first or "primary" winding creates a varying magnetic field in the

    core (or cores) of the transformer. This varying magnetic field induces

    a varying electromotive force (EMF) or "voltage" in the "secondary"

    winding. This effect is called mutual induction.

  • 8/13/2019 Remote Digital Clock

    22/79

    If a load is connected to the secondary circuit, electric charge will

    flow in the secondary winding of the transformer and transfer energy

    from the primary circuit to the load connected in the secondary circuit.

    The secondary induced voltage VS, of an ideal transformer, is scaled

    from the primary VP by a factor equal to the ratio of the number of

    turns of wire in their respective windings:

    By appropriate selection of the numbers of turns, a transformer thus

    allows an alternating voltage to be stepped up by making NSmore

    than NP or stepped down, by making it

    BASIC PARTS OF A TRANSFORMER

    In its most basic form a transformer consists of:

    A primary coil or winding.

    A secondary coil or winding.

    A core that supports the coils or windings.

  • 8/13/2019 Remote Digital Clock

    23/79

    Refer to the transformer circuit in figure as you read the following

    explanation: The primary winding is connected to a 60-hertz ac

    voltage source. The magnetic field (flux) builds up (expands) and

    collapses (contracts) about the primary winding. The expanding and

    contracting magnetic field around the primary winding cuts the

    secondary winding and induces an alternating voltage into the

    winding. This voltage causes alternating current to flow through the

    load. The voltage may be stepped up or down depending on the design

    of the primary and secondary windings.

    THE COMPONENTS OF A TRANSFORMER

    Two coils of wire (called windings) are wound on some type of core

    material. In some cases the coils of wire are wound on a cylindrical or

    rectangular cardboard form. In effect, the core material is air and the

    transformer is called an AIR-CORE TRANSFORMER. Transformers

  • 8/13/2019 Remote Digital Clock

    24/79

  • 8/13/2019 Remote Digital Clock

    25/79

    According to the con

    established by Benjami

    today, current is assum

    the positive to the ne

    conductor nearly alway

    In the vast majority of

    current flow is irrelev

    conventional model is r

    In the diagrams below,

    the diamond is positive

    negative, current flows

    along the red (positive

    supply terminal via the

    When the input connect

    connected to the rightc

    ventional model of current

    Franklin and still followed b

    d to flow through electrical

    ative pole. In actuality, fre

    flow from the negative to t

    applications, however, the a

    ant. Therefore, in the discu

    tained.

    when the input connected to

    and the input connected to t

    from the upper supply ter

    path to the output, and retu

    lue(negative) path.

    ed to the leftcorner is negati

    orner is positive, current flow

    flow originally

    most engineers

    conductors from

    e electrons in a

    e positivepole.

    tualdirection of

    sion below the

    he leftcorner of

    e rightcorner is

    inal to the right

    rns to the lower

    ve, and the input

    s from the lower

  • 8/13/2019 Remote Digital Clock

    26/79

    supply terminal to the

    returns to the uppersu

    In each case, the upper

    output negative. Since t

    circuit not only produc

    provide what is someti

    is, it permits normal

    batteries have been ins

    from a DC power so

    equipment from potenti

    Prior to availability of

    was always constructed

    a single four-termina

    connected in the bridge

    right along the red path to

    ply terminal via the bluepath

    right output remains positiv

    is is true whether the input i

    s a DC output from an AC i

    es called "reverse polarity

    unctioning of DC-powered

    talled backwards, or when t

    urce have been reversed,

    l damage caused by reverse p

    integrated electronics, such

    from discrete components. S

    l component containing t

    configuration became a stan

    the output, and

    .

    and lower right

    AC or DC, this

    nput, it can also

    rotection". That

    quipment when

    he leads (wires)

    nd protects the

    olarity.

    bridge rectifier

    ince about 1950,

    e four diodes

    ard commercial

  • 8/13/2019 Remote Digital Clock

    27/79

    component and is no

    ratings.

    OUTPUT SMOOTHI

    For many applications,

    full-wave bridge serves

    addition of a capacito

    supplies an output of

    "pulsating" magnitude (

    The function of this csmoothing capacitor) i

    rectified AC output

    explanation of 'smoot

    impedance path to the

    voltage across, and A

    technical terms, any d

    available with various vol

    G

    especially with single phas

    to convert an AC input into

    may be desired because t

    fixed polarity but continuo

    ee diagram above).

    pacitor, known as a reservto lessen the variation in

    voltage waveform from t

    ing' is that the capacitor

    C component of the output,

    current through, the resisti

    op in the output voltage an

    age and current

    AC where the

    DC output, the

    he bridge alone

    usly varying or

    ir capacitor (oror 'smooth') the

    e bridge. One

    provides a low

    reducing the AC

    ve load. In less

    d current of the

  • 8/13/2019 Remote Digital Clock

    28/79

    bridge tends to be canceled by loss of charge in the capacitor. This

    charge flows out as additional current through the load. Thus the

    change of load current and voltage is reduced relative to what would

    occur without the capacitor. Increases of voltage correspondingly

    store excess charge in the capacitor, thus moderating the change in

    output voltage / current.

    The simplified circuit shown has a well-deserved reputation for being

    dangerous, because, in some applications, the capacitor can retain a

    lethal charge after the AC power source is removed. If supplying a

    dangerous voltage, a practical circuit should include a reliable way to

    safely discharge the capacitor. If the normal load cannot be guaranteed

    to perform this function, perhaps because it can be disconnected, the

    circuit should include a bleeder resistor connected as close as practical

    across the capacitor. This resistor should consume a current large

    enough to discharge the capacitor in a reasonable time, but small

    enough to minimize unnecessary power waste.

    Because a bleeder sets a minimum current drain, the regulation of the

    circuit, defined as percentage voltage change from minimum to

    maximum load, is improved. However in many cases the

    improvement is of insignificant magnitude.

  • 8/13/2019 Remote Digital Clock

    29/79

  • 8/13/2019 Remote Digital Clock

    30/79

    of a bridge, the bridge diodes must be sized to withstand the current

    surge that occurs when the power is turned on at the peak of the AC

    voltage and the capacitor is fully discharged. Sometimes a small series

    resistor is included before the capacitor to limit this current, though in

    most applications the power supply transformer's resistance is already

    sufficient.

    Output can also be smoothed using a choke and second capacitor. The

    choke tends to keep the current (rather than the voltage) more

    constant. Due to the relatively high cost of an effective choke

    compared to a resistor and capacitor this is not employed in modern

    equipment.

    Some early console radios created the speaker's constant field with the

    current from the high voltage ("B +") power supply, which was then

    routed to the consuming circuits, (permanent magnets were then too

    weak for good performance) to create the speaker's constant magnetic

    field. The speaker field coil thus performed 2 jobs in one: it acted as a

    choke, filtering the power supply, and it produced the magnetic field

    to operate the speaker.

    REGULATOR IC (78XX)

  • 8/13/2019 Remote Digital Clock

    31/79

    It is a three pin IC used as a voltage regulator. It converts unregulated

    DC current into regulated DC current.

    Normally we get fixed output by connecting the voltage regulator at

    the output of the filtered DC (see in above diagram). It can also be

    used in circuits to get a low DC voltage from a high DC voltage (for

    example we use 7805 to get 5V from 12V). There are two types of

    voltage regulators 1. fixed voltage regulators (78xx, 79xx) 2. variable

    voltage regulators(LM317) In fixed voltage regulators there is another

    classification 1. +ve voltage regulators 2. -ve voltage regulators

    POSITIVE VOLTAGE REGULATORS This include 78xx voltage

  • 8/13/2019 Remote Digital Clock

    32/79

    regulators. The most commonly used ones are 7805 and 7812. 7805

    gives fixed 5V DC voltage if input voltage is in (7.5V, 20V).

    The Capacitor Filter

    The simple capacitor filter is the most basic type of power supply

    filter. The application of the simple capacitor filter is very limited. It is

    sometimes used on extremely high-voltage, low-current power

    supplies for cathode-ray and similar electron tubes, which require very

    little load current from the supply. The capacitor filter is also used

    where the power-supply ripple frequency is not critical; this frequency

    can be relatively high. The capacitor (C1) shown in figure 4-15 is a

    simple filter connected across the output of the rectifier in parallel

    with the load.

    Full-wave rectifier with a capacitor filter.

    When this filter is used, the RC charge time of the filter capacitor (C1)

    must be short and the RC discharge time must be long to eliminate

    ripple action. In other words, the capacitor must charge up fast,

  • 8/13/2019 Remote Digital Clock

    33/79

    preferably with no discharge at all. Better filtering also results when

    the input frequency is high; therefore, the full-wave rectifier output is

    easier to filter than that of the half-wave rectifier because of its higher

    frequency.

    For you to have a better understanding of the effect that filtering has

    on Eavg, a comparison of a rectifier circuit with a filter and one without

    a filter is illustrated in views A and B of figure 4-16. The output

    waveforms in figure 4-16 represent the unfiltered and filtered outputs

    of the half-wave rectifier circuit. Current pulses flow through the load

    resistance (RL) each time a diode conducts. The dashed line indicates

    the average value of output voltage. For the half-wave rectifier, Eavgis

    less than half (or approximately 0.318) of the peak output voltage.

    This value is still much less than that of the applied voltage. With no

    capacitor connected across the output of the rectifier circuit, the

    waveform in view A has a large pulsating component (ripple)

    compared with the average or dc component. When a capacitor is

    connected across the output (view B), the average value of output

    voltage (Eavg) is increased due to the filtering action of capacitor C1.

    UNFILTERED

  • 8/13/2019 Remote Digital Clock

    34/79

  • 8/13/2019 Remote Digital Clock

    35/79

    The rate of charge for the capacitor is limited only by the resistance of

    the conducting diode, which is relatively low. Therefore, the RC

    charge time of the circuit is relatively short. As a result, when the

    pulsating voltage is first applied to the circuit, the capacitor charges

    rapidly and almost reaches the peak value of the rectified voltage

    within the first few cycles. The capacitor attempts to charge to the

    peak value of the rectified voltage anytime a diode is conducting, and

    tends to retain its charge when the rectifier output falls to zero. (The

    capacitor cannot discharge immediately.) The capacitor slowly

    discharges through the load resistance (RL) during the time the

    rectifier is non-conducting.

    The rate of discharge of the capacitor is determined by the value of

    capacitance and the value of the load resistance. If the capacitance and

    load-resistance values are large, the RC discharge time for the circuit

    is relatively long.

    A comparison of the waveforms shown in figure 4-16 (view A and

    view B) illustrates that the addition of C1 to the circuit results in an

    increase in the average of the output voltage (Eavg) and a reduction in

    the amplitude of the ripple component (Er) which is normally present

    across the load resistance.

  • 8/13/2019 Remote Digital Clock

    36/79

    Now, let's consider a complete cycle of operation using a half-wave

    rectifier, a capacitive filter (C1), and a load resistor (RL). As shown in

    view A of figure 4-17, the capacitive filter (C1) is assumed to be large

    enough to ensure a small reactance to the pulsating rectified current.

    The resistance of RLis assumed to be much greater than the reactance

    of C1 at the input frequency. When the circuit is energized, the diode

    conducts on the positive half cycle and current flows through the

    circuit, allowing C1 to charge. C1 will charge to approximately the

    peak value of the input voltage. (The charge is less than the peak value

    because of the voltage drop across the diode (D1)). In view A of the

    figure, the charge on C1 is indicated by the heavy solid line on the

    waveform. As illustrated in view B, the diode cannot conduct on the

    negative half cycle because the anode of D1 is negative with respect to

    the cathode. During this interval, C1 discharges through the load

    resistor (RL). The discharge of C1 produces the downward slope as

    indicated by the solid line on the waveform in view B. In contrast to

    the abrupt fall of the applied ac voltage from peak value to zero, the

    voltage across C1 (and thus across RL) during the discharge period

    gradually decreases until the time of the next half cycle of rectifier

    operation. Keep in mind that for good filtering, the filter capacitor

    should charge up as fast as possible and discharge as little as possible.

  • 8/13/2019 Remote Digital Clock

    37/79

  • 8/13/2019 Remote Digital Clock

    38/79

    the anode of the diode exceeds the voltage on the charge remaining on

    C1. The charge on C1 is the cathode potential of the diode. When the

    potential on the anode exceeds the potential on the cathode (the charge

    on C1), the diode again conducts, and C1 begins to charge to

    approximately the peak value of the applied voltage.

    After the capacitor has charged to its peak value, the diode will cut off

    and the capacitor will start to discharge. Since the fall of the ac input

    voltage on the anode is considerably more rapid than the decrease on

    the capacitor voltage, the cathode quickly become more positive than

    the anode, and the diode ceases to conduct.

    Operation of the simple capacitor filter using a full-wave rectifier is

    basically the same as that discussed for the half-wave rectifier.

    Referring to figure 4-18, you should notice that because one of the

    diodes is always conducting on. either alternation, the filter capacitor

    charges and discharges during each half cycle. (Note that each diode

    conducts only for that portion of time when the peak secondary

    voltage is greater than the charge across the capacitor.)

    Figure 4-18. - Full-wave rectifier (with capacitor filter).

  • 8/13/2019 Remote Digital Clock

    39/79

    Another thing to keep in mind is that the ripple component (Er) of the

    output voltage is an ac voltage and the average output voltage (Eavg) is

    the dc component of the output. Since the filter capacitor offers a

    relatively low impedance to ac, the majority of the ac component

    flows through the filter capacitor. The ac component is therefore

    bypassed (shunted) around the load resistance, and the entire dc

    component (or Eavg) flows through the load resistance. This statement

    can be clarified by using the formula for XC in a half-wave and full-

    wave rectifier. First, you must establish some values for the circuit.

  • 8/13/2019 Remote Digital Clock

    40/79

    As you can see from the

    rectifier, you reduce the

    calculations, by doubling the

    impedance of the capacitor b

    frequency of the

    one-half. This

  • 8/13/2019 Remote Digital Clock

    41/79

    allows the ac componen

    a result, a full-wave rec

    a half-wave rectifier. R

    capacitor with respect t

    action. Since

    the largest possible cap

    Remember, also, that th

    If load resistance is m

    average value of outpu

    time constant is a direc

    therefore, the rate of ca

    the current through the

    rapid the discharge of t

    of output voltage. For

    seldom used with recti

    load current. Using the

    full-wave or bridge rec

    increased ripple freque

    filter capacitor.

    t to pass through the capacito

    ifier output is much easier to

    member, the smaller the XCo

    the load resistance, the bette

    citor will provide the best filt

    load resistance is an import

    de small, the load current i

    t voltage (Eavg) decreases. T

    t function of the value of th

    acitor voltage discharge is a

    load. The greater the load c

    he capacitor, and the lower t

    this reason, the simple ca

    ier circuits that must supply

    simple capacitive filter in co

    tifier provides improved filte

    cy decreases the capacitive

    more easily. As

    ilter than that of

    the filter

    the filtering

    ring.

    nt consideration.

    creases, and the

    e RC discharge

    load resistance;

    irect function of

    urrent, the more

    e average value

    acitive filter is

    relatively large

    njunction with a

    ring because the

    reactance of the

  • 8/13/2019 Remote Digital Clock

    42/79

    CIRCUIT DIAGRAM OF POWER SUPPLY

    T-SOP 17 SERIES:

    DESCRIPTION

    The TSOP17.. series are miniaturized receivers for infrared remote control

    systems. PIN diode and preamplifier are assembled on lead frame, the epoxy

    package is designed as IR filter. The demodulated output signal can directly be

  • 8/13/2019 Remote Digital Clock

    43/79

    decoded by a microprocessor. TSOP17.. is the standard IR remote control

    receiver series, supporting all major transmission codes.

    FEATURES

    Photo detector and preamplifier in one package

    Internal filter for PCM frequency Improved shielding against electrical field disturbance

    TTL and CMOS compatibility

    Output active low

    Low power consumption

    High immunity against ambient light

    Continuous data transmission possible (up to 2400 bps)

    Suitable burst length .10 cycles/burst

  • 8/13/2019 Remote Digital Clock

    44/79

    Display Section:

    LIQUID CRYSTL DIS!LY

    T*e li9ui& 5 cry)tal &i)play ,LCD/ con)i)t o% a li9ui& cry)tal material

    ,normally organic %or LCD:)/ t*at ;ill %lo; li4e a li9ui&

  • 8/13/2019 Remote Digital Clock

    45/79

    n&er &ar4 con&ition)> it ;oul& a re%lector can

  • 8/13/2019 Remote Digital Clock

    46/79

    T*e a ;*ic* are limite& to num t*ere t*e

    LED mu)t

  • 8/13/2019 Remote Digital Clock

    47/79

    T*e LCD u)e& *ere *a)

  • 8/13/2019 Remote Digital Clock

    48/79

    T*ere are t;o ?ery important regi)ter) in)i&e t*e LCD0 T*e R. pin i)

    u)e& %or t*eir )election a) %ollo;) 0I% R. > t*en in)truction

    comman& co&e regi)ter i) )electe& > allo;ing t*e u)er to )en& t*e

    comman& )uc* a) clear &i)play> cur)or at *ome> etc0 I% R. " t*e &ata

    regi)ter i) )electe&> allo;ing t*e u)er to )en& &ata to

  • 8/13/2019 Remote Digital Clock

    49/79

    D0 ) D*:

    T*e 8 D D7> are u)e& to )en& in%ormation to t*e

    LCD or rea& t*e content) o% t*e LCD) internal regi)ter)0

    To &i)play letter) an& num ;e )en& A.CII co&e) %or t*e letter) A5

    > a51> an& 5- to t*e)e pin) ;*ile ma4ing R. "0

    T*ere are al)o in)truction comman& co&e) t*at can

  • 8/13/2019 Remote Digital Clock

    50/79

    !IN DESCRI!TION +OR LCD

    !i

    n

    Sy,

    -ol

    I&O Desc.iption

    " 6)) 55 Groun&

    # 6cc 55 H!6 po;er )upply

    3 6EE 55 (o;er )upply to control contra)t

    ' R. I R. %or comman& regi)ter> R." %or

    &ata regi)ter

    ! RJ I RJH %or ;rite> RJH" %or rea&

    E IJO Ena

  • 8/13/2019 Remote Digital Clock

    51/79

  • 8/13/2019 Remote Digital Clock

    52/79

    ! .*i%t &i)play le%t

    7 .*i%t &i)play le%t

    8 Di)play o%%> cur)or o%%

    A Di)play o%%> cur)or on

    C Di)play on> cur)or o%%

    E Di)play on

    F Di)play on> cur)or

  • 8/13/2019 Remote Digital Clock

    53/79

    'ORIN%:

    T*e inter%ace u)e&

  • 8/13/2019 Remote Digital Clock

    54/79

    eight bit transfer. The "Enable" Clock is used to initiate the data

    transfer within the LCD.

    Sending parallel data as either four or eight bits are the two primary

    modes of operation. While there are secondary considerations and

    modes, deciding how to send the data to the LCD is most critical

    decision to be made for an LCD interface application.

    Eight bit mode is best used when speed is required in an application

    and at least ten I/O pins are available. Four bit mode requires a

    minimum of six bits. To wire a microcontroller to an LCD in four bit

    mode, just the top four bits (DB4-7) are written to.

    The "RS" bit is used to select whether data or an instruction is being

    transferred between the microcontroller and the LCD. If the Bit is set,

    then the byte at the current LCD "Cursor" Position can be read or

    written. When the Bit is reset, either an instruction is being sent to the

    LCD or the execution status of the last instruction is read back

    (whether or not it has completed).

    Rea&ing Data

  • 8/13/2019 Remote Digital Clock

    55/79

    groun&e& RJ pin ;*ic* mean) ;e are not retrie?ing any &ata %rom

    LCD0

    The LCD can be thought of as a "Teletype" display because in normal

    operation, after a character has been sent to the LCD, the internal

    "Cursor" is moved one character to the right. The "Clear Display" and

    "Return Cursor and LCD to Home Position" instructions are used to

    reset the Cursor's position to the top right character on the display.

    To move the Cursor, the "Move Cursor to Display" instruction is used.

    For this instruction, bit 7 of the instruction byte is set with the

    remaining seven bits used as the address of the character on the LCD

    the cursor is to move to. These seven bits provide 128 addresses,

    which matches the maximum number of LCD character addresses

    available.

  • 8/13/2019 Remote Digital Clock

    56/79

    Eight programmable characters are available and use codes 0x000 to

    0x007. They are programmed by pointing the LCD's "Cursor" to the

    Character Generator RAM

    The last aspect of the LCD to discuss is how to specify a contrast

    voltage to the Display. I typically use a potentiometer wired as a

    voltage divider. This will provide an easily variable voltage between

    Ground and Vcc, which will be used to specify the contrast (or

    "darkness") of the characters on the LCD screen. You may find that

    different LCDs work differently with lower voltages providing darker

    characters in some and higher voltages do the same thing in others

    CIRCUIT DIAGRAM OF LCD INTERFACING

  • 8/13/2019 Remote Digital Clock

    57/79

  • 8/13/2019 Remote Digital Clock

    58/79

    Optional in&u)trial temperature range 5'C to H8!C

    Available in 8-pin DIP or SOIC Underwriters Laboratory (UL)

    recognized

    PIN DESCRIPTION

    6CC 5 (rimary (o;er .upply

    P"> P# 5 3#07841 Cry)tal Connection

    6+AT 5 H36 +attery Input

    GND 5 Groun&

    .DA 5 .erial Data

    .CL 5 .erial Cloc4

    .QJOT 5 .9uare a?eJOutput Dri?er

    DESCRIPTION

  • 8/13/2019 Remote Digital Clock

    59/79

    T*e D."37 .erial Real5Time Cloc4 i) a lo;5po;er>

    %ull

    &ay> &ate> mont*> an& year in%ormation0 T*e en& o% t*e mont* &ate i)

    automatically a&Bu)te& %or mont*) ;it* %e;er t*an 3" &ay)> inclu&ing

    correction) %or leap year0 T*e cloc4 operate) in eit*er t*e #'5*our or

    "#5*our %ormat ;it* AMJ(M in&icator0 T*e D."37 *a) a

  • 8/13/2019 Remote Digital Clock

    60/79

  • 8/13/2019 Remote Digital Clock

    61/79

    VISION

    The Vision IDE is, for most developers, the easiest way to

    create embedded system programs. This chapter describes

    commonly used Vision features and explains how to use them.

    General Remarks and Concepts

    Before we start to describe how to use Vision, some general

    remarks, common to many screens1 and to the behavior of the

    development tool, are presented. In our continuous effort todeliver best-in-class development tools, supporting you in your

    daily work, Vision has been built to resemble the look-and-feel

    of widespread applications. This approach decreases your

    learning curve, such that

    you may start to work with Vision right away.

    Based on the concept of windows:

  • 8/13/2019 Remote Digital Clock

    62/79

    Vision windows can be re-arranged, tiled, and attached to

    other screen areas or windows respectively It is possible to drag

    and drop windows, objects, and variables

    A Context Menu, invoked through the right mouse button, is

    provided for most objects. You can use keyboard shortcuts and

    define your own shortcuts. You can use the abundant features of

    a modern editor. Menu items and Toolbar buttons are greyed out

    when not available in the Current context.

    Graphical symbols are used to resemble options, to mark

    unsaved changes, or reveal objects not included into the project.

    Status Bars display context-driven information.You can

    associate Vision to third-party tools

  • 8/13/2019 Remote Digital Clock

    63/79

  • 8/13/2019 Remote Digital Clock

    64/79

    The Project Windows area is that part of the screen in which,

    by default, the Project Window, Functions Window, Books

    Window, and Registers Window are displayed.

    Within the Editor Windows area, you are able to change the

    source code, view performance and analysis information, and

    check the disassembly code.

    The Output Windows area provides information related to

    debugging, memory, symbols, call stack, local variables,

    commands, browse information, and find in files results.

    If, for any reason, you do not see a particular window and have

    tried displaying/hiding it several times, please invoke the default

    layout of Vision through the Window Reset Current

    Layout Menu.

    Positioning Windows

    The Vision windows may be placed onto any area of the

    screen, even outside of the Vision frame, or to another physical

    screen.

  • 8/13/2019 Remote Digital Clock

    65/79

    Click and hold the Title Bar1 of a window with the left mouse

    button

    Drag the window to the preferred area, or onto the preferred

    control, and release the mouse button

    Please note, source code files cannot be moved outside of the

    Editor Windows2.\ Invoke the Context Menu of the windows

    Title Bar to change the docking attribute of a window object. Insome cases, you must perform this action before you can drag

    and drop the window.

    Vision displays docking helper controls3, emphasizing the area

    where the window will be attached. The new docking area is

    represented by the section highlighted in blue. Snap the window

    to the Multiple Document Interface (MDI) or to a Windows area

    by moving the mouse over the preferred control.

  • 8/13/2019 Remote Digital Clock

    66/79

    eil so7ta.e con9e.ts te C;co$es into te Intel e co$e