Device 16F628A ; Processor type
Config INTRC_OSC_NOCLKOUT, WDT_OFF, PWRTE_ON, LVP_OFF, MCLRE_OFF
Xtal 4
All_Digital true ; Alle poorten digitaal
Symbol PIN = PORTB.0 ; Sound - pin
Symbol S1 = PORTA.0 ; Schakelaar
Symbol R = 0
Symbol C = 82
Symbol Db0 = 85
Symbol D = 87
Symbol Eb = 89
Symbol E = 92
Symbol F = 94
Symbol Gb = 95
Symbol G = 97
Symbol Ab1 = 99
Symbol A1 = 73
Symbol Bb1 = 76
Symbol BE1 = 79
Symbol C1 = 82
Symbol Db1 = 85
Symbol D1 = 87
Symbol Eb1 = 89
Symbol E1 = 92
Symbol F1 = 94
Symbol Gb1 = 95
Symbol G1 = 97
Symbol Ab2 = 99
Symbol A2 = 101
Symbol Bb2 = 102
Symbol BE2 = 104
Symbol C2 = 105
Symbol D2 = 108
Symbol E2 = 110
Symbol F2 = 111
Symbol Gb2 = 112
Symbol G2 = 113
Symbol Bm3 = 116
Symbol C3 = 117
Symbol D3 = 118
PORTA = %000000 ; Maak poort A laag
TRISA = %111111 ; Poort_A I/O
PORTB = %000000 ; Maak poort B laag
TRISB = %000000
START:
If S1 = 1 Then Sound PIN,[G,80,D2,80,C2,20,BE2,20,A2,20,G2,80,D2,80,C2,20,BE2,20,A2,20,G2,80,D2,80,C2,20,BE2,20,C2,20,A2,80]
GoTo START
End