Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

problem with counter using led matrix... why not light on?

Status
Not open for further replies.

arni_jamal

Newbie level 5
Joined
Jul 21, 2005
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,419
hello everybody.. i've got a problem here where i can't see the display on my led matrix..

i'm doing a counter and using the led matrix as a display. i've writing a program using assembly languange.

i also checking the voltage between each ic and each output.. the voltage showed around 4~5V but the led matrix still don't light on..

i hope u people will help me troubleshooting my project.. i cant identify the problem..

electronic component i use:

pic16f84a
multiplexer 74LS154 (4-to-16 bit)
transistor 2n222
two 8x8 led matrix (but use only 5x7)
limit switch for input at port 7 (pin 13)
reset switch for reset at MCLR (pin 4)
 

Re: problem with counter using led matrix... why not light o

and here is my circuit.. i am using the proteus...
 

Re: problem with counter using led matrix... why not light o

;===========================================================================
; CRATE ON: 05 FEB 2006
; COMPLETE ON 06-FEB-2006
; DESCRIPTION:--
; THIS PROGRAME IS USE FOR TWO DIGIT COUNTER USING DOTMATRIK DISPLAY
; PORTA CONNECTED TO KATOD OF THE DOT MATRIK DISPLAY
; PORTB 7 CONNECTED TO THE LIMIT SWITCH (COUNTING)
; PORTB(0...6) CONNECTED TO ANODE OF THE DOT MATRIK DISPLAY
;===========================================================================

; DEFINITION
;============
list P=PIC16f84, R=D
include "P16f84.INC"

; REGISTER USAGE
;================
temp1 equ 0Ch
temp2 equ 0Dh
count1 equ 0Eh
count2 equ 0Fh ; hold the character sequence
flags equ 10h
togl equ 0
prsd equ 1

; VECTOR
;========
org 0000h
goto start
org 0008h
;===============================
;DOT MATRIK DECODER
;====================

colm1 addwf PCL,f
retlw b'00111110' ;0
retlw b'00000000' ;1
retlw b'00110001' ;2
retlw b'00100010' ;3
retlw b'00001100' ;4
retlw b'01110010' ;5
retlw b'00111110' ;6
retlw b'01000000' ;7
retlw b'00110110' ;8
retlw b'00110010' ;9

colm2 addwf PCL,f
retlw b'01000001' ;0
retlw b'00100001' ;1
retlw b'01000011' ;2
retlw b'01000001' ;3
retlw b'00010100' ;4
retlw b'01010001' ;5
retlw b'01001001' ;6
retlw b'01000001' ;7
retlw b'01001001' ;8
retlw b'01001001' ;9

colm3 addwf PCL,f
retlw b'01000001' ;0
retlw b'01111111' ;1
retlw b'01000101' ;2
retlw b'01001001' ;3
retlw b'00100100' ;4
retlw b'01010001' ;5
retlw b'01001001' ;6
retlw b'01000110' ;7
retlw b'01001001' ;8
retlw b'01001001' ;9

colm4 addwf PCL,f
retlw b'01000001' ;0
retlw b'00000001' ;1
retlw b'01001001' ;2
retlw b'01001001' ;3
retlw b'01111111' ;4
retlw b'01010001' ;5
retlw b'01001001' ;6
retlw b'01011000' ;7
retlw b'01001001' ;8
retlw b'01001001' ;9

colm5 addwf PCL,f
retlw b'00111110' ;0
retlw b'00000000' ;1
retlw b'00110001' ;2
retlw b'00110110' ;3
retlw b'00000100' ;4
retlw b'01001110' ;5
retlw b'00100110' ;6
retlw b'01100000' ;7
retlw b'00110110' ;8
retlw b'00111110' ;9


;==============================================

disp1 movfw count1 ; get the NUMBER
call colm1
movwf PORTB ; display colm for the NUMBER
movlw b'0010' ; enable colm
movwf PORTA
movlw h'01' ; delay for 1ms
call delay

movfw count1
call colm2
movwf PORTB
movlw b'0011'
movwf PORTA
movlw h'01'
call delay

movfw count1
call colm3
movwf PORTB
movlw b'0100'
movwf PORTA
movlw h'01'
call delay

movfw count1
call colm4
movwf PORTB
movlw b'0101'
movwf PORTA
movlw h'01'
call delay

movfw count1
call colm5
movwf PORTB
movlw b'0110'
movwf PORTA
movlw h'01'
call delay

return


disp2 movfw count2 ; get the NUMBER
call colm1
movwf PORTB ; display colm for the NUMBER
movlw b'01001' ; enable colm
movwf PORTA
movlw h'01' ; delay for 1ms
call delay

movfw count2
call colm2
movwf PORTB
movlw b'01010'
movwf PORTA
movlw h'01'
call delay

movfw count2
call colm3
movwf PORTB
movlw b'01011'
movwf PORTA
movlw h'01'
call delay

movfw count2
call colm4
movwf PORTB
movlw b'01100'
movwf PORTA
movlw h'01'
call delay

movfw count2
call colm5
movwf PORTB
movlw b'01101'
movwf PORTA
movlw h'01'
call delay
return



;=======================
; TIME WASTE FOR W ms
;=======================
delay movwf temp2
onems movlw 248
movwf temp1
dly nop
decfsz temp1
goto dly
nop
decfsz temp2
goto onems
return

; INITIALIZATION
;===============

start bsf STATUS,RP0
movlw b'00000' ;set all PORTA as output
movwf TRISA
movlw b'10000000' ;set all PORTB as output
movwf TRISB
bcf STATUS,RP0
clrf count1
clrf count2
clrf flags

;===============
; MAIN PROGRAM
;===============

main btfsc PORTB,7
goto hi
movlw 2
call delay
btfsc PORTB,7
goto disp
btfsc flags,prsd
goto disp
bsf flags,prsd
incf count1,f
goto disp

hi movlw 2
call delay
btfsc PORTB,7
bcf flags,prsd

disp movlw 10
subwf count1,0
btfsc STATUS,Z
goto node1
call disp1
call disp2
goto main

node1 clrf count1
incf count2
movlw 10
subwf count2,0
btfsc STATUS,Z
clrf count2
call disp1
call disp2
goto main

end
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top