+ Reply to Thread
Results 1 to 11 of 11

Thread: How to freeze the trace?

  1. #1
    atferrari Good atferrari Good atferrari Good
    Join Date
    Oct 2003
    Location
    Buenos Aires - Argentina
    Posts
    573

    Default How to freeze the trace?

    I've finally got a 16F877 generating a command, as per the SIRC protocol (Sony IR command) with (1- start + 7- command + 5- device) pulses and just for testing, the signal is emitted through a continuous loop.

    I've spent quite some time trying to freeze the trace in my scope to actually count the pulses and measure periods but to no avail. I can frezze two or three pulses but if I see the whole "packet" I can't count / measure anything. :cry:

    My scope, far from a DSO is a imple analogic 10 MHz dual channel. What's the simplest setup to be able to get a steady image on the screen? Any trick I could play to be able to explore the packet along the full length :?:

    While typing this I realized that a certain instability is due to a TMR0 interrupt providing a time base for other purposes. I forgot to disable it and will be the first thing to do tomorrow at the bench.

    Suggestions / comments appreciated :!:
    Agustín Tomás
    In theory, there is no difference between theory and practice. In practice, however, there is.


  2. #2
    instruite Newbie
    Join Date
    May 2005
    Location
    India/Japan
    Posts
    246

    Default

    atferrari:
    My scope, far from a DSO is a imple analogic 10 MHz dual channel. What's the simplest setup to be able to get a steady image on the screen? Any trick I could play to be able to explore the packet along the full length
    Better to specify model of Scope so somebody can hlep you better

    As far as i remember there is Start/Stop button (not ON/OFF) which can be used to freeze the waveform
    also there is something call Single sequence or Sigle trigger can you see any such kind of option on your scope?
    Instruite
    http://www.icesociety.org
    =====================
    Ideas that work,
    Concepts that sell.
    =====================

  3. #3
    eblc1388 Excellent eblc1388 Excellent eblc1388 Excellent eblc1388 Excellent eblc1388 Excellent
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,226

    Default

    No, you simply can't have a stable display using a simple 10MHz oscilloscope.

    The reason being that the scope will trigger on any pulses of your pulse train in every subsequent trace sweep and this will mess up the screen because pulse width are different for different pulses.

    The simplest method to do what you wanted is to use another 877 port pin and output a short pulse during the start of the pulse sequence. Apply this signal to the trigger input of the scope(which can be either channel two or a separate front panel input socket). Select the scope to trigger on this pulse to obtain a solid display on the pulse train which doesn't move all over the places.

    Hope this helps.
    L.Chung

  4. #4
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,788

    Default

    As already suggested, you really need a storage scope to freeze a low repetition waveform like SIRC.

    By putting a loop round a single transmission, followed by a short delay, you can get a repetitive signal, but it's fairly low frequency and quite hard to observe due to the flickering.

    If you're playing with SIRC, you might like my IR tutorials which show how to transmit and receive SIRC.
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

  5. #5
    atferrari Good atferrari Good atferrari Good
    Join Date
    Oct 2003
    Location
    Buenos Aires - Argentina
    Posts
    573

    Default Done!

    A quite simple solution with good results: a pin going high for three instruction cycles in Chanel 1 (before the packet), got a stable image (in Chanel 2) as needed.

    Thanks for replying :!:

    Nigel: some postings below I've asked a question about your code.
    It was tutorial No. 5 that triggered my interest in the SIRC protocol.

    Now, for the receiver/decoder end!
    Agustín Tomás
    In theory, there is no difference between theory and practice. In practice, however, there is.

  6. #6
    _3iMaJ Newbie
    Join Date
    Jun 2005
    Posts
    182

    Default

    The problem has been solved but I didn't see my solution above so I'll just give an FYI.

    Normally on digital scopes (assuming its digital) there is something called 'single' and you set the appropriate trigger level. Once your signal goes above your trigger level the scope will hold the transient response that happens after the signal passing the trigger.

    Its usually a trigger setting such as auto, normal, and single.

  7. #7
    atferrari Good atferrari Good atferrari Good
    Join Date
    Oct 2003
    Location
    Buenos Aires - Argentina
    Posts
    573

    Default Re: How to freeze the trace?

    My scope, far from a DSO is a imple analogic 10 MHz dual channel.
    From my initial post.
    Agustín Tomás
    In theory, there is no difference between theory and practice. In practice, however, there is.

  8. #8
    lord loh. Newbie
    Join Date
    Jan 2005
    Location
    India.
    Posts
    621

    Default

    I had a similar problem on a 20 MHz analog oscilloscope. The solution I had was strange.

    Apart from tuning the hold-off time, I brought up the second channel.

    anther time I selected the dual channel mode chose to chop the trace instead of alternate trace. The troublesome wavefom stabilized. No one in my class was able to get it right.

    Also sometimes using the normal mode instead of the automatic mode des help.
    Bharath Bhushan Lohray.
    M.Sc. Electronics.

  9. #9
    zevon8 Newbie
    Join Date
    Apr 2004
    Location
    Toronto, Canada, eh
    Posts
    928

    Default

    Sometimes you can use a delayed sweep to view a difficult waveform. If your scope has this function, and there is some repetitive content in the waveform, it may be possible. You can display a larger portion of the signal at a lower speed, then use the delayed sweep and its 'magnification' ability of a second timebase to look at the portion of the waveform you are interested in.

    Not always possible, but sometimes this can help.

  10. #10
    Dean Huster Excellent Dean Huster Excellent Dean Huster Excellent Dean Huster Excellent Dean Huster Excellent
    Join Date
    Feb 2003
    Location
    Harviell MO USA
    Posts
    956

    Default

    If you have a SWEEP HOLDOFF control (it varies the "holdoff" time between successive sweeps), it will delay the sweep long enough that your triggering event is the beginning of the pulse string. Sometimes, on some scope models, there may be an internal jumper that switches the TIME/DIV variable control from that function to the HOLDOFF function.

    Another possiblity is to find a "frame pulse", an event that the processor produces at the beginning of the output sequence. If you've programmed the system yourself, if multiple outputs are there, you can program one of the outputs to put out a single pulse right before the output of interest squirts out its data. That becomes your frame pulse.

    With a really long data word, the framing pulse becomes really handy in conjunction with the delayed sweep function of a little higher-end scope to give you "microscopic" timing vision.

    The only reason that a delayed sweep function might work is that you're adding in a few delays and odd holdoff times that happen to land just right with your signal. If the main sweep won't trigger on something solid, the delayed sweep won't either.

    The single-sweep idea, whether with an analog or digital storage scope, will give you a different display each time, although it will be "stable". But after several shots, you might have a picture that's in the right spot on your screen to be useable.

    Or, you can build a little one-shot that triggers on your data output at the beginning of the data and has a pulse width that is longer than the data string. The output of this one-shot becomes your frame pulse that you can feed into the external trigger of your scope.

    Dean
    Dean Huster, Electronics Curmudgeon
    Contributing Editor emeritus, "Q & A", of the former "Poptronics" magazine (formerly "Popular Electronics" and "Electronics Now" magazines).

    R.I.P.

  11. #11
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,788

    Default

    Quote Originally Posted by Dean Huster
    Another possiblity is to find a "frame pulse", an event that the processor produces at the beginning of the output sequence. If you've programmed the system yourself, if multiple outputs are there, you can program one of the outputs to put out a single pulse right before the output of interest squirts out its data. That becomes your frame pulse.
    As this is a PIC project, it's simple to use an extra output pin as a trigger signal, connect this to the external trigger input of the scope.

    Then alter the software to output a short pulse just before the SIRC's signal is output - this gives you a nice clean single trigger rather than attempting to trigger just off the SIRC signal. The code is VERY trivial, I've often done this to trigger scopes, or to provide pulses at specific points for measuring on the scope (for example, outputing pulses at the sampling points of an RS232 receiving routine).

    You only need something like this!.

    Code:
    bsf  PortX, Trigger
    nop
    bcf  PortX, Trigger
    
    You can obviously add a 'return' and call it as a subroutine if you want.
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

+ Reply to Thread

Tags for this Thread