Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to freeze the trace?

Status
Not open for further replies.

atferrari

Well-Known Member
Most Helpful Member
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 :!:
 
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?
 
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.
 
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.
 
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!
 
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.
 
My scope, far from a DSO is a imple analogic 10 MHz dual channel.
From my initial post.
 
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.
 
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.
 
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 said:
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.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top