> I need a simple squarewave generator with a range of > 0 Hz to ~5kHz. I tried breadboarding a simple 555 > circuit, but it's horrendously unstable > (the freq-counter is not thr problem). If you only want a square wave then a simple low cost crystal controlled function generator is only a PIC away. 5 kHz gives you 1/5000/2 s = 100 uS per half cycle giving oodles of time to read control buttons between toggling a port pin. You could do this with a timer and interrupt or a timer and loop. Key trick (not a hard one in this application) is to maintain all paths of constant time period (isochronous) so you don't get jitter when a key is pressed or released. RM -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body