Keyboard Controlled Scoreboard

Similar documents
Lecture 14: Computer Peripherals

Chapter 9 MSI Logic Circuits

ECE 372 Microcontroller Design

Experiment # 9. Clock generator circuits & Counters. Digital Design LAB

TV Synchronism Generation with PIC Microcontroller

Digital Clock. Perry Andrews. A Project By. Based on the PIC16F84A Micro controller. Revision C

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

Contents Circuits... 1

Sequential Digital Design. Laboratory Manual. Experiment #7. Counters

0 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 1 1 Stop bits. 11-bit Serial Data format

ADC Peripheral in Microcontrollers. Petr Cesak, Jan Fischer, Jaroslav Roztocil

Data Conversion and Lab (17.368) Fall Lecture Outline

Radio Clock with DCF77

UNIVERSITI TEKNOLOGI MALAYSIA

Digital Fundamentals: A Systems Approach

Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li

Registers and Counters

INTERNATIONAL JOURNAL OF ELECTRONICS AND COMMUNICATION ENGINEERING & TECHNOLOGY (IJECET) APPLIANCE SWITCHING USING EYE MOVEMENT FOR PARALYZED PEOPLE

EDUCATIONAL TUTOR FOR MENTALLY DISABLE STUDENTS

Logic Design. Flip Flops, Registers and Counters

Experiment 8 Introduction to Latches and Flip-Flops and registers

PHYS 3322 Modern Laboratory Methods I Digital Devices

Asynchronous (Ripple) Counters

Laboratory 8. Digital Circuits - Counter and LED Display

Registers and Counters

Design and Implementation of Timer, GPIO, and 7-segment Peripherals

Model Solution and marking scheme for Examination Paper EEE305J1: Microcontroller Systems 2004/5 General Observations

Design of VGA Controller using VHDL for LCD Display using FPGA

EKT 121/4 ELEKTRONIK DIGIT 1

MUHAMMAD NAEEM LATIF MCS 3 RD SEMESTER KHANEWAL

LED Array Board.

Laboratory Exercise 4

Digital (5hz to 500 Khz) Frequency-Meter

Operating Manual Ver.1.1

Digital IC Tester by Using PIC18F4550

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science SOLUTIONS

7 SEGMENT LED DISPLAY KIT

CHAPTER1: Digital Logic Circuits

Operating Manual Ver.1.1

TV Character Generator

4.3inch 480x272 Touch LCD (B) User Manual

Logic Design Viva Question Bank Compiled By Channveer Patil

Computer Systems Architecture

Design and Simulation of a Digital CMOS Synchronous 4-bit Up-Counter with Set and Reset

BISHOP ANSTEY HIGH SCHOOL & TRINITY COLLEGE EAST SIXTH FORM CXC CAPE PHYSICS, UNIT 2 Ms. S. S. CALBIO NOTES lesson #39

Digital Stopwatch Timer Circuit Using 555timer and CD4033

Spring 2011 Microprocessors B Course Project (30% of your course Grade)

International Journal of scientific research and management (IJSRM) Volume 1 Issue 6 Pages Website: ISSN (e):

Today 3/8/11 Lecture 8 Sequential Logic, Clocks, and Displays

Embedded System Training Module ABLab Solutions

ECE 263 Digital Systems, Fall 2015

NS8050U MICROWIRE PLUSTM Interface

Design and analysis of microcontroller system using AMBA- Lite bus

ECB DIGITAL ELECTRONICS PROJECT BASED LEARNING PROJECT REPORT ON 7 SEGMENT DIGITAL STOP WATCH USING DECODER

Data Sheet. Electronic displays

Logic. Andrew Mark Allen March 4, 2012

CSE Latches and Flip-flops Dr. Izadi. NOR gate property: A B Z Cross coupled NOR gates: S M S R Q M

IT T35 Digital system desigm y - ii /s - iii

Universal Asynchronous Receiver- Transmitter (UART)

INC 253 Digital and electronics laboratory I

Counters

TSIU03, SYSTEM DESIGN. How to Describe a HW Circuit

Published in A R DIGITECH

Digital Fundamentals. Lab 5 Latches & Flip-Flops CETT Name: Date:

Computer Architecture Basic Computer Organization and Design

Laboratory 11. Required Components: Objectives. Introduction. Digital Displays and Logic (modified from lab text by Alciatore)

TRAINING KITS ON DIGITAL ELECTRONIC EXPERIMENTS. Verify Truth table for TTL IC s AND, NOT, & NAND GATES

Task 4_B. Decoder for DCF-77 Radio Clock Receiver

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

MODULAR DIGITAL ELECTRONICS TRAINING SYSTEM

Lecture 12. Amirali Baniasadi

NORTHWESTERN UNIVERSITY TECHNOLOGICAL INSTITUTE

MODULE 3. Combinational & Sequential logic

Combo Board.

Electronic Grocery Machine

LSN 12 Shift Registers

16 * 16LED Dot Matrix Display

Sequential circuits. Same input can produce different output. Logic circuit. William Sandqvist

Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit)

EXPERIMENT 2: Elementary Input Output Programming

Microcontrollers and Interfacing week 7 exercises

Prototype Model of Li-Fi Technology using Visible Light Communication

ELCT201: DIGITAL LOGIC DESIGN

Serial Peripheral Interface

UNIT V 8051 Microcontroller based Systems Design

C-MAX. CMM-9301-V3.1S Bluetooth 4.0 Single Mode HCI Module. Description. 1.1 Features

Christmas LED Snowflake Project

Modeling Digital Systems with Verilog

ME 515 Mechatronics. Introduction to Digital Electronics

DRAFT Microprocessors B Lab 3 Spring PIC24 Inter-Integrated Circuit (I 2 C)

This document describes a program for 7-segment LED display (dynamic lighting) and key matrix and input.

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

Introduction to Sequential Circuits

AbhijeetKhandale. H R Bhagyalakshmi

Chapter 3: Sequential Logic Systems

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

Embedded Systems Lab. Dynamic Traffic and Street Lights Controller with Non-Motorized User Detection

Counter dan Register

Decade Counters Mod-5 counter: Decade Counter:

Transcription:

Universities Research Journal 2011, Vol. 4, No. 4 Keyboard Controlled Scoreboard Kyaw Hlaing 1 and Win Swe 2 Abstract The objective of this research work is to design a keyboard controlled scoreboard that is easy to use, portable, and cost effective. Both hardware and software have been designed for the keyboard controlled scoreboard. All program source codes are written by assembly language. PIC16F84A and PIC16F877A microcontrollers are used as control devices in data transmitting circuit and data receiving circuit of this research work. The display screen is composed of 8 8 dot-matrix modules and 7- segment displays. The size of one character in 8 8 dot-matrix modules is 12 cm length and 7.5 cm breadth. Each module can display one character. Four modules are cascaded to display the name of team and two modules are cascaded to display the scores. 7-segment displays are used for showing time. The last two digits show minutes and the first digit shows hour. Key words: PIC16F84A, PIC16F877A, 8 8 dot-matrix modules Introduction A scoreboard is a device that allows spectators and players to be able to know the score at every point in the game. This is critical to competition as teams usually strategize their game play based on key factors related to the information displayed on the scoreboard. In order for this information to be current and easily updateable it is best that the scoreboard be remote controlled. The infrared radiation technique is used between the keyboard data transmitter and scoreboard. Keyboard is connected to the input pin of PIC16F84A so that keyboard data is transmitted via an infrared LED that is under the control of PIC16F84A. Synchronous serial communication is used between keyboard and PIC16F84A. A software development is also implemented for keyboard data receiving, keyboard data transmitting and data receiving from keyboard data transmitter. Block diagram of developed keyboard controlled scoreboard system is shown in Fig. 1. 1. Assistant Lecturer, Department of Physics, University of Mandalay 2. Associate Professor, Department of Physics, University of Mandalay

132 Universities Research Journal 2011, Vol. 4, No. 4 Fig.1. Block diagram of keyboard controlled scoreboard Hardware Design In the Hardware Design, there are six units. They are Keyboard Data Receiving, and Transmitting Unit, Main Control Unit, Horizontal Scanning Unit, Timer Display Unit and Display Unit. Keyboard Data Receiving and Transmitting Unit This unit generates the modulated pulses for main control unit and receives the synchronous data of PS/2 keyboard. It consists of three main parts infrared LED, C1383 n-p-n transistor and PIC16F84A microcontroller. The 40 khz modulated signal energizes the infrared LED is connected with emitter of C1383. The specified numbers of modulated pulses are transmitted each time via an infrared LED under control of PIC16F84A microcontroller. The two transistors (C1383) are connected as Darlington connection (Horowitz, P. and Winfield, H.) because infrared LED is required large amount of current. Therefore, the result behaves like a single transistor with beta equal to the product of the two transistors beta. Circuit diagram of infrared transmitter unit is shown in Fig. 2.

Universities Research Journal 2011, Vol. 4, No. 4 133 +5 V Keyboard clock line Keyboard data line C1383 C1383 4.7 K 330 O 1 18 2 17 3 16 4 15 5 14 6 13 7 12 8 11 9 PIC16F84A 22pF 20 MHz 22pF Fig.2. Circuit diagram of infrared transmitter unit Main Control Unit This is the main control part of the system, which receives infrared signal from the transmitter unit, scans the data to display the character and transmits specified data to the data receiving and scanning unit. This unit performs the required mathematical operations and also generates the pulses for horizontal scanning unit and timer display unit. The infrared signal is detected by infrared receiver. Four infrared receiver are used for detect the infrared signal from every site. The control device of this unit is the PIC16F877A microcontroller manufactured by Microchip Inc. Circuit diagram of main control unit is shown in Fig.3.

134 Universities Research Journal 2011, Vol. 4, No. 4 +11V Output result of IR receiver unit C9013 all 22 pf 33 2 3 11 4 22 pf 12 15 PIC 16F877A 16 17 18 23 24 39 25 40 26 HCF017BE R Q1 CLK Q2 EN Q3 Q9 Q4 Q5 Q6 Q7 Q8 I1 I2 I3 I4 I5 I6 I7 I8 ULN2803A O1 O2 O3 O4 O5 O6 O7 O8 Fig.3. Circuit diagram of main control unit

Universities Research Journal 2011, Vol. 4, No. 4 135 Horizontal Scanning Unit The main function of this unit is horizontal scanning for the display system. It consists of three main parts HCF4017BE, ULN2803APG and two input HCF4081BP ICs. For four characters scanning, four numbers of HCF4017BE, four numbers of ULN2803APG and HCF4081BP ICs are used. The outputs of HCF4017BE are connected to the inputs of ULN2803APG. The ULN2893 outputs are connected with 8 8 dot-matrix display. HCF4081BP IC is used for the serial clock input of three HCF4017BE ICs. Circuit diagram of horizontal scanning unit is shown in Fig.4. Fig.4. Circuit diagram of horizontal scanning unit for one team

136 Universities Research Journal 2011, Vol. 4, No. 4 Timer Display Unit The main function of this unit is to display the playing time of the game. It consists of three main parts, SN74LS90 Decade counter, HFE4543B BCD to 7-segment driver, HCF4081BP 2-input AND gate. The clock and reset pin of SN74LS90 decade counter is connected with pin number 3 and pin number 4 of portb of PIC16F877A. PIC16F877A controls decade counter to display the playing time of the game. Then decade counter generates binary code to HFE4543B. Then HFE4543B generate 7-segment display pattern code that will be appearing on the 7- segment display. Display Unit It consists of two 32 8 dot-matrix displays and two 16 8 dot-matrix displays. The first will be used to show the teams in the game. The second will be used to show the marks of the team. Dot-matrix displays are constructed as 8 8 dot-matrix modules. Each module contains 64 pixels. Each pixel has four LEDs. The photograph of 8 8 dot-matrix module is shown in Fig.5. The wire connection of 8 8 dot-matrix module is shown in Fig.6. It also contains 7-segment display to show the playing time of the teams. Fig.5. The photograph of 8 8 dot-matrix module (Front and back view)

Universities Research Journal 2011, Vol. 4, No. 4 137 Fig.6. The wire connection of 8 8 dot-matrix module Software Implementation There are two main programmes in the software implementation. The first program consists of keyboard data receiving program and data transmitting subroutine. The second program receives 40 khz modulated IR signal and controls the output data for the display unit. For keyboard data receiving programmes, the control device is PIC16F84A. The assembly language is used to program PIC16F84A to receive data. The clock and data lines of keyboard are connected to the input pins (RA0 and RA1) of PIC16F84A. For the keyboard data input currently update, interrupt feature of PIC is used. PIC16F84A receives keyboard scan code and transform receive scan code to transmit code. Then PIC16F84A generates 40 khz modulated clock pulse via an IR LED. Flowchart of keyboard data receiving program is shown in Fig.7 and Flowchart of data transmitting subroutine is shown in Fig. 8.

138 Universities Research Journal 2011, Vol. 4, No. 4 Fig.7. Flowchart of keyboard data receiving program

Universities Research Journal 2011, Vol. 4, No. 4 139 1 Is CLK = 1? No Yes Yes Is CLK = 1 No Exclusive OR with data and parity, AND with 1 Is CLK = 1? Yes No Is CLK =1? Yes No No Check parity error Go to start No Yes Is the receive data =0xF0? Yes Transmit keyboard data End Fig.7. Flowchart of keyboard data receiving program (Continued)

140 Universities Research Journal 2011, Vol. 4, No. 4 In the second programme, PIC16F877A receives 40 khz modulated clock pulse via an IR receiver. The output of IR receiver is connected with the input pin (RB0) of PIC16F877A microcontroller. PIC16F877A classifies binary-1 or binary-0 according to the incoming pulse numbers. The binary-1 state is composed of 40 pulses of 40 khz modulated clock pulse. The binary-0 state is composed of pulses of 40 khz modulated clock pulse (Smitch, D.W.). According to the input data information, PIC16F877A determine character or number. Then PIC16F877A displays received information on the display screen. PIC16F877 A also determines the time during of the game from start and display the corresponding time on the 7-segment displays.

Universities Research Journal 2011, Vol. 4, No. 4 141 Fig.8. Flow chart of main control function Results and Discussion The keyboard controlled scoreboard is constructed using peripheral interface controller. The data communication between PIC16F84A and PIC16F877A is asynchronous serial communication. The output current of

142 Universities Research Journal 2011, Vol. 4, No. 4 microcontroller is not enough to transmit infrared single for a distance of 1 m. To solve this problem, Darlington connection is used. Using Darlington connection, the infrared signal can reach about 12 m. There are many illumination sources, such as fluorescent lamps or sunlight can introduce light noise that can interfere with proper data reception. To overcome this problem, it is arranged in such a way that keyboard data transmitter transmits three start bits and eight data bits. In the receiver unit, the control program exits the interrupt subroutine if the three start bit is incorrect. If the infrared receiver receives error signal, the controller is said to be ready for next infrared signal. The microcontroller does not provide the scanning for the error signal. In the data receiving system, the binary-1 state and binary-0 state are classified by the period of the low state. The active time of binary-1 state is 1 ms and binary-0 state is 0.25 ms. There is a relax time between every two data bits. So the incoming data is identical with the data format of this system. Otherwise the data receiving system does not accept the incoming data for scanning process. So other infrared transmitters cannot easily control the display system of this keyboard controlled scoreboard. The photographs of display form and internal circuit diagram of the system are shown in Fig.9 and Fig. respectively. Fig.9. The photograph of display form of the system

Universities Research Journal 2011, Vol. 4, No. 4 143 Fig.. The photograph of internal circuit diagram of constructed system Conclusion A keyboard controlled scoreboard has been designed and constructed. In the display system, the microcontroller PIC16F877A is used as a control device. The microcontroller is scanning characters on the 8 8 LED dot-matrix display screen. Generally, one microcontroller is scanning four characters. So, the duty cycle of one LED is 5 percent. Therefore, the brightness of the LED is reduced. To avoid this problem, the number of scanning characters must be reduced. Otherwise the many microcontrollers are to be used for scanning process. The display of scoreboard can be seen clearly when the bright light of site is 150 Lm. The bright light of ordinary room is between 138 Lm and 150 Lm. Therefore this scoreboard is suitable for indoor games. If this scoreboard will be used for outdoor games, the display LEDs should be replaced with super bright LEDs.

144 Universities Research Journal 2011, Vol. 4, No. 4 Acknowledgements The authors would like to thank Professor Dr Khin Swe Myint, Rector, University of Mandalay, for her encouragement. We are also grateful to Professor Dr Daw Yin Mya, Head of Department, Department of Physics, University of Mandalay. References Horowitz, P. and Winfield, H. (2006). The Art of Electronics, Cambridge University Press, United Kingdom. Smitch, D.W. (2006). PIC in Practice, Second Edition, Cepha Imaging Pvt Ltd, India.