Marcel van Lieshout wrote: > 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. This means that one pin goes from sinking to sourcing and > the other pin going from sourcing to sinking in a single 100ns cycle. > This did not work a I expected. How exactly did it work? > After some more experimenting using > the scope, I came with the following explanation: > > What I am doing asks to much from the pins as pin switching-times for > sourcing to sinking is not equal to the time from sinking to > sourcing. Furthermore, the timings on the pins are not necessarily > equal on both pins (probably they are not). This results in > effectivily shorting Vdd to Vss for a very brief moment through both > pin-drivers. This explanation doesn't sound right because the drivers have to switch anyway. If one is leading or lagging the other a little, that would only put both outputs at the same voltage which should decrease the current. I'm guessing that the larger square wave (really now 10Vpp instead of 5Vpp previously) causes the transmitter to draw more current than the PIC can provide, especially the high side drivers. It would help to know what you actually saw on the scope instead of your interpretation of it. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body