hola
como estan todos... pues bueno
hace como una semana me adentre en los muy adentros de los misterios de los pics y todas esas cosas
y ahora por fin he terminado mi primer proyecto en un pic jajaja
la verdad no se si logren entenderme pero pues es la primera vez y la primera vez en algo siempre te deja asi como que "a que fregon soy"
jjajaja
he terminado mi semaforo claro que con las conttribuciones de algunos compañeros de aqui
sobre todo a leonpic y a firepic
que me han ayudado en mucho la verdad
por fin ya quizo hacerse mi semaforito para lo cual quisiera hacer dicha contribucion...
el que baje de aqui no estaba como que completo y mal programado asi que lo he reacomodado y aqui lo veran
__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC
LIST P=16F84A
INCLUDE <P16F84A.INC>
RB0 EQU 0 ; ROJ0_1
RB1 EQU 1 ; AMARILLO_1
RB2 EQU 2 ; VERDE_1
RB3 EQU 3 ; CRUCE_1
RB4 EQU 4 ; ROJO_2
RB5 EQU 5 ; AMARILLO_2
RB6 EQU 6 ; VERDE_2
RB7 EQU 7 ; CRUCE_2
CONTAD EQU 10
CONTAD1 EQU 11
CONTAD2 EQU 12
BSF STATUS,5
CLRF TRISA
CLRF TRISB
BCF STATUS,5
INICIO
CLRF PORTA
CLRF PORTB
SEMA1
BSF PORTB,RB0 ; LUZ ROJA_1 ENCENDIDA
BSF PORTB,RB6 ; LUZ VERDE_2 ENCENDIDA
BSF PORTB,RB7 ; LUZ DE CRUCE_2 ENCENDIDA
CALL RETARDO
BCF PORTB,RB7 ; LUZ DE CRUCE_2 APAGADA
BSF PORTB,RB2 ; LUZ VERDE_1 ENCENDIDA
BCF PORTB,RB0 ; LUZ ROJA_1 APAGADA
CALL RETARDO
BCF PORTB,RB6 ; LUZ VERDE_2 APAGADA
CALL RETARDO2
BSF PORTB,RB6 ; LUZ VERDE_2 ENCENDIDA
CALL RETARDO2
BCF PORTB,RB6 ; LUZ VERDE_2 APAGADA
CALL RETARDO2
BSF PORTB,RB6 ; LUZ VERDE_2 ENCENDIDA
CALL RETARDO2
BCF PORTB,RB6 ; LUZ VERDE_2 APAGADA
CALL RETARDO2
BSF PORTB,RB6 ; LUZ VERDE_2 ENCENDIDA
CALL RETARDO2
BCF PORTB,RB6 ; LUZ VERDE_2 APAGADA
BSF PORTB,RB5 ; LUZ AMARILLA_2 ENCENDIDA
CALL RETARDO
BCF PORTB,RB5 ; LUZ AMARILLA_2 APAGADA
BSF PORTB,RB4 ; LUZ ROJA_2 ENCENDIDA
BSF PORTB,RB3 ; LUZ DE CRUCE_1 ENCENDIDA
CALL RETARDO
BCF PORTB,RB2 ; LUZ VERDE_1 APAGADA
BCF PORTB,RB3 ; LUZ DE CRUCE_1 APAGADA
CALL RETARDO2
BSF PORTB,RB2 ; LUZ VERDE_1 ENCENDIDA
BSF PORTB,RB3 ; LUZ DE CRUCE_1 ENCENDIDA
CALL RETARDO2
BCF PORTB,RB2 ; LUZ VERDE_1 APAGADA
BCF PORTB,RB3 ; LUZ DE CRUCE_1 APAGADA
CALL RETARDO2
BSF PORTB,RB2 ; LUZ VERDE_1 ENCENDIDA
BSF PORTB,RB3 ; LUZ DE CRUCE_1 ENCENDIDA
CALL RETARDO2
BCF PORTB,RB2 ; LUZ VERDE_1 APAGADA
BCF PORTB,RB3 ; LUZ DE CRUCE_1 APAGADA
CALL RETARDO2
BSF PORTB,RB2 ; LUZ VERDE_1 ENCENDIDA
BSF PORTB,RB3 ; LUZ DE CRUCE_1 ENCENDIDA
CALL RETARDO2
BCF PORTB,RB2 ; LUZ VERDE_1 APAGADA
BCF PORTB,RB3 ; LUZ DE CRUCE_1 APAGADA
BSF PORTB,RB1 ; LUZ AMARILLA_1 ENCENDIDA
CALL RETARDO2
BSF PORTB,RB0 ; LUZ ROJA_1 ENCENDIDA
BCF PORTB,RB1 ; LUZ AMARILLA_1 APAGADA
BCF PORTB,RB4 ; LUZ ROJA_2 APAGADA
BSF PORTB,RB6 ; LUZ VERDE_2 ENCENDIDA
BSF PORTB,RB7 ; LUZ DE CRUCE_2 ENCENDIDA
CALL RETARDO
BCF PORTB,RB7
GOTO INICIO
RETARDO
MOVLW D'50'
GOTO RETARDO_1DECIMA
RETARDO_1DECIMA
MOVWF CONTAD
RETARDO1EXT2
MOVLW D'100'
MOVWF CONTAD1
RETARDO1EXT
MOVLW D'249'
MOVWF CONTAD2
RETARDO1INT
DECFSZ CONTAD2,1
GOTO RETARDO1INT
DECFSZ CONTAD1,1
GOTO RETARDO1EXT
DECFSZ CONTAD,1
GOTO RETARDO1EXT2
RETURN
RETARDO2
MOVLW D'5'
GOTO RETARDO_1DECIMA
RETARDO_2DECIMA
MOVWF CONTAD
RETARDO2EXT2
MOVLW D'100'
MOVWF CONTAD1
RETARDO2EXT
MOVLW D'249'
MOVWF CONTAD2
RETARDO2INT
DECFSZ CONTAD2,1
GOTO RETARDO1INT
DECFSZ CONTAD1,1
GOTO RETARDO1EXT
DECFSZ CONTAD,1
GOTO RETARDO1EXT2
RETURN
END
jajaj algo simple pero sirve perfectamente... pruebenlo y si tienen algunas inovaciones me las hacen saber
otra vez muchas gracias por ayudarme con mi proyecto y pues a disfrutar ahora si de mis vacaciones jajaja
cuidence mucho y gracias =D