Sei sulla pagina 1di 13

Polytechnic University of the Philippines

College of Engineering
Computer Engineering Department

15 x 7 LED Matrix Display using PIC16F84A

Project for
COEN 3394
(MICROPROCESSOR SYSTEM)

Submitted by:
Capistrano, Ephraim Joel
Esmalla, Jerwin Russell
Lat, Joseph
Lobaton, Kenneth

Submitted to:
Engr. Orlando V. Pajabera

On
October 19, 2016

I.

Introduction
A. Background
The project will display GOD IS GOOD ALL THE TIME. in a 15 x 7
LED matrix. The display will output from PIC 16F84A. The system used in
this project is the PIC16F84A which is an 18-pin microcontroller that has 13
I/O lines. The program will be encoded in the PICkit Debugger. A CMOS
decade counter was used since the I/O lines in the PIC is limited. Since the
PIC 16F84A has its limit that can only contain 13 I/O lines, CD 4017 is
utilized that can produce 10 output pins consecutively.
B. Definition of Terms
Peripheral interface Controller (PIC)
A type of microcontroller components that is used in the
development of electronics, computers, robotics and
similar devices.
PICkit
A kit used to program and debug microcontrollers, as well
as program EEPROM.
Light Emitting Diode (LED )
A two-lead semiconductor diode that glows when a
voltage is applied.
Transistors
A semiconductor device used to amplify or switch electronic
signals and electronic power.
Resistor
A passive electrical component that implements electrical
resistance as a circuit element. It is used to reduce the
current flow.
Capacitor
A passive electrical component used to temporarily store
electrical energy.
Voltage regulator
A voltage stabilizer that is design to automatically
stabilize a constant voltage level.

II.

Design Layout
Page | 2

A. Flowchart

B. Block Diagram

Page | 3

C. Schematic Diagram

III.

Project Specification
A. Program Listing
PROCESSOR
PIC16F84A
INCLUDE
<P16F84A.INC>
RADIX
HEX
CBLOCK
20h
;Capistrano, Ephraim Joel M.
;Esmalla, Jerwin Russell
;Lat, Joseph R.
;Lobaton, Kenneth M.
;******************** GOD IS GOOD ALL THE TIME
************************
DEL
C0
C1
C2
C3
Page | 4

C4
C5
C6
C7
C8
C9
C10
C11
C12
C13
C14
C15
C16
C17
C18
C19
DEL1
TEMP
TIME
ENDC
#DEFINE CLK1
CD4017
#DEFINE CLK2
CD4017
#DEFINE CLR
Second CD4017

PORTA,2 ; Connect Clock pin of First


PORTA,1; Connect Clock pin of Second
PORTA,0; Connect Reset pin of First and

ORG 0000h
BCF STATUS,RP0
GOTO
MAIN
RESET
BSF CLR
GOTO
$+.1
BCF CLR
RETURN
DELAY
MOVWF
PORTB
BCF CLK1
DECFSZ
DEL,1
GOTO
$-.1
CLRF
PORTB
BSF CLK1
RETURN
DELAY2

MOVWF

PORTB
Page | 5

BCF CLK2
DECFSZ
DEL,1
GOTO
$-.1
CLRF
PORTB
BSF CLK2
RETURN
;******** FIRST DISPLAY UNIT **************
SHOW
CALL
RESET
BSF CLK1
MOVF
C0,0
CALL DELAY
MOVF
C1,0
CALL DELAY
MOVF
C2,0
CALL DELAY
MOVF
C3,0
CALL DELAY
MOVF
C4,0
CALL DELAY
MOVF
C5,0
CALL DELAY
MOVF
C6,0
CALL DELAY
MOVF
C7,0
CALL DELAY
MOVF
C8,0
CALL DELAY
MOVF
C9,0
CALL RESET
;******** SECOND DISPLAY UNIT**************
BSF CLK2
MOVF
C10,0
CALL DELAY2
MOVF
C11,0
CALL DELAY2
MOVF
C12,0
CALL DELAY2
MOVF
C13,0
CALL DELAY2
MOVF
C14,0
CALL DELAY2
MOVF
C15,0
CALL DELAY2
Page | 6

MOVF
C16,0
CALL
DELAY2
MOVF
C17,0
CALL DELAY2
MOVF
C18,0
CALL DELAY2
CALL RESET
CLRF PORTB
RETURN
;********************
GOD IS GOOD ALL THE TIME
************************
TABLE ADDWF PCL,1
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 3Eh ;G
RETLW 41h
RETLW 49h
RETLW 49h
RETLW 2Eh
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 3Eh ;O
RETLW 41h
RETLW 41h
RETLW 41h
RETLW 3Eh
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 7Fh ;D
RETLW 41h
RETLW 41h
RETLW 41h
RETLW 3Eh
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 7Fh ;I
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 32h ;S
RETLW 49h
RETLW 49h
RETLW 49h
RETLW 26h
RETLW 00h ; BLANK

;Add W to Program Counter


LED
LED

LED
LED

LED
LED

LED
LEd
LED
LED

LED
Page | 7

RETLW 00h ; BLANK


RETLW 3Eh ;G
RETLW 41h
RETLW 49h
RETLW 49h
RETLW 2Eh
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 3Eh ;O
RETLW 41h
RETLW 41h
RETLW 41h
RETLW 3Eh
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 3Eh ;O
RETLW 41h
RETLW 41h
RETLW 41h
RETLW 3Eh
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 7Fh ;D
RETLW 41h
RETLW 41h
RETLW 41h
RETLW 3Eh
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 3Fh ;A
RETLW 48h
RETLW 48h
RETLW 48h
RETLW 3Fh
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 7Fh
;L
RETLW 01h
RETLW 01h
RETLW 01h
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 7Fh ;L
RETLW 01h
RETLW 01h
RETLW 01h

LED

LED
LED

LED
LED

LED
LED

LED
LED

LED
LED

LED
LED

Page | 8

RETLW 00h ; BLANK


RETLW 00h ; BLANK
RETLW 40h ;T
RETLW 40h
RETLW 7Fh
RETLW 40h
RETLW 40h
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 7Fh ;H
RETLW 08h
RETLW 08h
RETLW 08h
RETLW 7Fh
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 7Fh ;E
RETLW 49h
RETLW 49h
RETLW 41h
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 40h ;T
RETLW 40h
RETLW 7Fh
RETLW 40h
RETLW 40h
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 7Fh ;I
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 3Fh ;M
RETLW 40h
RETLW 40h
RETLW 3Fh
RETLW 40h
RETLW 40h
RETLW 3Fh
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 7Fh
;E
RETLW 49h
RETLW 49h
RETLW 41h
RETLW 00h ; BLANK

LED
LED

LED
LED

LED
LED

LED
LED

LED
LED
LED
LED

LED
LED

LED
Page | 9

RETLW 00h ; BLANK


RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 00h ; BLANK
RETLW 0FFh
RETURN
;**********************
MOVE

LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED
LED

MOVE

********************

MOVF
C1,0
MOVWF
C19
MOVF
C2,0
MOVWF
C1
MOVF
C3,0
MOVWF
C2
MOVF
C4,0
MOVWF
C3
MOVF
C5,0
MOVWF
C4
MOVF
C6,0
MOVWF
C5
MOVF
C7,0
MOVWF
C6
MOVF
C8,0
MOVWF
C7
MOVF
C9,0
MOVWF
C8
MOVF
C10,0
MOVWF
C9
MOVF
C11,0
MOVWF
C10
MOVF
C12,0
MOVWF
C11
MOVF
C13,0
MOVWF
C12
Page | 10

MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
MOVF
MOVWF
RETURN

C14,0
C13
C15,0
C14
C16,0
C15
C17,0
C16
C18,0
C17
C19,0
C18

REGISTER MOVLW
20H
MOVWF
FSR
CLRF INDF
INCF FSR,1
MOVF
FSR,0
BCF STATUS,Z
XORLW
50H
BTFSS STATUS,Z
GOTO
$-.6
RETURN
MAIN
BSF STATUS,RP0;B1
CLRF TRISB
CLRF TRISA
BCF STATUS,RP0
CALL REGISTER
RUN
CALL MOVE
INCF TEMP,1
MOVF
TEMP,0
CALL TABLE
MOVWF
C10
XORLW
0FFH
BTFSC
STATUS,Z
GOTO
REGISTER
MOVLW .10
MOVWF
DEL1
CALL
SHOW
DECFSZ
DEL1,1
GOTO
$-.2
Page | 11

GOTO RUN
ORG 2007H
DATA
3FF1H
GOTO
MAIN
END
B. Technical Devices
PIC16F84A
An 8 bit microcontroller that is capable of processing only
8-bits at a time.
CD 4017
A 16 pin CMOS decade counter/divider. It takes clock
signal from the clock input and turns on the 10 output in
sequence, each time when it receives clock input pulses
BC547
A NPN bi-polar junction transistor. A transistor, stands for
transfer of resistance, is commonly used to amplify
current
C. Project Costs
Materials
PIC 16F84A
BC547 Transistor
CD 4017
Universal PCB
Capacitor
LED
Toggle Switch
Resistors
Soldering Lead
Oscillator
7805 IC

Unit Price
Quantity
Php 150.00
1 pc
Php 5.00
15 pcs
Php 12.00
2 pcs
Php 50.00
1 pc
Php 1.00
2 pcs
Php 1.00
105 pcs
Php 17.00
1 pc
Php 00.25
15 pcs
Php 12.00
1 pc
Php 20.00
1 pc
Php 15.00
1 pc
TOTAL
D. Members Profile
See at the end of the document

IV.

Price
Php 150.00
Php 75.00
Php 24.00
Php 50.00
Php 2.00
Php 105.00
Php 17.00
Php 3.75
Php 12
Php 20.00
Php 15.00
473.75

Conclusion and Recommendation


A. Conclusion
PIC16F84 is easily interfaced with electronic component such as
LEDs, by this, we can create an LED matrix and manipulating
the lights to produce characters based on the program.
Page | 12

V.

PIC is also cheap and reduces the amount of space needed to


create a LED matrix.
It has limited memory and capability
B. Recommendation
To improve the characters movement by adjusting their own
delay time
To incorporate PIC with other embedded system such as robots,
control systems and such
Users Manual
A. Provide a 9v power supply.
B. Connect the power source to the prototype.
C. Switch on the prototype to work.
D. Press the button to reset the program.
E. Switch off the prototype to stop.

Page | 13

Potrebbero piacerti anche