Jaws dropping
Skogsgurra
Posts: 231
Hello,
I had a real tough measurement task. Counting falling edges. With more than 20, but less than 100 nanoseconds t_fall. Tough, first, comparators fast enough are hard to find. At least if you are limited to a +5 V and 3.3 V supply. Second, because not many processors can handle that kind of temporal resolution.
The Propeller did it. Of course.
I am using two biased inputs so that one has +8 V threshold and one has +2 V threshold. I then use the /A&B mode for counter A in a separate cog. Since the /A&B is valid also for rising edges, I prequalify by looping until the signal gets above A pin (+8 V) and then I loop until the signal is below +2 V. Then, I read the counter contents and check to see if it is between 2 and 8, which is 25 and 100 nanoseconds (at 80 MHz).
If the edge is within those limits, I increase a counter in hub ram and after 1 second, I can output the result to the display. I had to meet a 10 000 edges/second specification. I had no problem doing 100 times better in assembler.
I have done this before. But then using a lot of hardware. All HW needed now is a simple R2R D/A and a series resistor. It can't get any better. There were quite a lot of dropped yaws when I presented the solution in a meeting only a few days ago.
You can't help it. The Prop: I'm loving it!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Skogsgurra) : 8/29/2007 9:19:31 PM GMT
I had a real tough measurement task. Counting falling edges. With more than 20, but less than 100 nanoseconds t_fall. Tough, first, comparators fast enough are hard to find. At least if you are limited to a +5 V and 3.3 V supply. Second, because not many processors can handle that kind of temporal resolution.
The Propeller did it. Of course.
I am using two biased inputs so that one has +8 V threshold and one has +2 V threshold. I then use the /A&B mode for counter A in a separate cog. Since the /A&B is valid also for rising edges, I prequalify by looping until the signal gets above A pin (+8 V) and then I loop until the signal is below +2 V. Then, I read the counter contents and check to see if it is between 2 and 8, which is 25 and 100 nanoseconds (at 80 MHz).
If the edge is within those limits, I increase a counter in hub ram and after 1 second, I can output the result to the display. I had to meet a 10 000 edges/second specification. I had no problem doing 100 times better in assembler.
I have done this before. But then using a lot of hardware. All HW needed now is a simple R2R D/A and a series resistor. It can't get any better. There were quite a lot of dropped yaws when I presented the solution in a meeting only a few days ago.
You can't help it. The Prop: I'm loving it!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Skogsgurra) : 8/29/2007 9:19:31 PM GMT
Comments
I could have used the PWM for reference voltage, but I have to filter rather hard to have a quiet reference voltage and that would have slowed down the measurement (measuring across a wide range of voltages in short time).
*The P7..P0 and Vss are layed out so that a standard SIL R2R can be dropped right into the holes on the ProtoBoard. There is even an empty hole for the output pin! Same for P15..P8 and P23..P16. Perfect if you want to build a three-phase "funny-waveform" generator. I may do that some day. And connect it to an NFO Sinus power stage. That will result in an arbitrary wave-form generator with up to 22 kW output at 400 V and very flexible phasing, distortion, unbalance, DC component, transients, drop-outs, sags and swells or whatever you may need for power testing.
Edit: Changed DIL to SIL
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Skogsgurra) : 8/29/2007 6:02:36 PM GMT
Graham
p.s. I think you mean jaws
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔