>How do you know it is running?=20 I know it is running because when i put a 1 on that pin it plays the=20 squarewave (i connected the outputof to my bass amplifier), but only as lon= g=20 as i keep that 1 on the pin.=20 >All inputs should be tied either up, down or to a signal. The power supply= =20 should be=20 >bypassed at the chip.=20 Then, maybe we found the problem. Not every pin of PORTB is pulled down, i= =20 left some floating. I don't have enough resistors right now, so i will try= =20 to set only the first bit of PORTB as input and the rest as outputs, and=20 pull down that bit, and report as soon as possible. How does this thing=20 work? (ie. why floating input pins make the pic reset?). And does the secon= d=20 thing (power supply bypassed at the chip) mean that i have to put a=20 capacitor between power and ground?=20 for jan-erik: sorry, i'm really a beginner and don't know much, i just=20 checked the generated asm code to see if sdcc put something to go back to= =20 the start, but didn't think about the fact the pic might do this=20 automatically. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist