Don your idea sounds like a pretty good plan, so I sketched this up to see if we're on the same page. Presuming I could trigger a square wave high at the time of transmission and low at the time of reception for the input pulse (maybe using a high speed flip flop or something?), then a well defined current would flow through R1 charging the capacitor for X amount of time, the time being available by solving V = Ve*[1-*e^(-t/(R1*C1))] for t. V is supplied by reading the Pic's ADC, and R1*C1 is a constant. For reset another transistor could provide a path to ground as needed. [Input Pulse] _|_ R1 R2 +5 ____/ Q1\___/\/\/\_ C E | | C1 ---||---[Gnd] | | ___[PIC I/O Pin] | _|_ |_______/ Q2\____[Gnd] | C E | [Pic ADC] Is this what you had in mind? I suppose it would need some calibrations due to the capacitance of Q2 and the other circuit elements, but in the end that would be constant too, and scaling C1 in the equation should compensate for that? I'm still learning a lot about electronics, so please please please point out any flaws in this thought process... Thanks for the idea! :D ----- Original Message ----- From: "Don Taylor" To: Sent: Wednesday, May 19, 2004 10:01 PM Subject: Re: [PIC:] Measuring nanoseconds > On Wed, 19 May 2004, Robert B. wrote: > > Does anybody know of a way to make a PIC measure time intervals shorter > > than it's instruction cycle? I need to measure the time between a > > transmitted and a reflected radio pulse in the 3 ns range, and would > > like to do it with a PIC. > > You might consider producing a well defined (voltage and current) pulse > of the length you wish to measure, use that to squirt a bit of charge > onto a capacitor, and then measure the voltage off the capacitor later. > By choosing appropriate signal levels and RC values you can adjust this > idea for the range of pulse lengths that you are interested in. > > Long ago someone experimented with the idea of driving pulses into a > "flash" AtoD converter. Some of these have a uniform RC ladder network > inside and that posed some interesting possibilities. But I don't know > whether that was later patented or not, I was gone before that was done. > Check carefully if that matters. There were several enhancements made in > the implementation of this idea. > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body