What do you mean locks up the program? Does the PIC stop working? Or does it stay on one tone? First, I don't see that you __CONFIG your PIC, so you are not switching your Watchdog timer off and set your oscilator type (unless you do it in another way). What seems strange to me is the way you do your delay routines: movlw 0xf6 ; movwf dlay1 ; movlw 0x03 ; movwf dlay2 ; call DLAY ; DLAY decfsz dlay1, f ; goto DLAY ; decfsz dlay2, f ; goto DLAY ; return The first time you decfsz dlay1 you decrease from 0x0f6 to 0x0. Then you decfsz dlay2 once and goto back to decfsz dlay1, which will now decrease from 0x0 to 0x0ff and then loop back to decrease dlay1 until 0x0 and then decrease dlay2 again once. Is this the way you wanted it to work? Doing it this way there is not much difference in delay between tone 2 and 3 (few hunderd microsecs or so). You do the same with ctr3 and ctr4. Tone 3 also has no value for ctr4. Quentin -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads