Square Waves
RogerInHawaii
Posts: 87
I'm using the following
to set up a 32KHz clock on one of the Propeller chips. This works quite well and I get a nice square trace on my oscilloscope.
I'm also using the following...
to set up a 4MHz clock on one of the Propeller chips. This also works quite well, although the trace isn't quite as nice and square as the 32KHz trace.
I'm also producing a kind of clock signal on another pin just by toggling the pin from within my spin program. When I do that, the trace I get looks like this:
This does not look very good. The signal goes way low before settling at a steady "off" condition and goes way high before settling on a steady "high" condition.
So, two questions:
1. Why does the 4HMz clock not have the same, nice, square wave as the 32KHz clock, since they are both run using the built-in clocking features (the synth.spin code) to create them?
2. Why does the "clock" output created by simply toggling a pin output look so very different from either of the other two?
Synth.Synth("B", pinNumber_32k_Clock, 32_768)
to set up a 32KHz clock on one of the Propeller chips. This works quite well and I get a nice square trace on my oscilloscope.
I'm also using the following...
Synth.Synth("A", PinNumber_4Meg_Clock, 4_000_000)
to set up a 4MHz clock on one of the Propeller chips. This also works quite well, although the trace isn't quite as nice and square as the 32KHz trace.
I'm also producing a kind of clock signal on another pin just by toggling the pin from within my spin program. When I do that, the trace I get looks like this:
This does not look very good. The signal goes way low before settling at a steady "off" condition and goes way high before settling on a steady "high" condition.
So, two questions:
1. Why does the 4HMz clock not have the same, nice, square wave as the 32KHz clock, since they are both run using the built-in clocking features (the synth.spin code) to create them?
2. Why does the "clock" output created by simply toggling a pin output look so very different from either of the other two?
Comments
It may just be the timebase setting on your scope. For example, on your 32KHz output, try setting the timebase to 1us, so you can examine an edge in detail. You may see the same over- and undershoot symptoms.
Now, having said that, I doubt that the Propeller output actually looks like that on its own. When you apply an oscilloscope to examine a signal, you're not examining just that signal, but the entire system of signal, plus scope probe, scope leads, and scope input. If your ground lead, for example, is too long, the extra inductance imposed on the system may result in the kind of overshoots you're seeing. It may also be that your probe compensation is out of adjustment. If it's adjustable, your scope manual will show you how to tweak it.
-Phil
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
Rgds, David
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
-Phil
Roger.
What is the last trace's freq, and where was it measured ??
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
I'm betting that the probing conditions for that last trace were different from the other two. (Bad ground connection?)
-Phil
Update: pmrobert beat me to it!
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Servo Boss, a 12 channel servo tester kit from Gadget Gangster.