Shop OBEX P1 Docs P2 Docs Learn Events
Practical limits on clock generation on 'temporary' circuits — Parallax Forums

Practical limits on clock generation on 'temporary' circuits

ypapelisypapelis Posts: 99
edited 2011-09-05 06:20 in Robotics
All,

I have a somewhat ambiguous question regarding the ability of the Propeller (or any chip for that matter) to flip an output pin when not in a carefully designed circuit board.

If I am not mistaken, using assembly I should be able to flip a bit up/down with two sequential instructions taking 8 cycles, which at 12.5 nS per cycle yields a period of 100 nS. However, my question is more in what is reasonable in terms of driving parasitic capacitance in the typical experimenter circuits (using hook-up wires, breadboards, thick solder joints etc.) I have build various circuits that have the Prop generate a clock, and have never managed to have them work at more than 200-300 KHz. (i.e., a period of no less than a few microseconds). None of these circuits are on a PCB, instead they are using hookup wires between the Propeller and a breadboard (on a Stingray).

Watching the signal on an oscilloscope, as the frequency increases, I can see it becoming more of a sin wave as opposed to a square wave, but even at early stages of 'roundness' the circuit works, but at some point it doesn't.

I am not sure if the 'roundness' of the waveform is an artifact of the oscilloscope itself, the wires, or for that matter my program. What I know is that various communication protocols that work at lower frequencies, quit working at higher frequencies even though they are within the calculated capabilities of the Prop and the specs of the attached devices.

Is there any quick and dirty estimate on maximum frequency that a functional clock signal can be generated when using hookup wires? By the way, in all cases, the 'load' is another chip/gate/IO pin with pretty high impedance, so I don't think the issue is loading. Any guidance would be appreciated!

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-09-04 18:54
    The "roundness" that you see is probably more a limitation due to the frequency response of your oscilloscope than to anything that's actually happening on your breadboard. What kind of scope are you using, and what is its advertised frequency response?

    -Phil
  • ypapelisypapelis Posts: 99
    edited 2011-09-04 19:09
    Phil: the scope is a picoscope 4424 USB scope, stated bandwidth is 20 MHz, the probe is 1MOhm 22pF.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-09-04 19:38
    When you get your 10MHz signal working you should be able to increase it to 80MHz by using the Synth object. It uses counters to generate the signal.

    The synth object limits the frequency to 128MHz. Of course you'd have to have the appropriate crystal to run at 128MHz. The Prop does not run well at 128MHz without a lot of help (cooling) or limiting cogs/functions.

    Duane
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-09-04 19:48
    This is what a 40 MHz square wave signal from a Propeller pin looks like on a scope with a 300 MHz input bandwidth:

    attachment.php?attachmentid=84826&d=1315190835

    This is what the same signal looks like on the same scope with the same hookup, but with the input bandwidth limited to 20 MHz:

    attachment.php?attachmentid=84825&d=1315190835

    You can't see more detail than what your instruments are rated for, even though that detail exists in reality.

    -Phil
    640 x 480 - 12K
    640 x 480 - 14K
  • ypapelisypapelis Posts: 99
    edited 2011-09-05 05:14
    So to my original question, 1-2 MHz should be fine with ad-hoc wiring and the roundness I see is my scope. I guess the fact the protocol fails at higher speeds has to do with software timing.

    I think I need a new scope ...
  • GadgetmanGadgetman Posts: 2,436
    edited 2011-09-05 06:20
    A good rule of thumb is to have a scope that can handle 10x the frequency of the signal you're studying in order to get an undistorted picture.
    (A square wave is actually comprised of a sine at the original frequency and lots of lower-amplitude sines at 3x, 5x, 7x and so of the original frequency. )

    Also, the max frequency generated in SW without use of counters doesn't always equal two output commands.
    (Unless the commands also contains some sort of 'goto' in the second operation. Yeah, we're lucky with the Propeller. ;-)
Sign In or Register to comment.