electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

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


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> problem with counter using led matrix... why not light on?
Author Message
arni_jamal



Joined: 21 Jul 2005
Posts: 9


Post05 Apr 2006 3:10   

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


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)
Back to top
Google
AdSense
Google Adsense




Post05 Apr 2006 3:10   

Ads




Back to top
arni_jamal



Joined: 21 Jul 2005
Posts: 9


Post06 Apr 2006 10:10   

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


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


Sorry, but you need login in to view this attachment

Back to top
arni_jamal



Joined: 21 Jul 2005
Posts: 9


Post06 Apr 2006 10:16   

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
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> problem with counter using led matrix... why not light on?
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
LED MATRIX 16x40 - problem with a scrolling sentence (4)
Led dot matrix with 5mm led 100x100 (8)
New poster and promise not to beg - LED matrix mind scramble (1)
Mains LED light problem (7)
led dome light problem (2)
problem with describing a 4bit ripple counter using verilog (6)
8x8 LED Matrix using 8051 (4)
YOYO with LED light (6)
5x7 LED dot-matrix problem (1)
LED DOT MATRIX CURRENT PROBLEM?????? (2)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS