I had my piano program successfully work on PIC16F84A, but when i took the same program with the same wiring to another PIC(Pic16F877) on Proteus, the sound keeps cutting off in an annoying way. I don't know why. Same problem happened after i took it to PIC16F877A. I used assembly code,, some buttons and a speaker, along with their resistors etc.. please help? i tried to look for some hints but nothing seemed to tick.