SlideShare a Scribd company logo
1 of 6
Download to read offline
IOSR Journal of Electronics and Communication Engineering (IOSR-JECE)
e-ISSN: 2278-2834,p- ISSN: 2278-8735.Volume 10, Issue 1, Ver. III (Jan - Feb. 2015), PP 73-78
www.iosrjournals.org
DOI: 10.9790/2834-10137378 www.iosrjournals.org 73 | Page
Design, Construction and Operation of a 4-Bit Counting Circuit
Brian E. Usibe* and Julie C. Ogbulezie
Department of Physics, University of Calabar P.M.B. 1115 Calabar, Nigeria
Abstract: A four-bit binary counting circuit was designed and constructed. The materials used were; PIC
Microcontroller, Seven-segment LED, Printed Circuit Board, LEDs, Transistors, 9v DC power source (Battery),
and other passive components. The method adopted for this counter makes use of a microcontroller as the backbone
of the design, which holds the command for every action that is to occur during an operation. The output (results) of
the circuit was indicated by four Light Emitting Diodes (LEDs) with counts; 0000, 0001, 0010, 0011, 0100, 1010,
0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110 and 1111. These binary outputs were further converted to
decimal equivalent through a reprogrammable microcontroller and then displayed using a dual seven-segment
display device.
Keywords: Counting circuit, PIC microcontroller, seven-segment display, logic systems.
I. INTRODUCTION
An instrument which, in its simplest form, provides an output that corresponds to the number of pulses
applied to its input is termed a digital counter. In digital logic, a counter is a device which stores (and sometimes
displays) the number of times a particular event or process has occurred, often in relationship to a clock signal. A
circuit which performs this function and has these characteristics is generally referred to as a digital counter [1].
Counting circuits belong to a particular class of sequential circuits. Each has one particular input and a
number of outputs which follows some digital codes. The counter itself is a J-K flip-flop. Two major types of
counting circuits exist; the Batch and the Measurement types [2].
Digital counters operate in the binary number system. This is so because binary system is easily and
quickly carried out with electronic circuitry. Computer information is expressed in binary form (bits) because of the
convenience of handling two clearly-defined states. Each bit is either a ZERO or a ONE, OFF or ON, LOW or
HIGH, etc [3]. Fig 1 and table 1 illustrate a 4–bit binary counter that can count from 0 to 15. The 16th
count input
causes the counter to return to the 0 output and generate a carry pulse. This action of a counter to return to the 0 state
with a carry output on every 16th
pulse makes the 4–bit binary a modulo-16 (mod 16) counter. Modulus counter
means it operates the predetermined state. For example, in mod-10 counter, it counts only 10 states.
Fig. 1: Schematic symbol
The four binary outputs: QD, QC, QB and QA in figure.1 are said to have an 8-4-2-1 weighting because if QD through
QA are all 1s, then the binary counter output would be;
11112 = (1x23
) + (1x22
) + (1x21
) + (1x20
) = 8 + 4 + 2 + 1 = 1510
The subscripts indicate the base of the system.
Table 1: Counter output in various number systems
No. of
count
pulse
Binary
output
Octal
(Base
8)
Decimal
(Base 10)
Hexadecimal
(Base 16)
0 0000 0 0 0
1 0001 1 1 1
2 0010 2 2 2
3 0011 3 3 3
4 0100 4 4 4
5 0101 5 5 5
6 0110 6 6 6
7 0111 7 7 7
Design, Construction and Operation of A 4-Bit Counting Circuit
DOI: 10.9790/2834-10137378 www.iosrjournals.org 74 | Page
8 1000 10 8 8
9 1001 11 9 9
10 1010 12 10 A
11 1011 13 11 B
12 1100 14 12 C
13 1101 15 13 D
14 1110 16 14 E
15 1111 17 15 F
16 0000 0 0 0
II. THEORY
Every counting circuit consists of four basic units –the sensing unit, the signal conditioning unit, the
counter unit and the output unit [4]
The sensing unit is usually made of a photoelectric device or a switch or a capacity pick-up or an
interruptible jet. Its function is to detect what needs to be counted. The signal-conditioning unit is usually an
interfacing device such as R-C Discriminator circuit. Its function is to arrange the „sensed‟ signal or object into a
countable form. The counter, which is usually the shift register of a J-K flip-flop records the event or object time-
wise. The out put device can be an indicating visual meter or an audible beep producer. However, in this work, a
PIC microcontroller would be used in place of the traditional J-K flip-flop.
The primary Boolean rule applicable for the manipulation of this counting circuit is the Exclusive-OR
(XOR).
Table 2: Truth table for XOR Gate
A B P
0 0 0
0 1 1
1 0 1
1 1 0
III. MATERIALS AND METHODS
1. Materials used in the construction
The materials used during the construction of the circuit include; soldering iron, soldering lead, soldering
pump, side cutter, digital multi-meter, sand paper and electrician knife, as well as plastic Perspex for the casing.
The binary counting circuit comprises of four (4) distinct sections. The hardware is a collection of Light
Emitting Diodes, Seven Segment Display and some resistors that limit current for both the Light Emitting Diodes
and the seven segment display. These components are interfaced to the microcontroller in order to output the
required result in a more interpretable format.
The method adopted for this counter makes use of a microcontroller as the backbone of the design, which
holds the command for every action that is to occur during an operation. Reason for this method is to reduce number
of components and improve the functionality of the circuit. Figure 2 shows the block diagram of the counting
circuit.
Fig. 2: Block diagram of a 4-bit binary counting circuit
2. Design stage
The design stages for the 4-bit binary counter comprises the sequential connection of the power supply, the
seven segment display, the binary status LED indicators and the Microcontroller. The various units that constitute
the system would be built onto a Printed Circuit Board, tested and then eventually inter-connected. For reasons of
operational flexibility, reliability, and reproducibility, specialized integrated circuit like microcontroller would be
POWER
SUPPLY
MICRO-
CONTROLLER
SEVEN
SEGMENT
DISPLAY
BINARY
STATUS LED
INDICATORS
Design, Construction and Operation of A 4-Bit Counting Circuit
DOI: 10.9790/2834-10137378 www.iosrjournals.org 75 | Page
used.
The microcontroller is the heart of the entire design. It processes the binary information and displays it on
the four Binary Status LED indicators, at the same time, converts the generated binary to decimal value then
displays it on the seven segment display. The microcontroller also manages the dual seven segment display by way
of multiplexing the displays which helps in reducing complex wiring in the diagram.
Fig. 3: Circuit for the binary LED and the Microcontroller stage
The voltage drop across the seven segments LED is 2V [6]. Since a 5V supply is used in powering both the seven
segments LED display and the LEDs, this leaves 3V across their respective resistors. Therefore, current through the
seven segment LED display is:
𝐼 = 𝑉/𝑅 = 3/150 = 0.02𝐴. (1)
While that of the LED is:
𝐼 = 𝑉/𝑅 = 3/330 = 0.009𝐴 (2)
Equations 1 and 2 can be written as
𝑅 = 𝑉𝑆 – 𝑉𝐷 / 𝐼 (3)
Where VS is supply voltage and VD is LED voltage drop. [7]
From equation 3, resistor value for seven segment display is
𝑅 = 5 – 2/0.02 = 3/0.02 = 150
Switching transistor
Using transistor BC 548, Supply voltage, Vs = 9V
The load driven by the transistor is the relay Load resistance, RL = 150
Load current 𝐿𝐼 = 𝑉𝑠/𝑅𝐿 = 9/150 = 60𝑚𝐴 (4)
Design, Construction and Operation of A 4-Bit Counting Circuit
DOI: 10.9790/2834-10137378 www.iosrjournals.org 76 | Page
Since Load current LI (max) must be greater than IC and from the data sheet Ic (max) = 100mA
The Base Resistor, RB
𝑅𝐵 = 𝑉𝑐𝑐 × ℎ𝑓𝑒 5 × 𝐼𝑐 (5)
Where
IC = collector current
Vcc = supply voltage [8]
Therefore RB = 9 × 400 5 × 100 = 7.2 KΩ
Where the typical hfe = 400 (from data sheet). Therefore, the closet value for the base resistor is selected to be 10KΩ.
3. Schematic and Printed Circuit Board
The effective and reliable design and production of the schematic and PCB creates better performance and
consistent results. The software used in creating the PCBs and schematic diagram is Dip Trace, which was
downloaded from www.diptrace.com. Crosschecking of footprints and design procedures was necessary to ensure a
favourable outcome. After converting the schematic into PCB, a laser jet printer was used in the printing of the
converted design into a special material known as Press and Peel sheet, a transparent film used in PCB production.
IV. RESULTS AND DISCUSSIONS
The binary to decimal and all the algorithm conversions and counting are implemented in the firmware of
PIC16F628. The result is finally displayed on the Dual Seven Segment LED display. The software was compiled
with the mikroC Pro for PIC compiler from mikroElektronika. The firmware was compiled into a machine code
using the same Editor, and programmed into the microcontroller. The simulation of the algorithm of the detector
system was done using Proteus software from Lab Center Electronics. Figure 5 shows the constructed circuit.
Fig. 5: The constructed 4-bit binary counter
The following results were obtained at each count pulse.
Table 10: Counter output obtained at each count pulse
Pulse
No/
SSD
LED 1 LED 2 LED 3 LED 4
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
Design, Construction and Operation of A 4-Bit Counting Circuit
DOI: 10.9790/2834-10137378 www.iosrjournals.org 77 | Page
9 1 0 0 1
10 1 0 1 0
11 1 0 1 1
12 1 1 0 0
13 1 1 0 1
14 1 1 1 0
15 1 1 1 1
4.1 Mode of operation of the counter
A multiplex dual 7-segment display was employed in order to display the binary equivalent that is
generated at a time. The Microcontroller used in the design is a type PIC16F628. This is one of the most recent
Microcontrollers and has a built-in oscillator and can be reprogrammed. The reset pin (4) of the microcontroller is
made positive by the 10KΩ pull-up resistor and a switch in order for the PIC to function properly. If the counter is
to be reset, the switch can be pressed, pulling pin 4 to 0V for a moment. The “trigger reaction” signal from the push
button is fed to the pin RA1 of the microcontroller. The 10KΩ resistors pull these inputs to +5V and 0V when the
push button is pressed, in which case the appropriate input is made negative (logic 0). The LEDs are driven from the
microcontroller pins RA0, RA2, RA3 and RA4, respectively, via 10KΩ pull-up resistors. Pins RB0, RB1, RB2 and
RB3 provide a Binary Coded Decimal (BCD) output equivalent to the number that will be displayed on the Seven
Segment Display. This binary is converted to a seven-segment output by the microcontroller and the outputs to the
dual seven segment display are delivered from pins RB0 to RB7 via 330Ω current limiting resistors. The complete
circuit diagram for the 4-Bit Binary Counter is shown in figure 4.
There is insufficient power from the microcontroller to drive the dual displays, and in any case, it is
customary to use “strobes” (multiplexing) to drive two displays from one set of segment outputs. Virtually all
displays are driven in this way. This explains why calculators and other digital electronic devices often appear to
flicker when filmed with a video camera. Strobe is achieved by careful programming, and the use of microcontroller
pin RA7 and RA8 to control which display is lit at any one time.
When RA7 and RA8 are at logic 1, current flows through the 10kΩ current limiting resistor into the base of
the two transistors. Hence the transistor switches on, and their collectors are effectively pulled to 0V, via their
emitters. The collectors of the transistors are connected to the display common cathode Pins and so the display is
able to light up according to the binary coded output. However, when RA7 and RA8 are at logic 0 (0V), the two
transistors turned off, and so no current will flow to the display and hence the display stays off. Decoupling of the
supply is provided by electrolytic capacitors and a 9V PP3 battery provides the necessary power supply.
Fig. 4: Schematic Layout of the 4-Bit Binary Counter
4.2 Applications of the circuit
The designed and constructed 4-bits counter can find application in the following areas:
(1) It is used essentially in digital computers and other digital devices for memory storage and counting in different
bases.
(2) The binary counting circuit can be modified and used in radioactivity Rate Meter for count rate per record.
(3) It can be modified and applied in frequency-dividing operations.
(4) It can be used in digital clocks and timers for counting events.
Design, Construction and Operation of A 4-Bit Counting Circuit
DOI: 10.9790/2834-10137378 www.iosrjournals.org 78 | Page
V. CONCLUSION
Digital counting circuits are vital in everyday Electronics. They are used not only in counting, but in the
conversion from one number base to another. Although, counters can also be designed/constructed using multi-
vibrators, this research has used the PIC Microcontroller, showing that it is the best method, as it makes use of a
firmware for its operation, at the same time reducing the number of components in the circuit. Again, the chip could
be reprogrammed for the realization of other types of counters.
REFERENCES
[1]. Menkiti, A.I. Computer Logic and Architecture. University of Calabar Press, Calabar, Nigeria, 2011.
[2]. Bozie, S.M. Electronics and switching circuits. Edward Arnold Publication, London, 1979.
[3]. Givant, S. and Halmos, P. Introduction to Boolean Algebra. Undergraduate Text in Mathematics, Sprinter Pub., 2009.
[4]. Hill, J.F. and Peterson, G.R. Introduction to switching theory and logical design. John Wiley and Sons, New York, 1974.
[5]. Patton, A. An introduction to digital logic. Macmillan Books, London, 1973.
[6]. Mandll, M. Directory of electronics circuits with glossary of terms. Eaglewood Cliffs, New Jersey, 1978.
[7]. Jaegar, R. C. Microelectronics circuit design. McGraw Hill. pp.226-233, 1997
[8]. Haykinl, S.S. Transistor circuits in electronics. Liffer Books, London, 1971.

More Related Content

What's hot

Development of Distributed Mains Monitoring and Switching System for Indus Co...
Development of Distributed Mains Monitoring and Switching System for Indus Co...Development of Distributed Mains Monitoring and Switching System for Indus Co...
Development of Distributed Mains Monitoring and Switching System for Indus Co...iosrjce
 
Dilo lab
Dilo labDilo lab
Dilo labnisafaa
 
Electronics counter
Electronics counterElectronics counter
Electronics counterkanusinghal3
 
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C ProtocolInterfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C ProtocolIJERA Editor
 
Eceg 3201-dld-lec 11-registers_and_asynchoronous_counters
Eceg 3201-dld-lec 11-registers_and_asynchoronous_countersEceg 3201-dld-lec 11-registers_and_asynchoronous_counters
Eceg 3201-dld-lec 11-registers_and_asynchoronous_countersNebiyu Musie
 
Industrial training report of embedded system and robotics
Industrial training report of embedded system and roboticsIndustrial training report of embedded system and robotics
Industrial training report of embedded system and roboticsPallavi Bharti
 
IRJET- Design and Implementation of Telemetry Encoder for Light- Weight Ballo...
IRJET- Design and Implementation of Telemetry Encoder for Light- Weight Ballo...IRJET- Design and Implementation of Telemetry Encoder for Light- Weight Ballo...
IRJET- Design and Implementation of Telemetry Encoder for Light- Weight Ballo...IRJET Journal
 
Development and Application of a Failure Monitoring System by Using the Vibra...
Development and Application of a Failure Monitoring System by Using the Vibra...Development and Application of a Failure Monitoring System by Using the Vibra...
Development and Application of a Failure Monitoring System by Using the Vibra...inventy
 
Internet enebled data acquisition and device control
Internet enebled data acquisition and device controlInternet enebled data acquisition and device control
Internet enebled data acquisition and device controleSAT Journals
 
FAULT SECURE ENCODER AND DECODER WITH CLOCK GATING
FAULT SECURE ENCODER AND DECODER WITH CLOCK GATINGFAULT SECURE ENCODER AND DECODER WITH CLOCK GATING
FAULT SECURE ENCODER AND DECODER WITH CLOCK GATINGVLSICS Design
 

What's hot (16)

Development of Distributed Mains Monitoring and Switching System for Indus Co...
Development of Distributed Mains Monitoring and Switching System for Indus Co...Development of Distributed Mains Monitoring and Switching System for Indus Co...
Development of Distributed Mains Monitoring and Switching System for Indus Co...
 
Digital Components
Digital ComponentsDigital Components
Digital Components
 
Dilo lab
Dilo labDilo lab
Dilo lab
 
Electronics counter
Electronics counterElectronics counter
Electronics counter
 
Bv4301417422
Bv4301417422Bv4301417422
Bv4301417422
 
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C ProtocolInterfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol
 
Ju2416921695
Ju2416921695Ju2416921695
Ju2416921695
 
Eceg 3201-dld-lec 11-registers_and_asynchoronous_counters
Eceg 3201-dld-lec 11-registers_and_asynchoronous_countersEceg 3201-dld-lec 11-registers_and_asynchoronous_counters
Eceg 3201-dld-lec 11-registers_and_asynchoronous_counters
 
Industrial training report of embedded system and robotics
Industrial training report of embedded system and roboticsIndustrial training report of embedded system and robotics
Industrial training report of embedded system and robotics
 
digital clock atmega16
digital clock atmega16digital clock atmega16
digital clock atmega16
 
IRJET- Design and Implementation of Telemetry Encoder for Light- Weight Ballo...
IRJET- Design and Implementation of Telemetry Encoder for Light- Weight Ballo...IRJET- Design and Implementation of Telemetry Encoder for Light- Weight Ballo...
IRJET- Design and Implementation of Telemetry Encoder for Light- Weight Ballo...
 
Designing Of Time and Power Efficient Model for Controlling Of Critical Process
Designing Of Time and Power Efficient Model for Controlling Of Critical ProcessDesigning Of Time and Power Efficient Model for Controlling Of Critical Process
Designing Of Time and Power Efficient Model for Controlling Of Critical Process
 
Development and Application of a Failure Monitoring System by Using the Vibra...
Development and Application of a Failure Monitoring System by Using the Vibra...Development and Application of a Failure Monitoring System by Using the Vibra...
Development and Application of a Failure Monitoring System by Using the Vibra...
 
Internet enebled data acquisition and device control
Internet enebled data acquisition and device controlInternet enebled data acquisition and device control
Internet enebled data acquisition and device control
 
FAULT SECURE ENCODER AND DECODER WITH CLOCK GATING
FAULT SECURE ENCODER AND DECODER WITH CLOCK GATINGFAULT SECURE ENCODER AND DECODER WITH CLOCK GATING
FAULT SECURE ENCODER AND DECODER WITH CLOCK GATING
 
Badal sharma
Badal sharmaBadal sharma
Badal sharma
 

Viewers also liked

The Analysis of Selected Physico-Chemical Parameters of Water (A Case Study o...
The Analysis of Selected Physico-Chemical Parameters of Water (A Case Study o...The Analysis of Selected Physico-Chemical Parameters of Water (A Case Study o...
The Analysis of Selected Physico-Chemical Parameters of Water (A Case Study o...IOSR Journals
 
Effective Waste Management and Environmental Control
Effective Waste Management and Environmental ControlEffective Waste Management and Environmental Control
Effective Waste Management and Environmental ControlIOSR Journals
 
Performance Analysis of OFDM in Combating Multipath Fading
Performance Analysis of OFDM in Combating Multipath FadingPerformance Analysis of OFDM in Combating Multipath Fading
Performance Analysis of OFDM in Combating Multipath FadingIOSR Journals
 
Vitality of Physics In Nanoscience and Nanotechnology
Vitality of Physics In Nanoscience and NanotechnologyVitality of Physics In Nanoscience and Nanotechnology
Vitality of Physics In Nanoscience and NanotechnologyIOSR Journals
 
Design and Analysis of Microstrip Antenna for CDMA Systems Communication
Design and Analysis of Microstrip Antenna for CDMA Systems CommunicationDesign and Analysis of Microstrip Antenna for CDMA Systems Communication
Design and Analysis of Microstrip Antenna for CDMA Systems CommunicationIOSR Journals
 
Effectiveness of Information Communication Technologies for Education System
Effectiveness of Information Communication Technologies for Education SystemEffectiveness of Information Communication Technologies for Education System
Effectiveness of Information Communication Technologies for Education SystemIOSR Journals
 
Physiological, Biochemical and Modern Biotechnological Approach to Improvemen...
Physiological, Biochemical and Modern Biotechnological Approach to Improvemen...Physiological, Biochemical and Modern Biotechnological Approach to Improvemen...
Physiological, Biochemical and Modern Biotechnological Approach to Improvemen...IOSR Journals
 
A Study On Psychological Variables On Women Sports Participation Levels In Un...
A Study On Psychological Variables On Women Sports Participation Levels In Un...A Study On Psychological Variables On Women Sports Participation Levels In Un...
A Study On Psychological Variables On Women Sports Participation Levels In Un...IOSR Journals
 
A Survey Paper on Cluster Head Selection Techniques for Mobile Ad-Hoc Network
A Survey Paper on Cluster Head Selection Techniques for Mobile Ad-Hoc NetworkA Survey Paper on Cluster Head Selection Techniques for Mobile Ad-Hoc Network
A Survey Paper on Cluster Head Selection Techniques for Mobile Ad-Hoc NetworkIOSR Journals
 

Viewers also liked (20)

The Analysis of Selected Physico-Chemical Parameters of Water (A Case Study o...
The Analysis of Selected Physico-Chemical Parameters of Water (A Case Study o...The Analysis of Selected Physico-Chemical Parameters of Water (A Case Study o...
The Analysis of Selected Physico-Chemical Parameters of Water (A Case Study o...
 
J1303067178
J1303067178J1303067178
J1303067178
 
A017210110
A017210110A017210110
A017210110
 
C012241316
C012241316C012241316
C012241316
 
B012210512
B012210512B012210512
B012210512
 
K017236770
K017236770K017236770
K017236770
 
F010214048
F010214048F010214048
F010214048
 
Effective Waste Management and Environmental Control
Effective Waste Management and Environmental ControlEffective Waste Management and Environmental Control
Effective Waste Management and Environmental Control
 
Performance Analysis of OFDM in Combating Multipath Fading
Performance Analysis of OFDM in Combating Multipath FadingPerformance Analysis of OFDM in Combating Multipath Fading
Performance Analysis of OFDM in Combating Multipath Fading
 
H017514655
H017514655H017514655
H017514655
 
Vitality of Physics In Nanoscience and Nanotechnology
Vitality of Physics In Nanoscience and NanotechnologyVitality of Physics In Nanoscience and Nanotechnology
Vitality of Physics In Nanoscience and Nanotechnology
 
B012540914
B012540914B012540914
B012540914
 
Design and Analysis of Microstrip Antenna for CDMA Systems Communication
Design and Analysis of Microstrip Antenna for CDMA Systems CommunicationDesign and Analysis of Microstrip Antenna for CDMA Systems Communication
Design and Analysis of Microstrip Antenna for CDMA Systems Communication
 
I012646171
I012646171I012646171
I012646171
 
G012125156
G012125156G012125156
G012125156
 
Effectiveness of Information Communication Technologies for Education System
Effectiveness of Information Communication Technologies for Education SystemEffectiveness of Information Communication Technologies for Education System
Effectiveness of Information Communication Technologies for Education System
 
Physiological, Biochemical and Modern Biotechnological Approach to Improvemen...
Physiological, Biochemical and Modern Biotechnological Approach to Improvemen...Physiological, Biochemical and Modern Biotechnological Approach to Improvemen...
Physiological, Biochemical and Modern Biotechnological Approach to Improvemen...
 
H018114956
H018114956H018114956
H018114956
 
A Study On Psychological Variables On Women Sports Participation Levels In Un...
A Study On Psychological Variables On Women Sports Participation Levels In Un...A Study On Psychological Variables On Women Sports Participation Levels In Un...
A Study On Psychological Variables On Women Sports Participation Levels In Un...
 
A Survey Paper on Cluster Head Selection Techniques for Mobile Ad-Hoc Network
A Survey Paper on Cluster Head Selection Techniques for Mobile Ad-Hoc NetworkA Survey Paper on Cluster Head Selection Techniques for Mobile Ad-Hoc Network
A Survey Paper on Cluster Head Selection Techniques for Mobile Ad-Hoc Network
 

Similar to K010137378

Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...IOSR Journals
 
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...IOSR Journals
 
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...IOSR Journals
 
IRJET- Data Acquisition using Tensile Strength Testing Machine
IRJET- Data Acquisition using Tensile Strength Testing MachineIRJET- Data Acquisition using Tensile Strength Testing Machine
IRJET- Data Acquisition using Tensile Strength Testing MachineIRJET Journal
 
IMPLEMENTING A DIGITAL MULTIMETER
IMPLEMENTING A DIGITAL MULTIMETERIMPLEMENTING A DIGITAL MULTIMETER
IMPLEMENTING A DIGITAL MULTIMETERVijay Elavunkal
 
Research Inventy: International Journal of Engineering and Science
Research Inventy: International Journal of Engineering and ScienceResearch Inventy: International Journal of Engineering and Science
Research Inventy: International Journal of Engineering and Scienceresearchinventy
 
Research Inventy : International Journal of Engineering and Science is publis...
Research Inventy : International Journal of Engineering and Science is publis...Research Inventy : International Journal of Engineering and Science is publis...
Research Inventy : International Journal of Engineering and Science is publis...researchinventy
 
20IT204-COA- Lecture 17.pptx
20IT204-COA- Lecture 17.pptx20IT204-COA- Lecture 17.pptx
20IT204-COA- Lecture 17.pptxPerumalPitchandi
 
Ijetae 0312 24
Ijetae 0312 24Ijetae 0312 24
Ijetae 0312 24Memo Love
 
Research Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and ScienceResearch Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and Scienceresearchinventy
 
Microprocessor lab manual
Microprocessor lab manualMicroprocessor lab manual
Microprocessor lab manualDhaval Shukla
 
microcontroller and embedded system
microcontroller and embedded systemmicrocontroller and embedded system
microcontroller and embedded systempradeep rana
 
Industrial Process Management Using LabVIEW
Industrial Process Management Using LabVIEWIndustrial Process Management Using LabVIEW
Industrial Process Management Using LabVIEWIOSR Journals
 

Similar to K010137378 (20)

Bds lab 4
Bds lab 4Bds lab 4
Bds lab 4
 
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
 
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
 
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...Implementation of an Improved Microcontroller Based Moving Message Display Sy...
Implementation of an Improved Microcontroller Based Moving Message Display Sy...
 
E010132736
E010132736E010132736
E010132736
 
Bidirect visitor counter
Bidirect visitor counterBidirect visitor counter
Bidirect visitor counter
 
IRJET- Data Acquisition using Tensile Strength Testing Machine
IRJET- Data Acquisition using Tensile Strength Testing MachineIRJET- Data Acquisition using Tensile Strength Testing Machine
IRJET- Data Acquisition using Tensile Strength Testing Machine
 
IMPLEMENTING A DIGITAL MULTIMETER
IMPLEMENTING A DIGITAL MULTIMETERIMPLEMENTING A DIGITAL MULTIMETER
IMPLEMENTING A DIGITAL MULTIMETER
 
a simple bcd counter project
a simple bcd counter projecta simple bcd counter project
a simple bcd counter project
 
Chapter 6 register
Chapter 6 registerChapter 6 register
Chapter 6 register
 
Ijetcas14 593
Ijetcas14 593Ijetcas14 593
Ijetcas14 593
 
Research Inventy: International Journal of Engineering and Science
Research Inventy: International Journal of Engineering and ScienceResearch Inventy: International Journal of Engineering and Science
Research Inventy: International Journal of Engineering and Science
 
Research Inventy : International Journal of Engineering and Science is publis...
Research Inventy : International Journal of Engineering and Science is publis...Research Inventy : International Journal of Engineering and Science is publis...
Research Inventy : International Journal of Engineering and Science is publis...
 
20IT204-COA- Lecture 17.pptx
20IT204-COA- Lecture 17.pptx20IT204-COA- Lecture 17.pptx
20IT204-COA- Lecture 17.pptx
 
Ijetae 0312 24
Ijetae 0312 24Ijetae 0312 24
Ijetae 0312 24
 
Research Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and ScienceResearch Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and Science
 
Microprocessor lab manual
Microprocessor lab manualMicroprocessor lab manual
Microprocessor lab manual
 
Analog to Digital Converter
Analog to Digital ConverterAnalog to Digital Converter
Analog to Digital Converter
 
microcontroller and embedded system
microcontroller and embedded systemmicrocontroller and embedded system
microcontroller and embedded system
 
Industrial Process Management Using LabVIEW
Industrial Process Management Using LabVIEWIndustrial Process Management Using LabVIEW
Industrial Process Management Using LabVIEW
 

More from IOSR Journals (20)

A011140104
A011140104A011140104
A011140104
 
M0111397100
M0111397100M0111397100
M0111397100
 
L011138596
L011138596L011138596
L011138596
 
K011138084
K011138084K011138084
K011138084
 
J011137479
J011137479J011137479
J011137479
 
I011136673
I011136673I011136673
I011136673
 
G011134454
G011134454G011134454
G011134454
 
H011135565
H011135565H011135565
H011135565
 
F011134043
F011134043F011134043
F011134043
 
E011133639
E011133639E011133639
E011133639
 
D011132635
D011132635D011132635
D011132635
 
C011131925
C011131925C011131925
C011131925
 
B011130918
B011130918B011130918
B011130918
 
A011130108
A011130108A011130108
A011130108
 
I011125160
I011125160I011125160
I011125160
 
H011124050
H011124050H011124050
H011124050
 
G011123539
G011123539G011123539
G011123539
 
F011123134
F011123134F011123134
F011123134
 
E011122530
E011122530E011122530
E011122530
 
D011121524
D011121524D011121524
D011121524
 

Recently uploaded

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

K010137378

  • 1. IOSR Journal of Electronics and Communication Engineering (IOSR-JECE) e-ISSN: 2278-2834,p- ISSN: 2278-8735.Volume 10, Issue 1, Ver. III (Jan - Feb. 2015), PP 73-78 www.iosrjournals.org DOI: 10.9790/2834-10137378 www.iosrjournals.org 73 | Page Design, Construction and Operation of a 4-Bit Counting Circuit Brian E. Usibe* and Julie C. Ogbulezie Department of Physics, University of Calabar P.M.B. 1115 Calabar, Nigeria Abstract: A four-bit binary counting circuit was designed and constructed. The materials used were; PIC Microcontroller, Seven-segment LED, Printed Circuit Board, LEDs, Transistors, 9v DC power source (Battery), and other passive components. The method adopted for this counter makes use of a microcontroller as the backbone of the design, which holds the command for every action that is to occur during an operation. The output (results) of the circuit was indicated by four Light Emitting Diodes (LEDs) with counts; 0000, 0001, 0010, 0011, 0100, 1010, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110 and 1111. These binary outputs were further converted to decimal equivalent through a reprogrammable microcontroller and then displayed using a dual seven-segment display device. Keywords: Counting circuit, PIC microcontroller, seven-segment display, logic systems. I. INTRODUCTION An instrument which, in its simplest form, provides an output that corresponds to the number of pulses applied to its input is termed a digital counter. In digital logic, a counter is a device which stores (and sometimes displays) the number of times a particular event or process has occurred, often in relationship to a clock signal. A circuit which performs this function and has these characteristics is generally referred to as a digital counter [1]. Counting circuits belong to a particular class of sequential circuits. Each has one particular input and a number of outputs which follows some digital codes. The counter itself is a J-K flip-flop. Two major types of counting circuits exist; the Batch and the Measurement types [2]. Digital counters operate in the binary number system. This is so because binary system is easily and quickly carried out with electronic circuitry. Computer information is expressed in binary form (bits) because of the convenience of handling two clearly-defined states. Each bit is either a ZERO or a ONE, OFF or ON, LOW or HIGH, etc [3]. Fig 1 and table 1 illustrate a 4–bit binary counter that can count from 0 to 15. The 16th count input causes the counter to return to the 0 output and generate a carry pulse. This action of a counter to return to the 0 state with a carry output on every 16th pulse makes the 4–bit binary a modulo-16 (mod 16) counter. Modulus counter means it operates the predetermined state. For example, in mod-10 counter, it counts only 10 states. Fig. 1: Schematic symbol The four binary outputs: QD, QC, QB and QA in figure.1 are said to have an 8-4-2-1 weighting because if QD through QA are all 1s, then the binary counter output would be; 11112 = (1x23 ) + (1x22 ) + (1x21 ) + (1x20 ) = 8 + 4 + 2 + 1 = 1510 The subscripts indicate the base of the system. Table 1: Counter output in various number systems No. of count pulse Binary output Octal (Base 8) Decimal (Base 10) Hexadecimal (Base 16) 0 0000 0 0 0 1 0001 1 1 1 2 0010 2 2 2 3 0011 3 3 3 4 0100 4 4 4 5 0101 5 5 5 6 0110 6 6 6 7 0111 7 7 7
  • 2. Design, Construction and Operation of A 4-Bit Counting Circuit DOI: 10.9790/2834-10137378 www.iosrjournals.org 74 | Page 8 1000 10 8 8 9 1001 11 9 9 10 1010 12 10 A 11 1011 13 11 B 12 1100 14 12 C 13 1101 15 13 D 14 1110 16 14 E 15 1111 17 15 F 16 0000 0 0 0 II. THEORY Every counting circuit consists of four basic units –the sensing unit, the signal conditioning unit, the counter unit and the output unit [4] The sensing unit is usually made of a photoelectric device or a switch or a capacity pick-up or an interruptible jet. Its function is to detect what needs to be counted. The signal-conditioning unit is usually an interfacing device such as R-C Discriminator circuit. Its function is to arrange the „sensed‟ signal or object into a countable form. The counter, which is usually the shift register of a J-K flip-flop records the event or object time- wise. The out put device can be an indicating visual meter or an audible beep producer. However, in this work, a PIC microcontroller would be used in place of the traditional J-K flip-flop. The primary Boolean rule applicable for the manipulation of this counting circuit is the Exclusive-OR (XOR). Table 2: Truth table for XOR Gate A B P 0 0 0 0 1 1 1 0 1 1 1 0 III. MATERIALS AND METHODS 1. Materials used in the construction The materials used during the construction of the circuit include; soldering iron, soldering lead, soldering pump, side cutter, digital multi-meter, sand paper and electrician knife, as well as plastic Perspex for the casing. The binary counting circuit comprises of four (4) distinct sections. The hardware is a collection of Light Emitting Diodes, Seven Segment Display and some resistors that limit current for both the Light Emitting Diodes and the seven segment display. These components are interfaced to the microcontroller in order to output the required result in a more interpretable format. The method adopted for this counter makes use of a microcontroller as the backbone of the design, which holds the command for every action that is to occur during an operation. Reason for this method is to reduce number of components and improve the functionality of the circuit. Figure 2 shows the block diagram of the counting circuit. Fig. 2: Block diagram of a 4-bit binary counting circuit 2. Design stage The design stages for the 4-bit binary counter comprises the sequential connection of the power supply, the seven segment display, the binary status LED indicators and the Microcontroller. The various units that constitute the system would be built onto a Printed Circuit Board, tested and then eventually inter-connected. For reasons of operational flexibility, reliability, and reproducibility, specialized integrated circuit like microcontroller would be POWER SUPPLY MICRO- CONTROLLER SEVEN SEGMENT DISPLAY BINARY STATUS LED INDICATORS
  • 3. Design, Construction and Operation of A 4-Bit Counting Circuit DOI: 10.9790/2834-10137378 www.iosrjournals.org 75 | Page used. The microcontroller is the heart of the entire design. It processes the binary information and displays it on the four Binary Status LED indicators, at the same time, converts the generated binary to decimal value then displays it on the seven segment display. The microcontroller also manages the dual seven segment display by way of multiplexing the displays which helps in reducing complex wiring in the diagram. Fig. 3: Circuit for the binary LED and the Microcontroller stage The voltage drop across the seven segments LED is 2V [6]. Since a 5V supply is used in powering both the seven segments LED display and the LEDs, this leaves 3V across their respective resistors. Therefore, current through the seven segment LED display is: 𝐼 = 𝑉/𝑅 = 3/150 = 0.02𝐴. (1) While that of the LED is: 𝐼 = 𝑉/𝑅 = 3/330 = 0.009𝐴 (2) Equations 1 and 2 can be written as 𝑅 = 𝑉𝑆 – 𝑉𝐷 / 𝐼 (3) Where VS is supply voltage and VD is LED voltage drop. [7] From equation 3, resistor value for seven segment display is 𝑅 = 5 – 2/0.02 = 3/0.02 = 150 Switching transistor Using transistor BC 548, Supply voltage, Vs = 9V The load driven by the transistor is the relay Load resistance, RL = 150 Load current 𝐿𝐼 = 𝑉𝑠/𝑅𝐿 = 9/150 = 60𝑚𝐴 (4)
  • 4. Design, Construction and Operation of A 4-Bit Counting Circuit DOI: 10.9790/2834-10137378 www.iosrjournals.org 76 | Page Since Load current LI (max) must be greater than IC and from the data sheet Ic (max) = 100mA The Base Resistor, RB 𝑅𝐵 = 𝑉𝑐𝑐 × ℎ𝑓𝑒 5 × 𝐼𝑐 (5) Where IC = collector current Vcc = supply voltage [8] Therefore RB = 9 × 400 5 × 100 = 7.2 KΩ Where the typical hfe = 400 (from data sheet). Therefore, the closet value for the base resistor is selected to be 10KΩ. 3. Schematic and Printed Circuit Board The effective and reliable design and production of the schematic and PCB creates better performance and consistent results. The software used in creating the PCBs and schematic diagram is Dip Trace, which was downloaded from www.diptrace.com. Crosschecking of footprints and design procedures was necessary to ensure a favourable outcome. After converting the schematic into PCB, a laser jet printer was used in the printing of the converted design into a special material known as Press and Peel sheet, a transparent film used in PCB production. IV. RESULTS AND DISCUSSIONS The binary to decimal and all the algorithm conversions and counting are implemented in the firmware of PIC16F628. The result is finally displayed on the Dual Seven Segment LED display. The software was compiled with the mikroC Pro for PIC compiler from mikroElektronika. The firmware was compiled into a machine code using the same Editor, and programmed into the microcontroller. The simulation of the algorithm of the detector system was done using Proteus software from Lab Center Electronics. Figure 5 shows the constructed circuit. Fig. 5: The constructed 4-bit binary counter The following results were obtained at each count pulse. Table 10: Counter output obtained at each count pulse Pulse No/ SSD LED 1 LED 2 LED 3 LED 4 0 0 0 0 0 1 0 0 0 1 2 0 0 1 0 3 0 0 1 1 4 0 1 0 0 5 0 1 0 1 6 0 1 1 0 7 0 1 1 1 8 1 0 0 0
  • 5. Design, Construction and Operation of A 4-Bit Counting Circuit DOI: 10.9790/2834-10137378 www.iosrjournals.org 77 | Page 9 1 0 0 1 10 1 0 1 0 11 1 0 1 1 12 1 1 0 0 13 1 1 0 1 14 1 1 1 0 15 1 1 1 1 4.1 Mode of operation of the counter A multiplex dual 7-segment display was employed in order to display the binary equivalent that is generated at a time. The Microcontroller used in the design is a type PIC16F628. This is one of the most recent Microcontrollers and has a built-in oscillator and can be reprogrammed. The reset pin (4) of the microcontroller is made positive by the 10KΩ pull-up resistor and a switch in order for the PIC to function properly. If the counter is to be reset, the switch can be pressed, pulling pin 4 to 0V for a moment. The “trigger reaction” signal from the push button is fed to the pin RA1 of the microcontroller. The 10KΩ resistors pull these inputs to +5V and 0V when the push button is pressed, in which case the appropriate input is made negative (logic 0). The LEDs are driven from the microcontroller pins RA0, RA2, RA3 and RA4, respectively, via 10KΩ pull-up resistors. Pins RB0, RB1, RB2 and RB3 provide a Binary Coded Decimal (BCD) output equivalent to the number that will be displayed on the Seven Segment Display. This binary is converted to a seven-segment output by the microcontroller and the outputs to the dual seven segment display are delivered from pins RB0 to RB7 via 330Ω current limiting resistors. The complete circuit diagram for the 4-Bit Binary Counter is shown in figure 4. There is insufficient power from the microcontroller to drive the dual displays, and in any case, it is customary to use “strobes” (multiplexing) to drive two displays from one set of segment outputs. Virtually all displays are driven in this way. This explains why calculators and other digital electronic devices often appear to flicker when filmed with a video camera. Strobe is achieved by careful programming, and the use of microcontroller pin RA7 and RA8 to control which display is lit at any one time. When RA7 and RA8 are at logic 1, current flows through the 10kΩ current limiting resistor into the base of the two transistors. Hence the transistor switches on, and their collectors are effectively pulled to 0V, via their emitters. The collectors of the transistors are connected to the display common cathode Pins and so the display is able to light up according to the binary coded output. However, when RA7 and RA8 are at logic 0 (0V), the two transistors turned off, and so no current will flow to the display and hence the display stays off. Decoupling of the supply is provided by electrolytic capacitors and a 9V PP3 battery provides the necessary power supply. Fig. 4: Schematic Layout of the 4-Bit Binary Counter 4.2 Applications of the circuit The designed and constructed 4-bits counter can find application in the following areas: (1) It is used essentially in digital computers and other digital devices for memory storage and counting in different bases. (2) The binary counting circuit can be modified and used in radioactivity Rate Meter for count rate per record. (3) It can be modified and applied in frequency-dividing operations. (4) It can be used in digital clocks and timers for counting events.
  • 6. Design, Construction and Operation of A 4-Bit Counting Circuit DOI: 10.9790/2834-10137378 www.iosrjournals.org 78 | Page V. CONCLUSION Digital counting circuits are vital in everyday Electronics. They are used not only in counting, but in the conversion from one number base to another. Although, counters can also be designed/constructed using multi- vibrators, this research has used the PIC Microcontroller, showing that it is the best method, as it makes use of a firmware for its operation, at the same time reducing the number of components in the circuit. Again, the chip could be reprogrammed for the realization of other types of counters. REFERENCES [1]. Menkiti, A.I. Computer Logic and Architecture. University of Calabar Press, Calabar, Nigeria, 2011. [2]. Bozie, S.M. Electronics and switching circuits. Edward Arnold Publication, London, 1979. [3]. Givant, S. and Halmos, P. Introduction to Boolean Algebra. Undergraduate Text in Mathematics, Sprinter Pub., 2009. [4]. Hill, J.F. and Peterson, G.R. Introduction to switching theory and logical design. John Wiley and Sons, New York, 1974. [5]. Patton, A. An introduction to digital logic. Macmillan Books, London, 1973. [6]. Mandll, M. Directory of electronics circuits with glossary of terms. Eaglewood Cliffs, New Jersey, 1978. [7]. Jaegar, R. C. Microelectronics circuit design. McGraw Hill. pp.226-233, 1997 [8]. Haykinl, S.S. Transistor circuits in electronics. Liffer Books, London, 1971.