The document discusses the AT89S52 microcontroller. It provides details on its architecture, memory types, ports, and pin configuration. The AT89S52 is an 8-bit microcontroller with 8K bytes of Flash memory manufactured by Atmel. It has 4 ports with 32 total I/O lines that can be used for input/output. It contains RAM for variable storage and EEPROM for program storage.
Gen AI in Business - Global Trends Report 2024.pdf
Divya
1. 'AT89S52'
8051 is the name of a big family of microcontrollers. The device which we used in our project was the
'AT89S52' which is a typical 8051 microcontroller manufactured by Atmel™. The block diagram provided
by Atmel™ in their datasheet that showed the architecture of 89S52 device seemed a bit complicated. A
simpler architecture can be represented below
The 89S52 has 4 different ports, each one having 8 Input/output lines providing a total of 32 I/O lines.
Those ports can be used to output DATA and orders do other devices, or to read the state of a sensor, or
a switch. Most of the ports of the 89S52 have 'dual function' meaning that they can be used for two
different functions.
The first one is to perform input/output operations and the second one is used to implement special
features of the microcontroller like counting external pulses, interrupting the execution of the program
according to external events, performing serial data transfer or connecting the chip to a computer to
update the software. Each port has 8 pins, and will be treated from the software point of view as an 8-
bit variable called 'register', each bit being connected to a different Input/Output pin.
There are two different memory types: RAM and EEPROM. Shortly, RAM is used to store variable during
program execution, while the EEPROM memory is used to store the program itself, that's why it is often
referred to as the 'program memory'. It is clear that the CPU (Central Processing Unit) is the heart of the
micro controllers. It is the CPU that will Read the program from the FLASH memory and Execute it by
interacting with the different peripherals
Diagram below shows the pin configuration of the 89S52, where the function of each pin is written next
to it, and, if it exists, the dual function is written between brackets. Note that the pins that have dual
functions can still be used normally as an input/output pin. Unless the program uses their dual
functions, all the 32 I/O pins of the microcontroller are configured as input ouput pins
1. Description
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 Atmel’s high-density nonvolatile
memory technology and is compatible with the industry-standard 80C51 instruction set and pinout. The
on-chip Flash allows the program
memory to be reprogrammed in-system or by a conventional nonvolatile memory 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.
2. 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 contents but freezes
the oscillator, disabling all other chip functions until the next interrupt
or hardware reset
lcd:
A liquid crystal display (LCD) is a flat panel display, electronic visual display, or video display that uses
the light modulating properties of liquid crystals. Liquid crystals do not emit light directly.
LCDs are available to display arbitrary images (as in a general-purpose computer display) or fixed images
which can be displayed or hidden, such as preset words, digits, and 7-segment displays as in a digital
clock. They use the same basic technology, except that arbitrary images are made up of a large number
of small pixels, while other displays have larger elements.
LCDs are used in a wide range of applications including computer monitors, televisions, instrument
panels, aircraft cockpit displays, and signage. They are common in consumer devices such as video
players, gaming devices, clocks, watches, calculators, and telephones, and have replaced cathode ray
tube (CRT) displays in most applications. They are available in a wider range of screen sizes than CRT and
plasma displays, and since they do not use phosphors, they do not suffer image burn-in. LCDs are,
however, susceptible to image persistence.[1]
The LCD is more energy efficient and can be disposed of more safely than a CRT. Its low electrical power
consumption enables it to be used in battery-powered electronic equipment. It is an electronically
modulated optical device made up of any number of segments filled with liquid crystals and arrayed in
front of a light source (backlight) or reflector to produce images in color or monochrome. Liquid crystals
were first developed in 1888.[2] By 2008, worldwide sales of televisions with LCD screens exceeded
annual sales of CRT units; the CRT became obsolete for most purposes.
loudspeaker:
A loudspeaker (or "speaker") is an electroacoustic transducer that produces sound in response to an
electrical audio signal input. Non-electrical loudspeakers were developed as accessories to telephone
systems, but electronic amplification by vacuum tube made loudspeakers more generally useful. The
3. most common form of loudspeaker uses a paper cone supporting a voice coil electromagnet acting on a
permanent magnet, but many other types exist. Where accurate reproduction of sound is required,
multiple loudspeakers may be used, each reproducing a part of the audible frequency range. Miniature
loudspeakers are found in devices such as radio and TV receivers, and many forms of music players.
Larger loudspeaker systems are used for music, sound reinforcement in theatres and concerts, and in
public address systems.
In-System Programming (ISP):
is the ability of some programmable logic devices, microcontrollers, and other programmable electronic
chips to be programmed while installed in a complete system, rather than requiring the chip to be
programmed prior to installing it into the system.
The primary advantage of this feature is that it allows manufacturers of electronic devices to integrate
programming and testing into a single production phase, rather than requiring a separate programming
stage prior to assembling the system. This may allow manufacturers to program the chips in their own
system's production line instead of buying preprogrammed chips from a manufacturer or distributor,
making it feasible to apply code or design changes in the middle of a production run.
Typically, chips supporting ISP have internal circuitry to generate any necessary programming voltage
from the system's normal supply voltage, and communicate with the programmer via a serial protocol.
Most programmable logic devices use a variant of the JTAG protocol for ISP, in order to facilitate easier
integration with automated testing procedures. Other devices usually use proprietary protocols or
protocols defined by older standards. In systems complex enough to require moderately large glue logic,
designers may implement a JTAG-controlled programming subsystem for non-JTAG devices such as flash
memory and microcontrollers, allowing the entire programming and test procedure to be accomplished
under the control of a single protocol.
An example of devices using ISP is the AVR line of micro-controllers by Atmel such as the ATmega series
Step down transformers
are designed to reduce electrical voltage. Their primary voltage is greater than their secondary voltage.
This kind of transformer "steps down" the voltage applied to it. For instance, a step down transformer is
needed to use a 110v product in a country with a 220v supply.
Step down transformers convert electrical voltage from one level or phase configuration usually down to
a lower level. They can include features for electrical isolation, power distribution, and control and
instrumentation applications. Step down transformers typically rely on the principle of magnetic
induction between coils to convert voltage and/or current levels.
Step down transformers are made from two or more coils of insulated wire wound around a core made
of iron. When voltage is applied to one coil (frequently called the primary or input) it magnetizes the
4. iron core, which induces a voltage in the other coil, (frequently called the secondary or output). The
turns ratio of the two sets of windings determines the amount of voltage transformation.
An example of this would be: 100 turns on the primary and 50 turns on the secondary, a ratio of 2 to 1.
Step down transformers can be considered nothing more than a voltage ratio device.
With step down transformers the voltage ratio between primary and secondary will mirror the "turns
ratio" (except for single phase smaller than 1 kva which have compensated secondaries). A practical
application of this 2 to 1 turns ratio would be a 480 to 240 voltage step down. Note that if the input
were 440 volts then the output would be 220 volts. The ratio between input and output voltage will stay
constant. Transformers should not be operated at voltages higher than the nameplate rating, but may
be operated at lower voltages than rated. Because of this it is possible to do some non-standard
applications using standard transformers.
Single phase step down transformers 1 kva and larger may also be reverse connected to step-down or
step-up voltages. (Note: single phase step up or step down transformers sized less than 1 KVA should
not be reverse connected because the secondary windings have additional turns to overcome a voltage
drop when the load is applied. If reverse connected, the output voltage will be less than desired)
transformer (tr ns-fôr m r)
A device used to change the voltage of an alternating current in one circuit to a different voltage in a
second circuit, or to partially isolate two circuits from each other. Transformers consist of two or more coils
of conducting material, such as wire, wrapped around a core (often made of iron). The magnetic field
produced by an alternating current in one coil induces a similar current in the other coils. If there are
fewer turns on the coil that carries the source of the power than there are on a second coil, the second
coil will provide the same power but at a higher voltage. This is called a step-up transformer. If there
are fewer turns on the second coil than on the source coil, the outgoing power will have a lower voltage.
This is called a step-down transformer.
The Bridge rectifier
is a circuit, which converts an ac voltage to dc voltage using both half cycles of the
input ac voltage. The Bridge rectifier circuit is shown in the figure. The circuit has
four diodes connected to form a bridge. The ac input voltage is applied to the
diagonally opposite ends of the bridge. The load resistance is connected between the
other two ends of the bridge.
For the positive half cycle of the input ac voltage, diodes D1 and D3 conduct, whereas
5. diodes D2 and D4 remain in the OFF state. The conducting diodes will be in series
with the load resistance RL and hence the load current flows through R L.
For the negative half cycle of the input ac voltage, diodes D2 and D4 conduct
whereas, D1 and D3 remain OFF. The conducting diodes D2 and D4 will be in series
with the load resistance RL and hence the current flows through R L in the same
direction as in the previous half cycle. Thus a bi-directional wave is converted into a
unidirectional wave
filter
It is sometimes desirable to have circuits capable of selectively filtering one frequency or
range of frequencies out of a mix of different frequencies in acircuit. A circuit designed to
perform this frequency selection is called a filter circuit, or simply a filter. A common need
for filter circuits is in high-performance stereo systems, where certain ranges of audio
frequencies need to be amplified or suppressed for best sound quality and power efficiency.
You may be familiar with equalizers, which allow the amplitudes of several frequency ranges
to be adjusted to suit the listener's taste and acoustic properties of the listening area. You
may also be familiar with crossover networks, which block certain ranges of frequencies
from reaching speakers. A tweeter (high-frequency speaker) is inefficient at reproducing
low-frequency signals such as drum beats, so a crossover circuit is connected between the
tweeter and the stereo's output terminals to block low-frequency signals, only passing high-
frequency signals to the speaker's connection terminals. This gives better audio system
efficiency and thus better performance. Both equalizers and crossover networks are
examples of filters, designed to accomplish filtering of certain frequenciesave.
Flash memory is a non-volatile computer storage chip that can be electrically erased and reprogrammed.
It was developed from EEPROM (electrically erasable programmable read-only memory) and must be
erased in fairly large blocks before these can be rewritten with new data. The high density NAND type
must also be programmed and read in (smaller) blocks, or pages, while the NOR type allows a
single machine word (byte) to be written or read independently.
The NAND type is primarily used in memory cards, USB flash drives, solid-state drives, and similar
products, for general storage and transfer of data. The NOR type, which allows true random access and
therefore direct code execution, is used as a replacement for the older EPROM and as an alternative to
certain kinds of ROM applications. However, NOR flash memory may emulate ROM primarily at
the machine code level; many digital designs need ROM (or PLA) structures for other uses, often at
significantly higher speeds than (economical) flash memory may achieve. NAND or NOR flash memory is
also often used to store configuration data in numerous digital products, a task previously made possible
by EEPROMs or battery-powered static RAM.