I don't think I, for one, can HEAR at 40kHz, Alice (An OScope would see the signal, of course.) Zeuss can hear that, probably, and he'd howl & bark in pain I'd suggest starting with an 800Hz tone, that jumped to 2kHz, that sounds a LOT more audible to me Mark Alice Campbell wrote: > > test program and circuit: > > just write a simple delay loop that reduces 4mhz (effective > instruction rate 1 mhz) to about 8khz. put a piezo buzzer at port > b1. toggle b1 at 8khz. replace crystal with 20khz. the low tone at > 8 khz should jump to a high tone at 40 khz. No sound will come out > if it doesnt work. > > alice > > , > > >Please do anyone have a test code with simple circuit > > >for pic16f84 20mhz ? > >