TODOPIC
Microcontroladores PIC => Todo en microcontroladores PIC => Mensaje iniciado por: yamifr07 en 13 de Junio de 2006, 21:31:39
-
hola. necesito hacer con 2 displays a 7 segmentos multiplexados que vaya del 99 al 00.
se como hacer que vaya del 9 al 0 y se como hacer multiplexdo. pero no puedo unir eso.
tiene que ser en MPLAB.
ni siquiera lo puede empezar. por favor si me pueden ayudar. gracais
-
Hola Yamifr07:
En que lenguaje estas trabajando?
Te recomendaria que postearas el codigo de lo que tienes y se te podria ayudar mejor.
Saludos
-
bueno prueva este contador para ver como te va.
PROGRAMA DE CONTEO REGRESIVO DEL 99 HASTA 0
display de anodo comun
2 transistores 3904
colectares uno a cada comun de display
Emisor a 5vdc
base a salida del puertoa
SI NO TE MULTIPLEZA VARIA EL RETARDO HASTA QUE TE VEA BIEN.
suerte """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""";;;;;;;
LIST P=16F84A
#INCLUDE<P16F84A.INC>
REG1 EQU 23
REG2 EQU 24
REG3 EQU 25
decenas EQU 20
unidad equ 21
org 00
goto inicio
penate ADDWF PCL,1
RETLW B'11000000' ;0
RETLW B'11111001' ;1
RETLW B'10100100' 2
RETLW B'10110000' 3
RETLW B'10011001' 4
RETLW B'10010010' 5
RETLW B'10000010' 6
RETLW B'11111000' 7
RETLW B'10000000' 8
RETLW B'10011000' 9
return
inicio bsf status,5
movlw b'000000' ;para transistores
movwf porta
clrf portb
bcf status,5
clrf portb
coveñas
movlw .9
movwf decenas
fer movlw .9
movwf unidad
call ben
since decfsz unidad,1
goto sanmarc
call ben
decf decenas,1
movf decenas,0
xorwf .1,0
btfss status,2
goto fer
clrf decenas
movlw .9
movwf unidad
er decfsz unidad,1
goto etris
goto coveñas
etris call ben
goto er
sanmarc call benito
goto since
ben movf unidad,0
call penate
bcf porta,2
movwf portb
call retardo
bsf porta,2
movf decenas,0
call penate
bcf porta,3
movwf portb
call retardo
bsf porta,3
return
retardo MOVLW .9
MOVWF REG1
DEC3 MOVLW .9
MOVWF REG2
DEC2 MOVLW .5
MOVWF REG3
DEC1 DECFSZ REG3,1
GOTO DEC1
DECFSZ REG2,1
GOTO DEC2
DECFSZ REG1,1
GOTO DEC3
RETURN
end
BUENO SIMULAR HABER SI