“Automatic bidirectional visitor counter for controlling using 8051 microcontroller (AT89S52)”
A counter that can change its state in either direction, under control of an up–down selector input, is known as an up–down counter. The circuit given here can count numbers from 0 to 9999 in up and down modes depending upon the state of the selector. It can be used to count the number of persons entering a hall in the up mode at entrance gate. In the down mode, it can count the number of persons leaving the hall by decrementing the count at exit gate. It can also be used at gates of parking areas and other public places.
This circuit divided in three parts: sensor, controller and counter display. The sensor would observe an interruption and provide an input to the controller which would run the counter in up/down mode depending upon the selector setting. The same count is displayed on a set of 7-segment displays through the controller.
This is very wonderful project to control the working of IR birectional
Visitor counter. These sensor are equipped with the CPU which control
the counter.
1. 8051 Microcontroller
2. ULN2003
3. LCD .
4.LM358
5.Relay
6.IR TRANSMITTER-RECEVER
APPLICATIONS
Telecom
• Mobile phone systems (handsets and base stations), modems, routers
• Automotive application
• Braking system, Traction control, Airbag release system, Management units,
and Steer-by-wire systems.
Domestic application
• Dishwasher, television, washing machines, microwave ovens, Video
recorders, Security system, Garage door controllers, Calculators, Digital
watches, VCRs, Digital cameras, Remote Controls, Treadmills
Robotic
• Fire fighting robot, Automatic floor cleaner, robotic arm
Aerospace application
• Flight control system, Engine controllers, Autopilots, Passenger entertainment
system
Medical equipment
• Anesthesia monitoring system, ECG monitors, Pacemakers, Drug delivery
systems, MRI scanners
Defense system
• Radar systems, Fighter aircraft flight control system, Radio system, Missile
guidance systems
Office automation
• Laser printers, Fax machines, Pagers, Cash registers, Gas pumps, Credit /Debit
card readers, Thermostats, Grain analyzers.
COMPONENT DESCRIPTION
1)MICRO-CONTROLLER
8051 DESCRIPTION
The IC 8051 is a low-power;
high-performance CMOS 8-bit microcomputer with 4K bytes of Flash programmable
and erasable read only memory (PEROM). The device is manufactured using Atmel’s
high-density nonvolatile memory technology and is compatible with the
industry-standard MCS-51 instruction set and pin out. The on-chip Flash allows
the program memory to be reprogrammed in-system or by a conventional
nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on
a monolithic chip, the Atmel IC 8051 is a powerful microcomputer which provides
a highly-flexible and cost-effective solution to many embedded control
applications. The IC 8051 provides the following standard features: 4K bytes of
Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector
two-level interrupt architecture, full duplex serial port, on-chip oscillator
and clock circuitry. In addition, the IC 8051 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.
Pin Description of the 8051
PROCESSOR
A processor is an electronic device capable of
manipulating data in a way specified by a sequence of instructions.
INSTRUCTIONS
Instructions in a computer are
binary numbers just like data. Different numbers, when read and executed by a
processor, cause different things to happen. The instructions are also called
opcodes or machine codes.
Different 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.
PROGRAM
The sequence of instructions is what constitutes a
program. The sequence of instructions may be altered to suit the application.
ASSEMBLY LANGUAGE
Writing 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 Form is called an assembly language program. But it must be converted
into machine language for execution by processor.
ASSEMBLER
An assembly language program
should be converted to machine language for execution by processor. Special
software called ASSEMBLER converts a program written in mnemonics to its
equivalent machine opcodes.
HIGH LEVEL LANGUAGE
A high level language like C may
be used to write programs for processors. Software called compiler converts
this high level language program down to machine code. Ease of programming and
portability.
VCC (Pin 40)
Provides voltage to the chip . +5V GND (Pin 20)
Ground
XTAL1 (Pin 19) and XTAL2 (Pin 18)
Crystal Oscillator connected to pins 18, 19.Two capacitors of
30pF value. Time for one machine cycle:11.0592/12=1.085 ยต secs
RST (Pin 9) RESET pin
1.Active high. On applying a high pulse to this pin,
microcontroller will reset and terminate all activities.
2.INPUT pin
3.Minimum
2 machine cycles required to make RESET 4.Value of registers after RESET
External Access: EA 31
•Connected
to VCC for on chip ROM
•Connected
to Ground for external ROM containing th e code Input Pin
Program Store Enable: PSEN 29
•Output
Pin
•In case of external ROM
with code it is connected to the OE pin of the ROM
Address Latch Enable: ALE
30
• Output Pin.
Active high
•In case of external ROM ,ALE is used to de multipl ex (PORT
0) the address and data bus by connecting to the G pin of 74LS373 chip
I/O Port Pins and their
Functions:
•Four
ports P0,P1,P2,P3 with 8 pins each, making a total of 32 input/output pins
•On RESET all ports are configured as output. They need to be
programmed to make them function as inputs
PORT 0
•Pins
32-39
•Can be used as both Input
or Output
•External
pull up resistors of 10K need to be connected
•Dual
role: 8051 multiplexes address and data throu gh port 0 to save pins .AD0-AD7
•ALE is used to de multiplex data and address bus
•Pins 1
through 8 •Both input or output •No dual function
•Internal
pull up registers
•On RESET configured as
output
PORT 2
•Pins 21 through 28
•No
external pull up resistor required •Both input or output
•Dual
Function: Along with Port 0 used to provide t he 16-Bit address for external
memory. It provides higher address A8-A16
PORT 3
•Pins 10
through 17
•No external pull up
resistors required
PROCESSOR
ARCHITECTURE