Padu wrote: > I had it like this before: > > +-------Ri------o------R1------+ > | | > ideal | > voltage volt > source meter > | | > +---------------o--------------+ Ok... Never use a volt meter like this! :) The volt meter (or scope, which for this discussion can be considered a volt meter) has to be in parallel to the voltage you want to measure. The way you wired it, it would have to be a amp meter. > When I took the screenshots, I had the circuit like the one above, where R1 > is the potentiometer. I redid the same tests using the circuit you suggested > and I had very different results. For example, the edges of the waveform did > not change significantly (it was still a square wave), and when it dropped > to 2V, R1 was 800 ohms. Ok, this sounds reasonable and very normal. Your output has an Ri of 800 ohms. This is something to which you can connect /any/ microcontroller input. They all have leakage currents in the microamperes -- not a problem with a source resistance of 800 ohms. (The voltage drop across Ri will be less than 1 mV.) > Then I did two other tests using CCP1, one pulling the signal up with a > 6.8K resistor, and the other using an opamp. In both situations my > system worked, but somehow using the voltage buffer it was less jittery. > What I mean by jittery: I'm outputting the pulse width in microseconds > to an LCD. In the first case (pullup), the value output to the LCD would > oscillate +/-5 us, and with the voltage buffer it rarely oscilated. There still seems to be a problem with the CCP input. If the input changes the signal, but a resistor of 100k does not change the signal, there is a problem with the input. Rather than trying to "fix" that with an opamp buffer, I'd suggest you find out what's wrong. The opamp may make it work somehow, but it won't solve the problem. >> It seems to be that there's something wrong with your port. Maybe the port >> configuration, other components connected to the port, a short somewhere, >> or the chip. > > Humnn, now that you're saying that, one other thing that I found weird. > I've double checked and TRISC.2 is really set to input, but if I measure > the voltage on that pin when floating, it reads close to 1V. Is that > normal? Is it because it is floating or any other mysterious effect such > a leak in clamp diodes? You can't really measure the voltage on a floating pin. You connect two high-impedance pins (the PIC pin and the voltmeter pin), and what comes out is determined by (unspecified) leakage currents and the (unspecified) impedances. What you could do is to connect the CCP input to Vdd and ground through a 100k or so resistor and measure the voltage. It should be (almost) exactly the rail voltage to which you connected it, max difference (voltage across the resistor) 100 mV. Then connect it to the rx output, and here goes the same: max difference between the output and the pin voltage (that is, the voltage across the resistor) 100 mV. If the difference is significantly higher, your port is not in high-impedance. Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist