Mehmet SARI
Published © Apache-2.0

Buzz Wire Game (Tel Oyunu)

A small PIC16F84A app to spend time at home during COVID-19 outbreak days.

BeginnerFull instructions provided2 hours86
Buzz Wire Game (Tel Oyunu)

Things used in this project

Hardware components

PIC16F
Microchip PIC16F
×1

Story

Read more

Schematics

circuit

proteus

Code

Code

CSS
picbasicpro code
TRISA=%01000
TRISB=%00000000

SYMBOL GIR=PORTA.3
SYMBOL SIREN=PORTA.2
SYMBOL LEDR=PORTB.7
DEGER VAR BYTE
DEGER=0

PORTA=%00000
PORTB=%00111111
PAUSE 200  

BASLA:         
    IF GIR=1 THEN goto AKTIF
    PAUSE 50
    IF GIR=0 THEN GOTO PASIF          

    AKTIF:    
            SOUND SIREN,[100,4]       
            DEGER=DEGER+1        
            PAUSE 50
                  
            IF DEGER=1 THEN 
                PORTB=%10110000
                PAUSE 50
                PORTB=%00110000
            ENDIF
            IF DEGER=2 THEN 
                PORTB=%11101101
                PAUSE 50
                PORTB=%01101101
            ENDIF
            IF DEGER=3 THEN 
                PORTB=%11111001
                PAUSE 50
                PORTB=%01111001
            ENDIF
            IF DEGER=4 THEN 
                PORTB=%11110010  
                PAUSE 50
                PORTB=%01110010 
            ENDIF
            IF DEGER=5 THEN 
                PORTB=%11011011
                PAUSE 50
                PORTB=%01011011
            ENDIF                 
            IF DEGER=6 THEN
                 PORTB=%00111111
                 DEGER=0
            ENDIF  
         
    GOTO BASLA
    
    PASIF:
        LOW SIREN
    
    GOTO BASLA


END

Credits

Mehmet SARI

Mehmet SARI

9 projects • 16 followers
i am a electronic teacher

Comments