sukhoimg
Junior Member level 1
- Joined
- Aug 24, 2012
- Messages
- 19
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,399
hello
i'am using a pic mcu to drive a 5x7 led matrix and a 4017 counter , but when i try to clock the 4017 i have an effect like a bouncing switch.
it's not stable and can't scan the rows when by one .
please help me.
here is the asm code that i"am using
LIST P=16F84A
#INCLUDE<P16F84A.INC>
CBLOCK 0X0C
TEMP:1
TEMP1:1
TEMP2:1
ENDC
ORG 0X00
GOTO INIT
ORG 0X05
INIT
CLRF PORTA
CLRF PORTB
BSF STATUS,5
CLRF TRISA
CLRF TRISB
BCF STATUS,5
START
BSF PORTA,2
CALL TEMPO
CALL TEMPO
CALL TEMPO
BCF PORTA,2
MOVLW B'01111111'
MOVWF PORTB
CLRF PORTB
BSF PORTA,2
CALL TEMPO
BCF PORTA,2
BSF PORTA,2
CALL TEMPO
BCF PORTA,2
BSF PORTA,2
CALL TEMPO
BCF PORTA,2
BSF PORTA,2
CALL TEMPO
BCF PORTA,2
BSF PORTA,3
CALL TEMPO
BCF PORTA,3
GOTO START
TEMPO
CLRF TEMP
CLRF TEMP1
BOUCLE
DECFSZ TEMP,f
GOTO BOUCLE
DECFSZ TEMP1,f
GOTO BOUCLE
RETURN
END
i'am using a pic mcu to drive a 5x7 led matrix and a 4017 counter , but when i try to clock the 4017 i have an effect like a bouncing switch.
it's not stable and can't scan the rows when by one .
please help me.
here is the asm code that i"am using
LIST P=16F84A
#INCLUDE<P16F84A.INC>
CBLOCK 0X0C
TEMP:1
TEMP1:1
TEMP2:1
ENDC
ORG 0X00
GOTO INIT
ORG 0X05
INIT
CLRF PORTA
CLRF PORTB
BSF STATUS,5
CLRF TRISA
CLRF TRISB
BCF STATUS,5
START
BSF PORTA,2
CALL TEMPO
CALL TEMPO
CALL TEMPO
BCF PORTA,2
MOVLW B'01111111'
MOVWF PORTB
CLRF PORTB
BSF PORTA,2
CALL TEMPO
BCF PORTA,2
BSF PORTA,2
CALL TEMPO
BCF PORTA,2
BSF PORTA,2
CALL TEMPO
BCF PORTA,2
BSF PORTA,2
CALL TEMPO
BCF PORTA,2
BSF PORTA,3
CALL TEMPO
BCF PORTA,3
GOTO START
TEMPO
CLRF TEMP
CLRF TEMP1
BOUCLE
DECFSZ TEMP,f
GOTO BOUCLE
DECFSZ TEMP1,f
GOTO BOUCLE
RETURN
END
Last edited: