Re: 12 and 16-bit oscilloscopes



fpm@xxxxxxxxxxxxxxxx (Frank Miles) wrote:

> Don't you have gaps where the various interrupts take control
> away?

> Perhaps your application doesn't have this problem, but if the
> gaps occur at "critical times" - say, in the middle of a
> single-shot acquisition - this would seem to be a problem. Do you
> turn off interrupts, and if so for how long? Are there any
> significant penalties for turning them off for an "extended
> period"?

The two main interrupts are updating the DOS timer 18 times per
second and the keyboard interface.

You can indeed turn interrupts off in critical sections. For
example, I usually turn them off when counting the number of cycles
a routine takes when optmizing code.

To do this, you read the contents of a 64-bit register in the cpu
and take the difference between the starting and ending values. The
measurements can be erratic if interrupts are on due to the DOS time
routine, so you pretty much have to turn interupts off to get an
accurate measurement.

If you turn interrupts off for a very long time, you need to read
the CMOS time and update DOS. That is easy to do.

If you turn interrupts off and your software hangs waiting for
another signal, you can't use the keyboard and you have to reboot.

So you need some provision to check the keyboard to see if you
pressed a key so you can break out of the loop. These things may not
be needed or desirable in the actual running code, so you need a
language with conditional compiles so you can easily switch to debug
mode. Borland Pascal is an excellent language for embedded work in
DOS. In fact, TP5.5 is available for free on the Borland Museum.

Regards,

Mike Monett

Antiviral, Antibacterial Silver Solution:
http://silversol.freewebpage.org/index.htm
SPICE Analysis of Crystal Oscillators:
http://silversol.freewebpage.org/spice/xtal/clapp.htm
Noise-Rejecting Wideband Sampler:
http://www3.sympatico.ca/add.automation/sampler/intro.htm
.