> Next, to increase the transmitter's output, I connected the > transmitter between RD0 and RD1 on a 18F452 running at 40Mhz > and wrote some code to generate a 40kHz block. I toggle both > pic-pins in a single cycle in an attempt to create a pure > wave as much as possible. As you are using two pins, you can get a significantly purer sine wave by _not_ toggling them at the same time. That will not solve your read-modify-write problem, but it will reduce wasted power by cutting some of the harmonics into the transducer. Nigel -- Nigel Orr, Design Engineer nigel@axoninstruments.co.uk Axon Instruments Ltd., Wardes Road,Inverurie,Aberdeenshire,UK,AB51 3TT Tel:+44 1467 622332 Fax:+44 1467 625235 http://www.axoninstruments.co.uk -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics