Electrical Engineer Crossword (Issue 272)

The answers to Circuit Cellar’s March electronics engineering crossword puzzle are now available.

Across

1.     JACOBSLADDER—Climbing arc [two words]

5.     WOZNIAK—Apple I

8.     SPARKCOIL—Uses a low-voltage DC supply to create high-voltage pulses

10.   JITTER—Creates an imperfect timing signal

11.   ERG—Energy measurement

13.   ACOUSTICOHM—Equivalent to µbar s/cm3 [two words]

15.   BUFFER—Provides electrical isolation

16.   WIFI—Provides movement to smartphones, PCs, and tablets

17.   POSIX—An IEEE operating system compatibility standard

18.   PEAKTOPEAK—Alterations between high and low values

19.   MUTEX—Capable of ensuring atomic access to any shared resource

20.   NAKAMURA—University of California, Santa Barbara professor credited with inventing the blue LED

 

Down

2.     OSCILLATOR—American physicist George W. Pierce (1872–1956); piezoelectric

3.     EIGENTONE—A pitch capable of resonance

4.     FRETSONFIRE—Open-source gameplay for music lovers [three words]

6.     NEGATIVEFEEDBACK—Type of amplifier invented in 1927 by Harold Black [two words]

7.     BAFFLE—Sound wave obstruction

9.     MORSECODE—A pre-texting means of communication [two words]

12.   COMBFILTER—Capable of causing delay [two words]

14.   CHIPSET—Intel created the first family of these

Issue 270: EQ Answers

The answers to the Circuit Cellar 270 Engineering Quotient are now available. The problems and answers are listed below.

Problem 1: Given a microprocessor that has hardware support for just one level of priority for interrupts, is it possible to implement multiple priorities in software? If so, what are the prerequisites that are required?

Answer 1: Yes, given a few basic capabilities, it is possible to implement multiple levels of interrupt priority in software. The basic requirements are that it must be possible to reenable interrupts from within an interrupt service routine (ISR) and that the different interrupt sources can be individually masked.

Question 2: What is the basic scheme for implementing software interrupt priorities?

Answer 2: In normal operation, all the interrupt sources are enabled, along with the processor’s global-interrupt mask.

When an interrupt occurs, the global interrupt mask is disabled and the “master” ISR is entered. This code must (quickly) determine which interrupt occurred, disable that interrupt and all lower-priority interrupts at their sources, then reenable the global-interrupt mask before jumping to the ISR for that interrupt. This can often be facilitated by precomputing a table of interrupt masks for each priority level.

Question 3: What are some of the problems associated with software interrupt priorities?

Answer 3: For one thing, the start-up latency of all the ISRs is increased by the time spent in the “master” ISR. This can be a problem in time-critical systems. This scheme enables interrupts to be nested, so the stack must be large enough to handle the worst-case nesting of ISRs, on top of the worst-case nesting of non-interrupt subroutine calls.

Finally, it is very tricky to do this in anything other than Assembly language. If you want to use a high-level language, you’ll need to be intimately familiar with the language’s run-time library and how it handles interrupts and reentrancy, in general.

Answer 4: Yes, on most such processors, you can execute a subroutine call to a “return from interrupt” instruction while still in the master ISR, which will then return to the master ISR, but with interrupts enabled.

Check to see whether the “return from interrupt” affects any other processor state (e.g., popping a status word from the stack) and prepare the stack accordingly.

Also, beware that another interrupt could occur immediately thereafter, and make sure the master ISR is reentrant beyond that point.

 

Contributed by David Tweed

Electrical Engineer Crossword (Issue 271)

The answers to Circuit Cellar’s February electronics engineering crossword puzzle are now available.

Across

3.            CONFORMALCOATING—Used on PCBs intended for extreme environments [two words]

4.            LOOP—An often repetitious code sequence

7.            VUMETER—Measures program volume [two words]

8.            GALVANOMETER—An electric current identifier

10.         FACTORIAL—“n!”

11.         DIPMETER—Evaluates radio frequency circuits [two words]

13.         REEDSOLOMON—Non-binary code [two words]

16.         SHOCKLEY—One of a group of three co-inventors who, in 1956, were awarded the Nobel Prize in Physics for creating the transistor

18.         SUBSTRATE—An insulating board’s surface

19.         TELEPHONY—Concept proposed by Belgian engineer Charles Bourseul in 1856

20.         ACTUATOR—Electric motors and loudspeakers, for example

 

Down

1.            TORODIAL—A type of inductor or transformer whose windings form a closed circular tube

2.            POTENTIOMETER—May be used to control volume on audio equipment

5.            PIEZOELECTRICITY—Often used to produce and detect high voltages, sound, and electronic frequency generation

6.            OCCAMPROCESS—An electronic circuit board manufacturing method [two words]

9.            FLYWHEEL—An energy-storing device

12.         MONOBLOCK—A single-channel power amp with high current power

14.         RELIABILITY—Quality over time

15.         MICROMETER—Used to measure small objects’ thickness

17.         EISLER—Austrian engineer (1907–992) credited with inventing the printed circuit

Electrical Engineer Crossword (Issue 270)

The answers to Circuit Cellar’s January electronics engineering crossword puzzle are now available.

Across

1.     ICONOSCOPE—The first widely used television camera tube

5.     INTERRUPTROUTINE—Responds to disturbances [two words]

8.     RADIXPOINT—Separates a number’s integer part from its fraction part [two words]

11.   IMPEDANCE—Bridge circuit used to measure resistance

14.   SALLENKEY—A simple filter topology used to implement second-order active filters [two words]

16.   TYNDALLEFFECT—Light scattering [two words]

17.   LADDER—A kind of passive filter

18.   INPUTOUTPUT—Microcontrollers contain these type of peripherals [two words]

19.   IDEMPOTENTLAW—The result never changes [two words]

 

Down

2.     NANDCIRCUIT—Combines two types of functions in a binary circuit with two or more inputs and one output [two words]

3.     BARDEEN—Won the Nobel Prize in Physics twice

4.     DIODE—Developed in 1904 by English engineer John Ambrose Fleming

6.     ECHOBOX—A device that receives part of a transmitted pulse and transmits it back to the receiver [two words]

7.     KARNAUGHMAP—Used to simplify algebra expressions [two words]

9.     FARADY—English scientist (1791–1867) who published the law of induction

10.   GANGED—Tuning that uses a single control to tune two or more circuits

12.   DCGENERATOR—French instrument maker Hippolyte Pixii developed a prototype for this in 1832 [two words]

13.   ILLUMINATE—What an LED does

14.   SAWTOOTH—A waveform with a slow linear rise time and a fast fall time

15.   RCSERVO—An absolute-positioning actuator that is typically limited to a 180° rotation  [two words]

Issue 268: EQ Answers

Problem 1: A transformer’s windings, when measured individually (all other windings disconnected), have a certain amount of inductance. If you have a 1:1 transformer (both windings have the same inductance) and connect the windings in series, what value of inductance do you get?

Answer 1: Assuming you connect the windings in-phase, you’ll have double the number of turns, so the resulting inductance will be about four times the inductance of one winding alone.

If you hook them up out of phase, the inductance will cancel out and you’ll be left with the resistance of the wire and a lot of parasitic inter-winding capacitance.

Problem 2: If you connect the windings in parallel, what value of inductance do you get?

Answer 2: With the two windings connected in-phase and in parallel, the inductance will be exactly the same as the single-winding case. But the resulting inductor will be able to handle twice the current, as long as the core itself doesn’t saturate.

Question 3: Suppose you have a 32-bit word in your microprocessor, and you want to count how many contiguous strings ones that appear in it. For example, the word “01110001000111101100011100011111” contains six such strings. Can you come up with an algorithm that uses simple shifts, bitwise logical and arithmetic operators, but —here’s the twist—does not require iterating over each bit in the word?

Answer 3: Here’s a solution that iterates over the number of strings, rather than the number of bits in the word.

int nstrings (unsigned long int x)
{
   int result = 0;

   /* convert x into a word that has a '1' for every
    * transition from 0 to 1 or 1 to 0 in the original
    * word.
    */
   x ^= (x << 1);

   /* every pair of ones in the new word represents
    * a string of ones in the original word. Remove
    * them two at a time and keep count.
    */
   while (x) {
     /* remove the lowest set bit from x; this
      * represents the start of a string of ones.
      */
     x &= ~(x & -x);
     ++result;

     /* remove the next set bit from x; this
      * represents the end of that string of ones.
      */
     x &= ~(x & -x);
   }
   return result;
}

Problem 4: For the purpose of timing analysis, the operating conditions of an FPGA are sometimes known as “PVT,” which stands for “process, voltage, and temperature.” Voltage and temperature are pretty much self-explanatory, but what does process mean in this context?

Answer 4: The term process in this case refers to the manufacturing process at the plant where they make the FPGA. It’s a measure of the statistical variability of the physical characteristics from chip to chip as they come off the line.
This includes everything from mask alignment to etching times to doping levels. These things affect electrical parameters such as sheet and contact resistance, actual transistor gains, and thresholds and parasitic capacitances.
These kinds of variations are unavoidable, and the P in PVT is an attempt to account for their effects in the timing analysis. The idea is to make the analysis conservative enough so that your design will work reliably despite these variations.

Contributed by David Tweed

Issue 266: EQ Answers

The answers to the Circuit Cellar 266 (July 2012) Engineering Quotient are now available. The problems and answers are listed below.

Problem 1—What’s the key difference between infinite impulse response (IIR) and finite impulse response (FIR) digital filters?

Answer 1—An infinite impulse response (IIR) filter incorporates feedback in its datapath, which means that any particular input sample can affect the output for an indefinite (infinite) time into the future. In contrast, a finite impulse response (FIR) filter uses only feedforward in its datapath, which means that any given input sample can only affect the output for a time corresponding to the number of storage (delay) stages in the filter.

Problem 2—Does the fact that the finite resolution of digital arithmetic effectively truncates the impulse response of an IIR filter turn it into an FIR filter?

Answer 2—While it’s technically true that the impulse response of an IIR filter implemented, say, with fixed-point arithmetic is effectively finite, this has no real bearing on its classification in terms of either its design or application. It’s still an IIR filter for all practical purposes.

Problem 3—The following pseudocode represents an implementation of a single-pole low-pass IIR filter, using 16-bit input and output values and a 24-bit internal accumulator and a filter coefficient of 1/256:


  # The 32-bit accumulator holds 16 integer
  # and 16 fractional bits
  $acc = 0x00000000;

  # The input value is a 16-bit integer.
  $input = 0xFFFF;

  # Offset used for rounding the accumulator
  # to 24 bits.
  $offset = 0x80;

  while (1) {
    # acc = (255*acc + input)/256
    $acc -= ($acc >> 8);
    $acc += ($input << 8) + $offset;
    # limit acc to 24 bits
    $acc &= 0xFFFFFF00;
    # output is integer part of acc
    $output = $acc >> 16;
  }

An implementor of this filter complained that “the output never reaches 0xFFFF.” What was the flaw in his reasoning?

Answer 3—The accumulator in this filter eventually settles at the value 0xFFFE8100. If you simply take the upper 16 bits of this, then the output value appears to be 0xFFFE. But if you properly round the accumulator by adding 0x00008000 before dropping the LSBs, then the output value is the correct value of 0xFFFF.

Problem 4—The original implementor’s solution was to change the $offset value to 0xFF. Why did this work?

Answer 4—Changing the $offset value to 0xFF effectively adds a bias to each input sample, which averages out to 0x00007F00 in the accumulator. The effect of this is to add the required rounding offset to the accumulator so that truncating the LSBs to create the 16-bit output value comes up with the correct answer.

.