14_PROVA ;Tastiera Musicale List P=PIC16F887 Include "p16F887.inc" ERRORLEVEL -302 __config 0x2007, 0x20E4 ;0010 0000 1110 0100 __config 0x2008, 0x3EFF ;0011 1110 1111 1111 CONTATORE SEMIPERIODO COUNT_L COUNT_H ORG EQU EQU EQU EQU 0X20 0X21 0X22 0X23 00 BSF MOVLW MOVWF MOVLW MOVWF BCF STATUS, RP0 0X61 OSCCON B'11111110' PORTC STATUS, RP0 BEGIN BTFSS CALL BTFSS CALL BTFSS CALL BTFSS CALL BTFSS CALL BTFSS CALL BTFSS CALL GOTO PORTC, 1 DO_3 PORTC, 2 RE PORTC, 3 MI PORTC, 4 FA PORTC, 5 SOL PORTC, 6 LA PORTC, 7 SI BEGIN DO_3 MOVLW d'191' MOVWF SEMIPERIODO CALL GENERATORE RETURN RE MOVLW d'170' MOVWF SEMIPERIODO CALL GENERATORE RETURN 1agina p 14_PROVA MI MOVLW d'152' MOVWF SEMIPERIODO CALL GENERATORE RETURN FA MOVLW d'143' MOVWF SEMIPERIODO CALL GENERATORE RETURN SOL MOVLW d'128' MOVWF SEMIPERIODO CALL GENERATORE RETURN LA MOVLW d'114' MOVWF SEMIPERIODO CALL GENERATORE RETURN SI MOVLW d'101' MOVWF SEMIPERIODO CALL GENERATORE RETURN GENERATORE LOOP NOP BSF CALL BCF CALL RETURN DELAY MOVF MOVWF MOVLW MOVWF DECFSZ GOTO DECFSZ GOTO RETURN LOOP1 LOOP2 PORTC, 0 DELAY PORTC, 0 DELAY SEMIPERIODO, 0 COUNT_L 2 COUNT_H COUNT_H, 1 LOOP2 COUNT_L, 1 LOOP1 END 2agina p