Vous êtes sur la page 1sur 104

Preface

This is part 2 of a compendium in Measuring Techniques intended for a course in Computer based measuring techniques on distance. Part 1 (in Swedish) is intended for a basic course covering analog and digital electronics with applications to sensors and actuators. This part, Computer Based Measuring Techniques, covers computer busses and interface techniques, as well as signal analysis with FFT and data analyses with least square fits.

1.Introduction : Computer Based Measuring Techniques


Welcome to the world of laboratory and industrial automation. This compendium is an attempt to summarize important tools for how to: * Attach a computer to an instrument or sensor. * Control the instrument. * Collect data from it. * Analyze the data. However, a short compendium can never replace a text book with its deeper and more thoroughly treatment of a subject. When possible, references are made to Horowitz and Hill: The Art of Electronics, 2:nd ed. Cambridge University Press 1989, a solid "brick" with numerous of examples. Another textbook that also treats all circuits from sensor to computer is Wassos and Ewing: Analog and Computer Electronics for Scientists, Wiley & Sons 1993. Practical hints may also be found in Gates and Becker: Laboratory Automation using the IBM PC, and T.Olsson: IBM PC i styr- och mtsystem, Studentlitteratur 1986, not to forget instrument catalogs from companies such as National Instruments, IOtech, Keithley, Burr-Brown and many many more. Latest information is probably obtained using Internet. Try for instance the search engine http://www.pcwebopaedia.com/. In most modern applications, laboratory automation involves the use of computers or computerbased systems to control one or more instruments, collect data from those instruments, and process the data to make it useful to the scientist or other user. Less formal, it involves hooking up a computer to a sensor with some electronics and writing some software. Laboratory automation can also include the area commonly referred to as laboratory robotics, in which a computer-controlled device is responsible for some or all of the sample handling during the experiment and many other kind of large-scale applications such as process control and laboratory information management. However, this is not the subject of this compendium.

Figure.1: Computer based measuring system Figure 1 shows a block diagram of a computer based measuring system. Attached to the object we have the sensor, which is characterized by its linearity or nonlinear behaviour, the precision and its accuracy. See the section data analysis on how to control and determine these factors in software. Calibration of the sensor with all electronics attached is also of central importance if a product

should achieve the ISO-9000 quality system standard certification (ISO = International Standard Organization, see http://www.iso.ch ). Stability of e.g. amplifier gain, is perhaps settled only after a long time. Any adjustment in the electronics may require a new settling time. However, in a computer based system adjustments may instead be introduced in the software. Noise, shielding, grounding and analog to digital converters are described in section "adc". Filtering of the digital data may also be performed by the software, see section "signal", where also spectral analyses and correlation analysis are treated. We should not forget that measured values often are representing parameters of a physical model which should be fitted (section "LSQF"). Most parts of the computer based measuring system in Figure 1 are tied together by the bus and different busses are also the main subject of this compendium. Figure 2 shows three different approaches, all of which are treated in more detail in section "bus" and "GPIB".

1.
When measured object is close to the computer, in a lab or test environment.

2.
When general instruments are used.

3.
When using few instruments, located far from the computer.

Figure.2: Measuring systems with PC-computers

2 PID control : Computer Based Measuring Techniques


"Measuring technique" do not only involve measurements of some kind of physical parameter but also control of actuators and larger systems. Controllers are designed to eliminate the need for continuous operator attention. Cruise control in a car and a house thermostat are common examples of how controllers are used to automatically adjust some variable to hold the measurement (or process variable) at the set-point. The set-point is where you would like the measurement to be. A typical temperature controller system measures a temperature as give by a temperature sensor, compares this with a set-point - wanted temperature, and controls the heating or cooling aggregate in order to minimize the deviation or error. The Figure shows a block diagram of such a feedback system.

Figure: Control feedback loop. The output u from the controller is a function of the difference ("error" e) between the set point r and the measured value y: e=y-r. The simplest feed back is the on-off regulation which can be improved by introducing some hysteresis. A more "smooth" feedback loop is the PID-regulator, where PID stands for Proportional, Integral, Derivative: . The mathematics behind the design of such feedback loops and how to determine the best choice of parameters is not the subject of this compendium, but is covered by other courses and texbooks such as T.Glad & L.Ljung: Reglerteknik - Grundlggande teori, (Studentlitteratur 1981), and L.Ljung: Reglerteori - Moderna analys- och syntesmetoder, (Studentlitteratur 1986). A tutorial overview may also be found at http://www.expertune.com/tutor.html. An extensive Control Tutorials for Matlab is found at http://www.engin.umich.edu/group/ctm/. Zeigler-Nichols method is described in some manuals to measure and control programs: First set KI and KD =0. Increase KP gradually until the system just starts to oscillate. This point of instability is called the "ultimate gain" PU and "ultimate period" TU: Action P PI PID PID Performance 1/4 decay 1/4 decay 1/4 decay Gain KP 0.5 PU 0.45 PU 0.6 PU 0.833 TU 0.5 TU 0.5 TU 0.125 TU 0.33 TU Integral 1/KI Derivative KD

some overshoot 0.33 PU

PID

no overshoot

0.2 PU

0.33 TU

0.5 TU

However, this method assumes no positive or negative limitation of the controller output u. Electrically, the PID-regulator is realized with op-amplifier circuits but it is also readily implemented in a software measure and control program. With a computer or microcontroller in the feedback loop self adjusting PID-regulators are possible to implement as well as more fancy regulators based on neural network algorithms and Fuzzy Logic Control.

12. Microcomputers and busses Computer Based Measuring Techniques

Figure 12.1: Block diagram of a computer

12. Microcomputers and busses :Computer Based Measuring Techniques

The internal structure of computers involve several parallel communication paths, called busses (Figure 12.1), A typical bus system contains a large number of long parallel conductors in the following substructure: (1) A data bus carries the 1's and 0's representing the data to be transmitted between devices. (2) An address bus contains a number representing the destination. (3) A control bus serves as an administrator the process and also transmits instructions from the controller. Before looking into a typical bus interface more in detail (Figure 12.5) we recall some digital electronics basics.

Figure 12.2: Tri-state and Open Collector logic. In general one may not connect the outputs from two devices to each other, unless the output circuit is of "Open Collector" or "Tri-state" type. In Tri-state logic, the output is activated or isolated (like a switch) with a third signal. The output of the leftmost device is enabled when the gate is high. An "inverting ring" on the gate of the second circuit, indicates that the enabling of the output is active when the signal is low. Only one output may be active at the time and this is usually controlled by the address and control busses. Open collector circuits are not able to drive the high logic state by themselves, only to sink the output to low voltage. If any output is low the bus line will be in the low state independent of the other outputs. A high state is only possible when all outputs are "high" and the high voltage of the bus line is driven by a "pull-up" resistor to e.g. +5V. The open collector logic is often called "wired or" since the true state (active state or 1's) are represented by 0 V (inverted logic). It is particular useful for handshaking: Each device acknowledge an instruction by releasing the bus line but this goes high first after all devices has given their acknowledge.

Latch and registers are used for receiving or transmitting data on the bus. Several D-flip-flops in parallel have a common clock (or gate) input and tri-state enable input. Figure 12.3 shows a '573 octal D-type latch with tristate outputs. 8-bit of parallel data (byte) is clocked from the inputs when C is high (1) and is present on the outputs when is low (0). The term "latch" strictly refers to a transparent latch, whose output follow the respective inputs while enabled. A so-called edge-triggered latch ('574), with edge-triggered clock, is properly called a D-type register. The difference may have important consequences when latching data from a bus, because of the relative timing of data and the strobing clock pulse.

Figure 12.3: '573-register Address Decoder Figure 12.4 shows one example of a decoder circuit often used for address decoding. The output (Yn), corresponding to the address given by the number n=CBA in binary form, is low (as indicated by the rings) while all other outputs are high. The '138 circuit has 3 extra gate-inputs which may be used to extend the address range beyond the 3 bits (C,B,A).

Figure 12.4: '138 address decoder

Figure 12.5: An example of bus connections based on the ISA-bus structure. Figure 12.5 shows an example of how an interface to a computer bus looks like. It is based on the signals available on the ISA-bus, found in IBM PC/AT, 386, 486, 586 etc. (ISA = Industry Standard Architecture, a de facto standard). It is probably the most common bus for plug cards in measurement systems and is described later in more detail. In Figure 12.5 only the three least significant address bits are shown. The other address bits may control the gate inputs G1, G2 and GL on the '138-decoder, through additional logic. When the computer writes data to a card or device on the bus, it puts the 8 bit (1 byte) parallel data on the data bus while simultaneously putting the address on the address bus. When address and data is available it sends a strobe signal which goes low for slightly longer than 0.5s. During this strobe pulse the card with the appropriate address must "latch" or catch the data in a register. When the address is 5 in Figure 12.5, Y5 is 0 on the '138. Y5 and are NOR'ed to the clock of the left '573-latch. Hence this clock input becomes 1 only when =0 and Y5=0 (NOR works for active low inputs like AND for active high inputs). The output of the latch is continuously showing the values of the D-flip-flops in the '573, since is tied to ground. When the computer reads data from the bus it sends an address and a strobe signal which goes low for slightly longer than 0.5s. During this strobe pulse the addressed card is allowed to put its data on the data-bus, but not otherwise. As before Y5=0 for the address 5 and this is OR'ed with =0 to give =0 on the right '573 latch which then enables its tri-state outputs. We assume that the inputs to this latch is not changed during this time and that the clock (C) gate can be tied to +5V for simplicity. When LS, HC or HCT gates (e.g. 75LS573) are used, there is no problems with the propagation time in the gates relative to the length of the strobe pulses. The popular ISA bus, or equivalent IBM-AT-bus, is an extension of the IBM-PC bus . The original PC cards required a 60-connector socket. The ISA bus (Table 1) added a 36 connector extension socket with additional data (8), address (4), interrupt (5) and other lines. In this way the original PCcards can also be used on the ISA bus and many I/O-cards today are only using the PC bus signals and connector. In 1988 yet another connector was added and the Extended Industry Standard Architecture (EISA) was introduced. It uses a two-level socket where the lower part follows the 60+36 ISA setup, while the upper part connects with a third set of contacts. Thus standard ISA plug-

in boards can be plugged into EISA getting normal ISA functionality while EISA designed systems support 32-bit data transfers at higher rates, 32-bit memory addressing, multiple bus masters, programmable level or edge-triggered interrupts and automatic board configuration. From the first IBM PC up through the first PS/2 computers (introduced in 1987) a computer had one bus and all of its devices and chips ran at the same speed. On those systems, additional computer memory was often added by plugging an adapter card into the same slots that held I/O adapters. Starting with machines that used the 386 CPU, the memory and CPU of the system ran faster than the I/O devices. The solution was to separate the CPU and memory from all the I/O. Today, memory is only added by plugging it into special sockets on the main computer board. In a modern PC, there may be a half dozen different Bus areas. There is certainly a "CPU area" that still contains the CPU, memory, and basic control logic. There is a "High Speed I/O Device" area that most often is a PCI Bus, connecting the high speed bus on the mainboard to the display adapter and IDE disk interface chip. Then one or two extra I/O slots may allow adapter cards to connect to the PCI bus. The remaining I/O device slots support standard "ISA" bus cards. Some computers will also provide sockets for a number of PCMCIA "credit card" adapters commonly found in laptop computers. More about these buses in section 12.5. There are three different methods to transmit data between a card on the bus and memory: a) Programmed I/O. Data goes via the CPU-registers. Uses the assembler instructions IN and OUT. In TurboPascal these are called by using the predefined array PORT[ ], in Borland C (or Turbo C) by the OUTPORTB and INPORTB- instructions and in Visual C++ by _outp and _inp. Addresses refer to the "port" address on the bus, see Table 2, which is distinguished from memory addresses on the ISA bus by AEN=0. This signal must be included in the address decoder on the card. The Centronics printer port uses this type of I/O. b) DMA - Direct Memory Access. A smarter device can transfer data directly to memory without the use of the CPU. DMA is requested from the CPU on a special bus line DRQ. The CPU leaves the control of memory addressing, handshaking, etc. to the memory card. In the PC/AT there is a special DMA controller chip which simplifies the construction of the measuring card. A program stores into the DMA circuit a starting memory buffer address and length. When the device is ready for more data, it uses one bus cycle to send a request to the DMA chip, the chip then substitutes for the CPU in generating the next buffer address to the memory circuits to fetch the next chunk of data for the device. However, that first signal from the device to the DMA chip takes one more bus cycle than ordinary Programmed I/O. Thus DMA has not been attractive for disk, LAN, and other performance critical I/O. c) Memory mapped I/O. A measuring card may be placed as part of free RAM then using and strobe pulses instead of and . This technique is used by certain commercial measuring cards to PC:s. Monitor interfaces and frame-grabber cards, connected to CCD-cameras (TV-cameras), often have their own memory which from the programmers point of view just looks like the usual memory. Data is accessed by using pointers like any other variable in the program. The graphics card of the IBM-PC is placed in memory location above 640 kbyte which is the reason why standard DOS programs are limited to 640k memory usage. Older NU-bus based Macintosh computers use this type of I/O with the upper 64 Mbytes of the 32 bits address range reserved for plug-in cards.

Table 1: ISA bus signals and pin assignments Signal name Pin # Function
D0-D7 A0-A19 AEN A9-A2 A31-A12 A11 B14 B13 B12 IRQ3 IRQ4 IRQ5 IRQ6 IRQ7 IRQ9 RESET DRV DRQ1-DRQ3 ALE CLK B11 B25 B24 B23 B22 B21 B4 B2 B18,B6,B16 B17,B26,B15 B19 B28 B20 A1 A10 B30 B27 B8 B1,B10,B31 B3,B29 B9 B5 B7 C11-C18 C1 C8-C2 C9 C10 D1 D2 D3-D5 D7 D6 D9 D8 D11,D13,D15 D10,D12,D14 D16 D17 D18 Data Address lines (A0-A9 for external I/O) Address Enable - high at DMA (Direct Memory Access), low at "programmed" I/O I/O read strobe - computer reads data I/O write strobe - computer writes data Memory read strobe Memory write strobe Interrupt request (Serial port 2) Interrupt request (Serial port 1) Interrupt request (Parallel printer port 2) Interrupt request (Floppy disk adapter) Interrupt request (Parallel printer port 1) Interrupt request (PC bus IRQ2). Rerouting to INT 10 Power-on reset DMA request DMA acknowledge Address latch enable Bus clock (8.3 MHz) I/O parity error indicator Lengthens the read/write strobe time by up to 2.5 s 14.31818 MHz signal used for color graphic boards DMA terminal count 0-wait state indicator signal and power ground

OSC T/C 0WS GND +5V DC +12V DC -5V DC -12V DC 16 bit AT expansion slot D8-D15 SBHE LA17-LA23

data System bus high enable, indicates high byte on the bus Extra address bits 17 to 23 Memory read strobe Memory write strobe Memory chip select 16 for 16 bit memory operation I/O chip select 16 for 16 bit data operation Interrupt request, rerouted trough IRQ2, spare Interrupt request, rerouted trough IRQ2, hard disk Interrupt request, rerouted trough IRQ2, spare DMA request DMA acknowledge DMA request DMA acknowledge Gain master control Ground

IRQ10-IRQ12 IRQ14 IRQ15 DRQ0 DRQ5-DRQ7 +5V DC GND

Table 2: I/O port addresses (with AEN=0) for IBM PC/AT Hex Range Device
000-01F 020-03F 040-05F 060-06F 070-07F 080-09F 0A0-0BF 0C0-0DF 0F0.0FF 1F0-1F8 200-207 278-27F 2F8-2FF 300-31F 360-36F 378-37F 380-3AF 3B0-3BF 3C0-3CF 3D0-3DF 3F0-3F7 3F8-3FF DMA controller 1, 8237A-5 Interrupt controller 1, 8259A Timer, 8254-2 Keyboard I/O Real time clock, NMI mask DMA page register Interrupt controller 2, 8259A DMA controller 2, 8237A-5 Math Coprocessor Fixed Disk Game Parallel printer port 2 Serial port 2 Prototype card Reserved Parallel printer port 1 SDLC, 1-2 Mono display printer adapter Reserved Color Graphic monitor adapter Floppy diskette controller Serial port 1

Usage
System System System System System System System System System I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O

Figure 12.6: ISA bus I/O write and read cycle. Note that valid data is available after has gone low in the write cycle. The output of a transparent latch will have a glitch (wrong bits during a short time), while this is avoided by using a positive edge triggered register.

Figure 12.7: ISA card

12.1

CPU Central Processing Unit

Among the devices that control the bus, the CPU or microprocessor is the master. The interface bus itself continues inside the CPU chip but there are also internal busses that connect various components (see Figure 12.1). - Register - very fast one-word memories. Defines the size of a "word". See.Table 3. - Flags - 1-bits flip-flops. Keeps track of operation conditions. - Counters - such as program counters indicating next memory location of instructions). - ALU Arithmetic Logic Unit (+ - AND OR, ...) - Cache memory - Control logic and instruction decoders. An assembler instruction (machine language) is as a binary number which cause a certain action determined by the instruction decoder in the CPU. The example below illustrates the same program line in different languages. Figure 12.8 illustrates how a binary number can be decoded to e.g. move data from one register to another.
Pascal if n=m then n := n+1; C if ( n == m ) ++n; Fortran if ( n .eq. m ) n=n+1 Assembler #LINE#3: CS:0317 8B46FE mov ax, [bp-02] CS:031A 3B46FC cmp ax, [bp-04] CS:031D 7503 jne #LINE#4 CS:031F FF46FE inc word ptr [bp - ds 6E07] #LINE#4

Note that the CPU register names, size and organization must be known together with the instruction set when programming in assembler language. Table 3: Intel 8086 CPU-family (PC/AT) registers.
Register name AX CX DX BX SP BP SI DI ES CS SS DS IP Flag AH CH DH BH AL CL DL BL Uses in TurboPascal or C (DOS-applications) Calculations, I/O, return values from functions, etc. String counters, shift operations etc. Calculations, I/O, and more Addressing Stack pointer Base pointer Source index - points to strings in the program code. Destination index - for strings Extra segment Code segment - for program code and constants Stack segment - stack position (local variables) Data segment - position of global variables Instruction pointer Status word

Intel 8086/8 (IBM-PC) has 16 bit registers, only allowing 216 = 64 Kbytes direct addressing. 1 Mbytes (20 bit) is addressed using a segment and an offset address. DOS program data arrays in Pascal and C are limited to one 64k segment each. With the 80386 CPU and later, registers are 32 bit long but can also be used as 16-bit units for compatibility reasons.

Figure 12.8: Demonstration of how an instruction in form of a binary number moves data from one register to another. The two leftmost digits are decoded to enable the output of register D, while the right half of the instruction word enables the input gate of register B.

Motorola's MC 68000 - family is together with the INTEL 8086-family the most popular microprocessors today. The old Macintosh (not PowerMac) is based on the Motorola processor while the PC's (486, Pentium,..) uses INTEL-processors. Some MC 68000 features: 32 bit general purpose data and address registers (Figure 12.9). Address space 4 Gbytes with 32 bit address. Only memory mapped I/O - interface cards are placed as part of free RAM. Bus-signals for MC 68008: A0 - A19 20 address lines (1 Mbytes) despite 32 bit registers. D0 - D7 8 data lines AS', DS', R/W' strobe lines DTACK' acknowledge (handshaking) IPL0-IPLK2' 3 interrupt lines NOTE! This is the microprocessor bus, not the backplane bus in the Macintosh. Figure 12.9: 68000/8 registers Electronic constructors use today more likely microcontrollers than microprocessors, since these already contains I/O-ports and perhaps DAC, ADC, etc. on the same chip. Many of these are found in household electronics such as washing machines, microwave oven, CD-players, TV, videos, .....

12.2

Memory:

The memory size of a chip is given in kbit or Mbit while memory addressing is referring to bytes. Each bit in a data word is stored in separate chips or memory banks activated by the same address. Introduced in the early 1950s, core memory consisted of small magnetic rings, that could receive two state of magnetization. Now it has been abandoned in favor of semiconductor RAM. These are (unlike cores) volatile - they loose the information when power is turned off. RAM SRAM DRAM ROM PROM EPROM EEPROM CDROM WORM Flash Random Access Memory Static RAM - "D-flip-flops" Dynamic RAM - "capacitor charge", must be updated regularly. See Figure 12.10. Read Only Memory - programmed when manufactured. Programmable ROM - burns off "wires" in a matrix. Erasable PROM - charges that may be erased with UV-light. Electrical EPROM - erased where it is connected but all bytes are erased at once. 600 Mbyte / 5" (1993) - rather an external memory like a harddisk. Write Once Read Many times "EEPROM" - block wise erase.

To quote the size of DRAM chips is hazardous since it easily makes the text out of date. In 1995 the chip size used for PC-computers were 4 Mbit. 64 Mb were soon in mass production, a number which increases by a factor of 4 each second year. Research institutes produced already 1Gb memories. The limitations are set by the line size (now 0.25 m) and electron tunneling.

Figure 12.10: A simplified DRAM element Figure 12.11: Schematic connection of a memory to the computer bus.

12.3

Interrupt

At an interrupt ("avbrott") the running program is interrupted and the execution of an "interrupt service routine" (ISR) is started. When this program is ready the execution of the original program is continued. Example: When the mouse (or other pointing device) is moved an interrupt is generated by the mouse interface. The computer jumps to a memory resident mouse driver program, usually installed at start-up, and the cursor is redrawn on the screen. Then the execution of the original program is continued. In many measuring situations data are not coming regularly in time, e.g. for radioactive decays. Instead of having the computer locked up waiting for data, the data can generate an interrupt. The running activity (e.g. plotting) is interrupted and an ISR-program reads and stores the data. PC/AT: A special interrupt controller circuit 8259 PIC (programmed interrupt controller) simplifies the interrupt handling versus the CPU. 1. IRQn goes high. 2. If bit number n is =0 in a mask register in the 8259 PIC (port-address hex. 21) an interrupt is requested at the CPU. 3. The program counter is saved by the CPU on the stack memory. The program counter is a register in the CPU showing where the next instruction is in the memory. 4. The program counter is replaced by the interrupt vector n. This vector contains the start address for the ISR-program. The interrupt vectors are placed in the beginning of RAM with memory addresses hex. 20 + 4n (byte). 5. The ISR-procedure must first save on the stack all CPU-registers it may use itself, so no values are changed for the interrupted program. These instructions are automatically inserted by the TurboPascal or Borland C compiler when a procedure or function has the key-word Interrupt 6. The ISR-procedure performs its task. 7. The ISR-procedure informs the 8259 PIC that it is ready by writing hex. 20 to a register with the port-address hex. 20: outportb(0x0020,0x20); in BorlandC. 8. Reset all CPU-registers. Automatically inserted instructions at the end; of an Interrupt specified procedure. 9. The program pointer is restored by the CPU and the old program continues. Installation of an ISR-procedure (see program example): 1. Write the address of the ISR-procedure to the interrupt vector n. setvect(n+8, isr); in BorlandC. 2. Reset bit n to 0 in the 8259 PIC:s mask register in order to activate the interrupt n. outportb(0x21, inportb(0x21) & (~(1 << n)) ); in BorlandC. In the following program example a variable k is incremented in the isr-procedure/function for each hardware interrupt #7. The value is printed on the screen continuously by the main program. Interrupt program example in Borland C:
/* C-program interrupt_test */ #include <stdlib.h> #include <stdio.h> #include <conio.h>

#include <dos.h> unsigned int k; /* global variables */

void interrupt isr(void) { k++; outportb(0x0020,0x20); /* non specific EOI to 8259 PIC }

*/

void main(void) { /* Set interrupt vector entry to isr-procedure IRQ7 interrupt line correspond to 7+8 dos interrupt number */ setvect(7+8, isr); /* Enable interrupt: Get IMR (interrupt mask register) from 8259 and clear mask bit 7 */ outportb(0x21, inportb(0x21) & (~(1 << 7)) ); do { printf("%10u\n",k); } while (!kbhit());

/* Disable interrupt: Get IMR (interrupt mask register) from 8259 and set mask bit 7 */ outportb(0x21,inportb(0x21) | (1 << 7)); } /* main */

Interrupt program example in TurboPascal:


program interrupt_test; Uses Dos,Crt; var k:word; procedure isr; interrupt; begin k:=k+1; port[$20]:=$20; End; {isr}

{non specific EOI to 8259 PIC}

begin (* Set interrupt vector entry to isr-procedure. IRQ7 interrupt line correspond to 7+8 dos interrupt number *) SetIntVec(7+8,@isr); (* Equivalent to: MemW[$0000: (7+8)*4 ] := Ofs(isr); MemW[$0000: (7+8)*4+2] := Cseg; *) (* Enable interrupt: Get IMR (interrupt mask register) from 8259 and clear mask bit 7 *) port[$21]:=port[$21] and (not (1 shl 7) ); repeat writeln(k:10); until keypressed; (* main program part *)

(* Disable interrupt: Get IMR (interrupt mask register) from 8259 and set mask bit 7 *) port[$21]:=port[$21] or (1 shl 7); end.

The ISA bus use edge sensitive triggering, which avoids the problem of retriggering for long interrupt pulses. However, most other systems use level sensitive triggering, which allow several units to use the same IRQ-line with open collector logic. Different methods are used to determine which device that caused an interrupt: 1) Polling "Autovectored polling" (compare SPOLL in GPIB). - IRQ (interrupt request) to the CPU. - Read successively each status register on each connected unit. A flag indicates whether the unit requested interrupt or not. - To each unit there is an interrupt vector, then continue as described for the PC-interrupt. - The IRQ-line is low until all units, requesting an interrupt, has been served and released the IRQline.. 2) Vectored interrupt "full vectored interrupt acknowledgment protocol" - IRQ to the CPU - CPU gives an "interrupt acknowledge" (INTA) - The interrupting unit writes its interrupt vector on the data bus lines, then as for the PC. This is the method used by IBM PC/AT but simplified for the user, thanks to the 8259 PIC-circuit) Several units may be connected in a so called "Daisy chain". Interrupt acknowledge is here not a bus signal but goes into one unit which (by some logic) sends it to the next unit unless it requested an interrupting by itself. The unit closest to the CPU gets the highest priority.

Figure 12.12: Daisy chained vectored interrupt system where the interrupting units are sending an identification code. The device closest to the CPU has the highest priority but passes the interrupt acknowledge (INTA) signal to the next device when it did not request interrupt itself. Upon receiving INTA the second device puts its interrupt vector on the data bus.

4 Digital signal transmission


Microprocessor-based systems are continuing to increase in frequency of operation at an accelerating pace. As a result, local and external busses are also being pushed to higher and higher frequencies. Time allowed for signal "settling" can no longer just be guessed and the bus design must be optimized for minimal data transfer time. This in turn requires that phenomena such as reflections, crosstalk, ground shift, etc., be understood and minimized. Reflection in transmission line networks are basically the result of impedance discontinuities. The common coax-cable RG-58 has a "characteristic impedance" of 50 , meaning that a wave front moving along the line has a voltage / current ration of 50 . For a lossless line (negligible Curesistance) the impedance, which is resistive (real), is , where L = inductance and C = capacitance per unit length. The transmission velocity is about 2/3 of the velocity of light or about 1 meter in 5 ns. If the receiving end has a low impedance (RL=0 in fig.) the wave is reflected with opposite phase so that the sum of incoming and reflected voltage is zero in the shorted point. If the impedance is high (RL=) the summed currents must be zero and the wave is reflected with the same voltage phase. 50-termination gives no refection.

Figure 12.13: Characteristic impedance of a cable and termination. The characteristic impedance on printed boards and for twisted pair cables is about 100 . The type of bus transmission line together with driver and receiving circuits (transceivers) determines the maximum speed and length for the digital transmission on the bus. There are often special driver and receiver chips constructed for different bus-types.

12.5

Other parallel backplane busses

A "backplane" (or motherboard) is used to electrically interconnect a group of circuit boards while providing mechanical support for those boards in a rack or computer box. The connectors (or slots) of a backplane bus are usually wired in parallel. Table 4 list some popular busses and their characteristics.

Table 4: Backplane busses


Bus Band-width Mbyte/s 1.2 5.3 Data width Address width 8 8,16 20 20,24 Sync or Async S S IRQ lines 5E 10E Drivers Comments

PC/XT PC/AT

TTL TTL

IBM PC & compatible

Industry Standard Architecture (ISA) but not according to any standardization commission Accepts PC/XT

EISA PCI

33 132

8,16,32 32 (64)

20,24,32

S S

11P

TTL TTL

"Extended ISA", accepts old AT-cards but wi

New local bus in PC-compatibles, Power Ma others. For multimedia, graphics, disk drives, more. Plug-and-play. More info:

http://www.pcwebopedia.com/PCI.htm
CAMAC 3 24 9 S L TTL/ OC TTL

Instrument bus often used in nuclear and part

NuBus

40

32

32

(IEEE-1196, 1987) used in Macintosh-II. Common data and address bus using 16 Mbyte of the last 1/16 of the 4 Gbyt VERSA Module Eurocards, developed from VERSA-bus. Asynchronous microprocessor of accessories. SUN-3

VME

40

8,16, 32

16,24, 32

TTL

VXI

VME eXtension for Instrumentation. Fast-gro for instrumentation systems, in particular -p systems. 120 A special 3,2 Gbyte/s? Not approved as a standard yet.

Futurebus

Fastbus

160

32

32

ECL

Developed for data collection and control of detector systems in particle and high energy p

E = Edge-sensitive; L = LAM ("look at me"); M = via bus mastership; P = programmable edge- or level-sensitive

Some busses use synchronous data transfer. A "strobe"-signal indicates when data is available but no "acknowledge" of received data. For asynchronous transfer an acknowledge"-signal indicates that data has been received and until then data is available on the bus. Sometimes a separate address bus is missing and a common data and address bus is used (e.g. NuBus in Macintosh II). In general this requires more logic on the I/O cards compared to the example in Figure 12.5. Devices and plug-in cards for the more advanced busses are often using special ASIC (Application Specific Integrated Circuits) for the interface with the bus. Plug and Play: ISA boards usually have to be manually configured via DIP switches and/or jumpers, e.g. to set the base I/O address. Now, with special logics on the plug-in card, one can take advantage of Plug and Play operating systems, such as Windows 95, and use software.

PCI - bus

ISA - bus

Peripheral Component Interconnect 33 MHz (66 MHz ext.) "half the memory bus speed" 32 bit (64 bit ext.) 133 Mbytes/s, (800 Mb/s burst transfer) 49 signals multiplexed address and data address: memory, I/O, configuration 4 IRQ (shareable) +5V, +3.3V, +12V, -12V, GND 5 V (3.3 V) signal level Plug-and-play defined in the standard No DMA but "Bus mastering"

Industry Standard Architecture 8 MHz

16 bit 8 Mbytes/s (64 Mbytes/s) 88 signals separate address and data lines address: memory, I/O 11 IRQ +5V, -5V, +12V, -12V, GND 5 V TTL-signal level often jumper configuration DMA

Bus connectors. Top: ISA-bus,. Bottom right: PCI (32-bit standard), left: 64 bit extension. PC Card (PCMCIA) The Personal Computer Memory Card International Association (PCMCIA) established a standard for credit-card sized PC plug-in interfaces. Originally used for flash memory, but now available for general-purpose and specialized I/O, such as data acquisition and instrument control. PCMCIA is now the expansion standard for notebook computers. History http://pclt.cis.yale.edu/pclt/PCHW/BUS.HTM In 1984 IBM was shipping its PC AT model. The CPU, memory, and I/O bus all shared a common 8MHz clock. This became the basis for all subsequent clone computers. The term "AT" is a registered trademark of IBM, so this I/O bus became known as the ISA (Industry Standard Architecture) bus. Every currently marketed PC supports some ISA interface slots. The bus and matching adapter cards are simple and cheap. ISA is a 16-bit interface, which means that data can be transferred only two bytes at a time. More importantly, the ISA bus runs at only 8 MHz and it typically requires two or three clock ticks to transfer those two bytes of data. This is not a problem for devices that are inherently slow like the COM port (modem), the printer port, the sound card, or the CD-ROM. However, the ISA bus is too slow for high performance disk access and therefore is not acceptable in Servers. It is also too slow for modern Windows display adapters.

In 1987 IBM introduced a new Microchannel (MCA) bus. It had clear advantages over the previous PC bus. It's 10 MHz clock was slightly faster. The cards could be automatically configured with a utility program instead of setting physical switches and jumpers. The bus can transfer four bytes of data at a time and, in some configurations and with some cards, it can transfer data every clock tick. However, the Microchannel itself was expensive, the adapter cards were more expensive, and the technology remained encumbered by IBM licensing. The other vendors developed an extension of the older ISA interface called EISA. An EISA slot contained the older ISA interface, and then an extra socket with additional connections. The user could plug either an old ISA card or a new EISA card into the slot. The newer cards supported a 32-bit data interface and could therefore transfer four bytes of data per operation. However, to remain compatible with the old card, EISA still ran at 8MHz. And the extra logic pushed up the cost of both the EISA system and each adapter card. As the 486 CPU chip became popular, the idea of running I/O devices at 8 or 10 MHz collided with a mainboard that ran everything else at 33 MHz. The first solution was the VESA Local Bus (VLB), which became popular at the start of 1993. VESA is a consortium of companies making displays and display adapters. Desktop machines began to include one or two Local Bus slots to support a high speed video card and, perhaps, one other high speed device. A few vendors produced VESA SCSI adapter cards, or Local Bus LAN adapters. Nevertheless, VESA remained largely a display standard. PCI - The Current Standard The PCI bus was developed by Intel. Although it is mostly known for its CPUs, Intel also has a historical association with Ethernet, multimedia, and some disk interfaces. So Intel was unhappy with the VLB concentration on just the video interface and wanted to develop a general purpose bus. The objective was an interface that was fast and inexpensive. It did not have to be simple (advances in chip technology took care of that) and could achieve a low cost by high volume production. PCI is a 64 bit interface in a 32 bit package. Figuring this out requires a bit of arithmetic. The PCI bus runs at 33 MHz and can transfer 32 bits of data (four bytes) every clock tick. That sounds like a 32-bit bus. However, a clock tick at 33 MHz is 30 nanoseconds, and memory only has a speed of 70 nanoseconds. When the CPU fetches data from RAM, it has to wait at least three clock ticks for the data. By transferring data every clock tick, the PCI bus can deliver the same throughput on a 32 bit interface that other parts of the machine deliver through a 64 bit path. The PCI bus has all the signals of the old ISA bus. This allows a PCI adapter card to emulate older equipment. For example, a PCI disk controller can respond to the same addresses and generate the same interrupts as the older disk controllers that the BIOS understands. However, PCI devices can also be self-configuring and operate in a Plug and Play mode. The PCI bus connects at one end to the CPU/memory bus and at the other end to a more traditional I/O bus. The PCI interface chip may support the video adapter, the EIDE disk controller chip, and maybe two external adapter cards. A desktop machine will have only one PCI chip, and so it will add a number of extra ISA only slots. A server may add additional PCI chips, and extra server slots will usually be EISA. While ISA and EISA are exclusively PC interfaces, the PCI bus is now used in Power Macintosh systems and PowerPC machines. It may be attractive for minicomputers and other RISC workstations. PC Card (formerly PCMCIA) and CardBus Laptop computers typically have two slots for "credit card" adapters. Originally this interface was called "PCMCIA" but that proved too technical for wide acceptance. Today there is an effort to rename the interface as "PC Card." A credit card adapter is much smaller than the adapter cards that plug into the ISA or PCI slots of a laptop computer. They are also more expensive and slower. Although PC Card slots have been

offered as an option in some models of desktop computers, the clear disadvantage over full sized card restricts their use to laptops. The credit card slots are bridged to the main I/O bus of the computer. Laptops have been built to use an ISA, Microchannel, or VESA Local Bus internally. The most modern laptops now come with an internal PCI bus. Credit card adapters can be connected to any of these systems. A full sized card can come with switches or jumpers that can be used to configure its I/O address or IRQ. More advanced cards may be configured with a utility program. Since it is small project to remove the cover from a desktop system and switch cards, a desktop adapter is designed with the assumption that it will stay put. A PC Card adapter is sealed in a metal case. It has no configuration switches. They are easy to insert and remove, since a user may need a LAN card for use in the office and a modem card for use at home or when traveling. The PCMCIA standard was developed late enough to incorporate an early version of "plug and play." In the laptop, each socket is itself an I/O device. A PC Card adapter can be plugged into the system at any time, even when the power is on and a system is running. The socket can query the card for identifying information, and the adapter can be configured by the operating system to use available I/O addresses, IRQs and similar resources. Full support for PCMCIA was too complicated (and required too much memory) to easily fit into the old DOS operating system. Laptops were not an important platform for Windows NT, so it has a very limited support for this architecture. The best PCMCIA support is found in Windows 95. It is possible to plug a new adapter card into a running Windows 95 machine, have the operating system recognize it immediately, and have the system dynamically configure new driver support. The main problem with the PCMCIA bus is performance. Current systems support only a 16 bit interface to adapter cards. Adapter cards transfer data at a rather low clock speed, and there is no provision for Busmaster data transfer. The maximum data transfer rate from a PC Card adapter to the CPU or memory is only 2 megabytes per second. A PCI adapter, in contrast, can burst data at 133 megabytes per second. A 32 bit version of PCMCIA has been created under the label "CardBus". It is currently available only on the most powerful and expensive laptop systems. If you are looking for desktop performance in a portable system, CardBus slots are highly desirable. Current Status (1997) Although the ISA bus may be ten years old, it remains a perfectly reasonable option for devices that do not require highest performance. The consumer-oriented products all come with built-in video and disk adapters. Those are the two components that have the greatest impact on home computers and probably most desktop business machines. There simply isn't any need for a higher speed to support the sound card on a multimedia system, and the CD ROM is the slowest storage device available. The higher end of the consumer market and the machines sold directly to corporations typically have a few slots with a PCI interface. It is nice to have, but in the next year or so these slots may remain empty. The pre-installed devices cover most requirements, and storage expansion is simple and inexpensive using EIDE disks and devices. A Server comes in a full sized floor standing tower. Some servers have room for 18 disk drives. There will certainly be a PCI bus, but there will also be several standard SCSI adapters to connect all the disks, tapes, and CD-ROM units. Every adapter in a dedicated Server should be a PCI card. Some SCSI controller may be built into the mainboard. An external PCI SCSI adapter can provide additional function, cache memory, or RAID support. LAN adapters should plug into the PCI slot. Because the older ISA slots are much slower, there is a strong bias that any function that is not important enough to warrant a PCI adapter is something you probably shouldn't do on a server.

Laptop computers are appearing with an internal PCI bus. This provides high speed support for the internal connection to the video and disk controller chips. It may also provide for PCI cards when the unit is connected to a docking station.

12.6

Parallel busses with "cable interface":

IEEE-488: GPIB - General Purpose Interface Bus, see separate section in this compendium. SCSI: Small Computer System Interface ("skuzzy") - standard for connecting several disks and other units with transfer of large amount of data. SCSI-1: 4 Mbyte/s; SCSI-2: 10 Mbyte/s (20 Mbyte/s at 32 bit transfer) Up to 8 connected units, 6 - 25 m length depending on type of driver. The standard also defines the system architecture (software). Centronics: Standard connecting printers. Simple measuring and control electronics is also readily interfaced since data already is latched. Figure 12.14 shows an example of a Centronics-interface. The connector at the computer end is a 25-pin DIN-connector. Table 5 show the "port"-addresses, data-bits, pin-numbers and signal names. Some IBM-computers use the addresses (hex) 3BC, 3BD, 3BE instead of 378, 379 and 37A. For further details and examples on how to use this port, see: http://www.geocities.com/SiliconValley/Bay/8302/

Table 5: Centronics signals, pin numbers and addresses. Pin Name Address (hex) 37A 378 378 378 378 378 378 378 378 Data bit 0* 0 1 2 3 4 5 6 7 Pin Name Address (hex) 379 379 379 379 37A 379 37A 37A Data bit 6 7* 5 4 1* 3 2 3*

1 2 3 4 5 6 7 8 9
*)

Strobe' Data bit 0 Data bit 1 Data bit 2 Data bit 3 Data bit 4 Data bit 5 Data bit 6 Data bit 7

10 11 12 13 14 15 16 17 18-25

ACKNLG' Busy PE Select Auto feed' Error' Init' Select in Ground

Hardware inverted by the Centronics interface.

Figure 12.14: Centronics port for PC. However, the connection of ACKNLG' to IRQ7 differs among PC:s and is often active low and level sensitive.

12.7

Serial communication

Alphanumeric communication between a computer and devices of moderate speed is most frequently done using the 7-bit ASCII code (American Standard Code for Information Interchange -see Table 8), with bit serial transmission over a single line. Wiring is simplified and in particular more convenient for long distances between computer and device. A modem (modulator demodulator) can convert a serial bit stream to an audio signal, and vice versa, which can be sent vial telephone lines. Although the CPU works with parallel information, data transfer may be serial by using shift registers. A shift register is a set of several D-flip-flops, with each output driving the next input, and with a common clock input (see Figure 12.15). A pulse sequence on the input is clocked, bit by bit, and the result is presented in parallel form on the output (Q0 - Q3). The opposite is also possible. Data in parallel form are loaded to the shift register and shifted out in serial form (not shown in Figure 12.15). Synchronous serial communication use a common clock-pulse line while asynchronous communication use separate oscillators at the transmitting and receiving end. Usually the protocol then contains a "start-bit" to synchronize the data transmission and the two oscillator frequencies must only be set equal enough not to phase out the transmission of one pulse train (data package).

Figure 12.15: Principle of a shift register RS-232 is the most common standard for serial communication and is used by terminals and measuring instruments. The original method, which dates back many decades, consists of switching a 20 mA current - "current-loop" signaling. It is now superseded by the RS-232C standard of 1969 and subsequent RS.232D of 1986. The definition of the pulse train is shown in Figure 12.16. Start-bit + 7 or 8 data-bits + optional parity-bit + 1 (or 2) stop-bits. Logical levels: between +3 and +15 V respectively -3 and -15 V. A data-1 is represented by the negative voltage level! The LSB least significant bit is sent first of the data bits.

Figure 12.16: RS-232 serial data-byte timing waveform. Asynchronous transmission is used with certain transmission speeds "baud-rates" (bit/s): 300, 1200, 2400, 4800, 9600, 19200, ... baud. The start-bit is used to synchronize the transmission. The two independent oscillators at the transmitting and receiving ends need only be roughly equal so that the bits in one 7- or 8-bit data are not out of phase.

The parity bit is used to detect errors in the transmission. At even parity the number of data ones + the parity bit should be even, e.g. for ASCII-C (hex. 43 = 100 0011) the parity bit is set = 1 but not for A and B (100 0001 and 100 0010). Similarly for odd parity. If an incorrect parity is detected the computer may ask for a new transmission of that character.

Example: start-bit + 7 data bits + parity-bit + 1 stop-bit and 9600 baud corresponds to 960 characters/s transmission speed. One screen full of text contains about 1900 characters and takes about 2 s to transfer. Modern (1997) modems transmit data with 56K bps over the telephone lines, using special data compression. More info: http://pclt.cis.yale.edu/pclt/COMISDN/ISDNIDEA.HTM .

This is the communications configuration panel from Windows Terminal. The use of 5 bits per character was used by very early Teletype equipment that was already obsolete in the 1950's, and no device built in the last 20 years has needed more than 1 stop bit. What is Xon/Xoff Flow Control? XON and XOFF are byte values. The Teletype had a device to read punched paper tape. The XON character turned the tape reader on, and the XOFF character turned it off. Long after the last paper tape was burned, computers have maintained the tradition that XOFF can optionally mean "stop sending data," in which case XON means "begin sending again." What is parity? Before modems did error correction, parity provided a simple mechanism to detect characters corrupted by phone line noise. Today it is unnecessary and is typically disabled. So in current use, the correct setting for the COM port is always 8-bit characters, no parity, 1 stop bit, hardware pacing (more about that later) and some speed faster that the native transmission speed of the modem. Table 6: The 10 most important RS-232 signals (of 22) and the corresponding pin numbers on 25pin and 9-pin connectors.
Name Pin # (25) TD RD 2 3 Pin # (9) 3 2 Direction DTE<-->DCE --> <-transmitted data received data Function as seen by DTE

RTS CTS DTR DSR DCD RI FG SG

4 5 20 6 8 22 1 7

7 8 4 6 1 9 5

--> <---> <-<-<--

request to send (=DTE ready) clear to send (=DCE ready) data terminal ready data set ready data carrier detect ring indicator frame (chassis) ground signal ground

Since transmission (TD-2) and receiving (RD-3) are using separate wires one is distinguishing between DTE (Data Terminal Equipment) and DCE (Data Communication Equipment) units. A terminal always looks like a DTE and a modem like a DCE. IBM PC and compatibles look like a DTE but other computers may very well look like DCE! A measuring instrument = ??? Consult its manual! "In general, two RS-232 devices, when (first time) connected together, won't work" (Horowitz-Hill p.723). To add to the confusion: Note that pin #2 (TD) on the 25-pin connector correspond to pin #3 on the 9-pin connector (Table 6). A voltmeter may sometimes help. The TDpin is usually between -12V and -15V when no transmission occurs (see Figure 12.16), while RD is floating. Figure 12.17 shows some common ways of connecting to RS-232 devices. Table 6 summarizes the data for RS-232 and similar standards with the same type of pulse train. RS-232 is limited to point-to-point connections between PC serial ports compared to the other improved standards. Macintosh uses RS-422. According to the RS-232C standard the maximum wire length is 15 m but with opto-couples at both ends ("korthllsmodem") much longer (km) wires may be used. The problem with different ground potentials is eliminated and an extra "safety barrier" between computer and the outside is introduced. Electric faults along the line will kill the optocouples but the computer interface may survive.

Figure 12.17: Different ways of connecting a DTE and a DCE. In particular fig b) and d) are common since only 3 wires are needed (but more often 4 with separate grounds). Table 7: Different Serial standards Serial data standards: Mode Max number of drivers Max number of receivers Max cable length Max data rate (bits/s) Transmit levels min / max Receive sensitivity Load impedance RS-232C/D single-ended 1 1 15m (100m)1 19.2k (115k)1 5V / 15V 3V 3k - 7k RS-423A single-ended 1 10 1200m 100k 3.6V / 6.0V 0.2V >450 RS-422A differential 1 10 1200m 10M 2V min 0.2V >100 RS-485 differential 32 32 1200m 10M 1.5V min 0.2V >60

Output current limit to gnd. Driver Zout min (pwr off)


1)

500mA 300

150mA 60k

150mA 60k

150mA 120k

Most RS-232 ports today are capable of far higher speeds and cable lengths than the rated standard.

Standard serial communication is handled by a chip, called UART (Universal Asynchronous Receiver Transmitter), which implements the required transmitting and receiving, conversion of data from parallel to serial format and vice versa, etc. The Intel 16550 UART is the standard UART found in PCs today. The 8250 UART is found in older PCs. The RS-232 and RS-422 standards specify only full-duplex communication, which means that transmit and receive operations can take place simultaneously (separate lines). RS-485 also specifies half-duplex operation, in which a combined transmit and receive line is used - hence less wires. Devices in a half-duplex network are used in a master/slave configuration, where slaves (devices) transmit only when they are instructed to do so by a master (PC). In process industries and similar noisy environments a 4 - 20 mA analogue instrumentation is often still used together with 20 mA current-loop digital transfer. This requires an extensive of point-topoint wiring since each sensor or instrument must have its own pair to the controlling computer. Fieldbus - "Fltbuss" (see http://hallen.ele.kth.se/~willi/Fieldbus.html ; http://rolf.ece.curtin.edu.au/~clive/Fieldbus/fieldbus.htm. and Elektroniktidningen 1, Jan.1997, p.19.) Fieldbus is a generic-term which describes a new digital communications network which will be used in industry to replace the existing 4 - 20mA analogue signal. The network is a digital, bidirectional, multidrop, serial-bus, communications network used to link isolated field devices, such as controllers, transducers, actuators and sensors. This new standard is on the way and has been so for many years. The reason for the delay is due to the lack of an international Fieldbus protocol standard which will ensure complete interchangeability and interoperability between different suppliers. Several company constellations have been fighting each others to have their ideas (and developed chips) accepted. With consumers becoming impatient many companies have decided to released there own systems which work off different standards. Profibus is widely used in Germany and Europe while DeviceNet is mostly popular in North America. CAN (Controller Area Network http://www.kvaser.se ) is based on DeviceNet. LAN Local Area Network is the generic name of busses used for serial transmission with high speed between e.g. computers. Ethernet: 10 Mbit/s, yellow thick coaxial cable with special connectors which avoids cutting the cable when a new unit is installed. From a "router" or a "hub" a group of computers are connected via "thin wire ethernet (usual coax. cable RG-58 with BNC-connectors) or twisted pair (TP). Information is sent in packages with address and data. All units may "talk", without any "chairman" - but special logic detects collisions. If the bus is busy the device waits a while and tries again. Most computers and workstations at Uppsala University are connected through ethernet. The PCcomputers at "Mttekniklab" are connected with a local thin wire Ethernet. LocalTalk (former AppleTalk) is in particular used for connecting Macintosh and printers. 230 kbit/s. Electrically as RS422 coupled to a transformer which allows both sending and receiving on the same twisted pair of wires (differential driving) but the pulse train is different. Special logic to avoid collisions. USB (Universal Serial Bus) will replace the old RS-232 port on most PCs from 1998 for external communication with modems, instruments, mouse, keybord, etc. The USB is a "real" serial bus with 12 Mb/s speed, where up to 127 units can be connected in a plug-and-play manner. USB 1.1 12 Mbit/s (1.5) USB 2.0 480 Mbit/s RS-232 19.2 kbit/s (0.9 Mb/s)

Dynamic attach - detach, address assignment.

Standard data format - "plug-and-play". Polled bus with a host controller. 1) Token packet - with addressing (controller) 2) Data packet (by sending device) 3) Handshake packet (by receiving device).

More info: http://www.pcwebopedia.com/USB.htm and http://www.intel.com/design/usb/tour/homepage.htm Firewire (IEEE 1394) is also a new serial bus which is supposed to take over the communication with fast units such as video signals and external data storage. The present maximum speed is 400 Mb/s but 1600 Mb/s is on the way. More info: http://www.pcwebopedia.com/IEEE_1394.htm Table 8 : 7 bit ASCII-code for characters. Additional 128 characters are possible with the 8:th bit =1, including the Swedish , but this code is not part of the standard. Email uses a 8-bit iso-88591 character set but "quoted printable" code for is safer to use since some computers masks the 8th bit. The table gives the code in hexadecimal numbers.
hex 00 01 02 03 04 05 06 07 0 1 2 3 4 5 6 7 8 BS 9 HT EM ) 9 I Y i y A LF B VT C FF FS , < L \ l | D CR GS = M ] m } E SO RS . > N ^ n ~ F SI US / ? O _ o DEL

NUL SOH STX ETX EOT ENQ ACK BEL DLE SP 0 @ P ` p DC1 ! 1 A Q a q DC2 DC3 " 2 B R b r # 3 C S c s

DC4 NAK SYN ETB CAN $ 4 D T d t % 5 E U e u & 6 F V f v ' 7 G W g w ( 8 H X h x

SUB ESC * : J Z j z + ; K [ k {

acronym NUL ETX ACK HT

name null end of text acknowledge horizontal tab

acronym SOH EOT BEL LF

name start of heading end of transmit bell line feed

acronym STX ENQ BS VT

name start of text enquire backspace verical tab

FF SI DC2 NAK CAN ESC RS

form feed shift in device control 2 negative acknowledge cancel escape record separator

CR DLE DC3 SYN EM FS US

carriage return data line escape device control 3 synchronous idle end of medium file separator unit separator

SO DC1 DC4 ETB SUB GS SP

shift out device control 1 device control 4 end of transmit block substitute group separator space character

13. GPIB - IEEE 488 Computer Based Measuring Techniques The IEEE 488 interface, often called the "General Purpose Interface Bus" (GPIB), is a standard defined by the "Institute of Electrical and Electronics Engineers" (IEEE) that is used to transfer data between computers and instruments. It was first developed by Hewlett-Packard and is still often called HP-IB in their instrument manuals. The first standard was accepted in 1975 but has since then expanded, last time in 1992 (IEEE 488.2) with SCPI (Standard Commands for Programmable Instruments).
A more detaid description of this "instrument bus" may be found in "Instrument Communication Handbook" from Iotech, Inc., but also in most manuals to instruments with GPIB and catalogues. A GPIB-tutorial from National Instruments catalogue is available at http://www.ni.com (search for "History of GPIB").

13.1

GPIB features

GPIB is a cable based bus with a special connector which allows several instruments to be connected in a star or linear configuration or in any combination. Each cable end have a combined male and female connector to allow parallel connection of cables at any device. Some of the key features of the IEEE 488 interface are: - Up to 15 devices may be connected to one bus. - Total bus length may be up to 20m and the distance between devices may be up to 2m. - One byte (8 bit) digital information is sent in parallel each time. - Message transactions are hardware handshaked using special bus lines. - Maximum data rate is 1 Mbyte/s. The limitations in maximum distance and number of units may be avoided by using special units bus extenders, bus expanders - from various companies. National Instruments has also suggested a new transfer protocol HS488 which allows up to 8 Mbyte/s transfer rate on the usual GPIB-cable.

Figure 13.1: GPIB bus connector with pin numbers and signals. GPIB-signal drivers must be open collector logic which allows for a parallel, multidrop, connection of all devices. Logical TRUE and data 1 is defined for voltages <0.8V and FALSE, data 0 for >+2V (ca. TTL-levels). The 24 bus lines group into 4 categories: Data lines: 8 lines DIO1 - DIO8, used to transfer data and commands, one byte at a time. Note that the numbers start with 1 which correspond to bit 0 (20) in the data byte according to the usual convention. Handshake lines: 3 - used to control (handshake) the transfer of information on the data lines. DAV Data Valid NDAC Not Data Accepted NRFD Not Ready for Data Control lines: 5 - for general control of instruments and bus activities. ATN Attention IFC Interface Clear REN Remote Enable SRQ Service Request EOI End or Identify Ground lines: 8 - for shielding and signal returns (see Figure 13.1).

The connected devices may either be a system Controller ("chairman"), Talker or Listener. A computer has all these three functions. The Controller manages the control lines. There is only one active Controller but this function may be transferred to another computer or device with a special command. An instrument such as a digital multimeter (DMM) must be able both to listen and talk while for instance a printer only need the listen function built into it. The Controller decides, through the users control program, which unit that is addressed as an Talker and what units that are Listeners. The GPIB uses three handshake lines in a "We are ready - Here is data - We have got it" sequence to transfer information across the data bus. This protocol assures reliable data transfer at the rate determined by the slowest Listener.

Figure 13.2: IEEE-488 handshaking

DAV is controlled by the active Talker. Before sending any data, the Talker verifies that NDAC is asserted (pulled down, active low) which indicates that all Listeners have accepted the previous data byte. The Talker then places a byte on the data lines and waits until NRFD is unasserted (released, high) by all Listeners (wired-OR open collector logic). This indicates that all addressed Listeners are ready to accept information. The Talker asserts DAV (active low) to indicate the data on the data bus is valid. Each Listener then releases NDAC when they have received and interpreted the data and when all units have released NDAC the NDAC-line goes high. In other words, data transfers are asynchronous and occur at the rate of the slowest participating device. Addressing: Each device on the GPIB-cable must have an unique address. Maximum 15 devices may be connected but 31 different addresses are possible, from 0 to 30. The address is normally set by DIP switches or by front panel controls. The Controller-card in the computer has also an address which is set at the installation or initialization of the software. GPIB has no separate address bus but uses the data bus and the control line ATN. Control lines: ATN (Attention) is controlled by the Controller and distinguish between data and commands sent on the data lines. When asserted (low) the information on the data bus is a general GPIB command (see Table 13.1), which all devices must read. When it is unasserted (high) the information is instead data to the active Listeners, such as a measured value from a DMM to a computer, or an instrument specific setting instruction to a DMM from a computer program. IFC (Interface Clear) initiates ("cleanup") the bus and the instruments. REN (Remote Enable) sets all connected instruments in remote operation, not allowing manual settings from the front panel. EOI (End or Identify) is used to signal the last byte in a transferred data string. EOI is not always necessary; instead the last byte might be a special character, such as "carriage return" CR or "linefeed" LF. However, according to the new IEEE 488.2 standard EOI should be asserted (low) while sending a LF as the last byte. SRQ (Service Request) is a wired-OR line that is asserted by any instrument that desires the attention of the Controller (interrupt). The instrument may have data to send or some error has occurred such as an illegal received setting instruction. The Controller uses either "Serial Poll" or Parallel Poll" to determine which instrument requested service.

Table 13.1: General GPIB-commands Command Addressing TAD LAD UNL UNT Talker address Listener address Unlisten Untalk x10xxxxx x01xxxxx x0111111 x1011111 adr + 40 adr + 20 3F 5F Device adr becomes a Talker. Device adr becomes a Listener. Inactivate Listeners. Inactivate Talker. 7 bit ASCII hex.code Description

Universal LLO Local lock out x0010001 11 Prevent manual settings from the front panel of all connected instruments. Initiate all devices to "power-on" conditions. Disable parallel Poll response

DCL

Device clear

x0010100

14

PPU

Parallel-poll unconfigure Serial-poll enable

x0010101

15

SPE

x0011000

18

Enable devices to output its serial-poll status byte instead of its normal data when becoming a Talker. Disable the previous response.

SPD

Serial-poll disable x0011001

19

For addressed devices GTL SDC PPC Go to local Selective DCL Parallel-poll configure Group Execute Trigger x0000001 x0000100 x0000101 1 4 5 allow the manual front panel controls. As DCL but for addressed devices. Enable parallel-poll response of an instrument. Allow simultaneous action (triggering) of a group of instruments, such as sampling data. Pass the Controller function to another

GET

x0001000

TCT

Take control

x0001001

device. When the Controller performs a Serial Poll it sends SPE (Table 13.1) to one device at the time, according to the user program. The polled device responds by returning its status byte on the data lines. Bit 6 (DIO7) is TRUE (low) if the device had requested an interrupt (SRQ). The other bits often indicate the reason for the SRQ (see Figure 13.3). A program example in C++ is available at www.fysik.uu.se/kurser/fy660/compendium/GPIB/srq.htm. With a Parallel Poll the Controller can (through the user program) determine which device that requested an interrupt by examining a 8 bit parallel answer. Then SPE or other instrument specific commands may be used to find out the reason. Although Parallel Poll is faster, Serial Poll is more often implemented in various instruments and easier to program.

Figure 13.3: Status register model in IEEE 488.2

13.2

Software

The GPIB Controller in a computer is normally a plug-in card on the computer bus, such as on the PCI or ISA-bus in PC:s. User-friendly control routines for the communication with this card is normally included with the delivery and "low level programming" with commands like those in Table 13.1 is avoided. Three different methods for "high level programming" of GPIB will be discussed here: Program language libraries, Windows DLL and DOS device drivers. The software to a GPIB Controller-card include several functions and subroutines to different programming languages, such as C, Pascal, Fortran and various forms of Basic. These libraries must be linked to the user program after this has been compiled. In a modern C-development environment the library is often listed in a "project file" and the prototypes of the called functions and arguments are specified in an "#include" header file. In TurboPascal the library is listed in the "Uses"-statement. The routine names and parameters varies between different GPIB-card types and their manuals has to be consulted. In Windows an existing program may dynamically link and execute "DLL-functions" during execution. On Macintosh computer such functions are called "Resources". The great advantage is that the programmers and suppliers of commercial measuring and control programs, such as LabView, need not implement a large number of program libraries for different GPIB-cards. Instead they call a DLL-routine from the GPIB-card supplier, which should be installed on the computer. "DOS Device driver" is an old method for communicating with a GPIB-card. A DOS device driver is a memory resident program which is installed at the startup of the computer. It redirects and interprets all file I/O for a particular file name, such as IEEE, just as DOS provides file I/O links for keyboard/screen (CON), printer (PRN) or serial port (COM1, COM2). These DOS I/O files may be accessed from any program, or program language, which can read and write text-files line by line. No special program library need to be linked to the users own program. DOS Device Drivers are not used on modern 32-bit Windows systems (WIN95 and newer). The Virtual Instrumentation Software Architecture (VISA) is a comprehensive package for configuring, programming, and troubleshooting instrumentation systems comprised of VXI, VME, PXI, GPIB, and/or serial interfaces. The VXIplug&play Systems Alliance, founded in 1993, developed one specification for I/O software: VISA. It provides a common foundation for the development, delivery, and interoperability of high-level multivendor system software components, such as instrument drivers, soft front panels, and application software. An instrument driver is a set of software routines that control a programmable instrument. Each routine corresponds to a programmatic operation such as configuring, reading from, writing to, and triggering the instrument. Instrument drivers simplify instrument control and reduce test program development time by eliminating the need to learn the programming protocol for each instrument. In 1998, National Instruments, along with several other companies, formed the Interchangeable Virtual Instrument (IVI) Foundation (www.ivifoundation.org/). One of the most important features of IVI drivers is their ability to allow instruments to be interchanged in a system without modifying the test software. The IVI Foundation has defined five classes of instruments: DMMs, Oscilloscopes/Digitizers, Signal Generators, Switches, and Power Supplies. An IVI instrument driver that conforms to one of these classes may be substituted with another instrument of the same class, regardless of manufacturer or bus connection (GPIB, VXI, or computer based like PCI). The following C++ sample program example uses direct entry to access the 32-bit dynamically linkable library GPIB-32.DLL from National Instruments. This library calls other DLL-files (GPIB16.DLL, GPIB.DLL) more specific for each GPIB-card installed on the computer.

- The frequency is set to 1.23 kHz on a HP function generator with the instrument specific instruction "FR1.23KH" according to the instrument manual. Note that most instruments use decimal point and misinterpret decimal comma. The HP function generator also requires instructions in capital letters, while most other instruments understand both. - The measured value from a Fluke 45 digital multimeter is read by first sending a request for a value "MEAS?" (according to the instrument manual) and then getting the value. - All other settings of the instruments, such as wave form, amplitude, DMM-range, etc., are supposed to be done manually. The HP-function generator has the GPIB-address 17 and the DMM the address 7.

/* gpibdemo.cpp : console application using Microsoft Visual C++.


Uses NI-488.2 direct entry points to GPIB-32.dll driver from National Instruments: http://www.ni.com/gpib/win98_95cr.htm For more info see: files included in the downloadable compat21.zip NI-488.2M Function reference Manual for Win32 can be downloaded from: http://digital.ni.com/manuals.nsf/ Coded by Bengt.Lindgren@Fysik.uu.se Dec.2000 */ #include <windows.h> #include <stdlib.h> #include <math.h> #include <stdio.h> #include <iostream.h> #include "decl-32.h" // type declarations used in GPIB-32.DLL // NI-488.2 Function Prototypes used by this demo program static void (__stdcall *PSendIFC) (int boardID); static void (__stdcall *PEnableRemote) (int boardID, Addr4882_t * addrlist); static void (__stdcall *PSend) (int boardID, Addr4882_t addr, PVOID databuf, LONG datacnt, int eotMode); static void (__stdcall *PReceive) (int boardID, Addr4882_t addr, PVOID buffer, LONG cnt, int Termination); static HINSTANCE Gpib32Lib = NULL; static int *Pibsta; static int *Piberr; static long *Pibcntl; // global handle to DLL // global status variable // global error variable // global count variable

void main(void) { char buf[80]; LONG buflen; Addr4882_t addr[2]={7,17}; // used GPIB addresses float f,v; // Call LoadLibrary to load the 32-bit GPIB DLL. Gpib32Lib = LoadLibrary ("GPIB-32.DLL"); if (!Gpib32Lib) { cout << " The LoadLibrary call to GPIB-32.DLL failed" << endl; exit(1);

} // GPIB library is loaded. Get pointers to the requested functions and globals. Pibsta = (int *) GetProcAddress(Gpib32Lib, (LPCSTR)"user_ibsta"); Piberr = (int *) GetProcAddress(Gpib32Lib, (LPCSTR)"user_iberr"); Pibcntl = (long *)GetProcAddress(Gpib32Lib, (LPCSTR)"user_ibcnt"); PSendIFC = (void (__stdcall *)(int)) GetProcAddress(Gpib32Lib, (LPCSTR)"SendIFC"); PSend = (void (__stdcall *)(int, Addr4882_t, PVOID, LONG, int)) GetProcAddress(Gpib32Lib, (LPCSTR)"Send"); PReceive = (void (__stdcall *)(int, Addr4882_t, PVOID, LONG, int)) GetProcAddress(Gpib32Lib, (LPCSTR)"Receive"); PEnableRemote = (void (__stdcall *)(int, Addr4882_t *)) GetProcAddress(Gpib32Lib, (LPCSTR)"EnableRemote"); if(!Pibsta || !Piberr || !Pibcntl || !PSendIFC || !PSend || !PReceive || !PEnableRemote) { cout << "Unable to access functions in GPIB-32.DLL" << endl; FreeLibrary (Gpib32Lib); exit(1); } /*************** Ready to use GPIB *********************/ (*PSendIFC)(0); // Initialize GPIB controller if ((*Pibsta) & ERR) cout << "SendIFC Error " << *Piberr << endl; (*PEnableRemote)(0, addr); // Set all instruments in remote mode // Set frequency on function generator (address 17) f=1.23e3; buflen=sprintf(buf,"FR%fHZ",f); // HP3324 // buflen=sprintf(buf,"FREQ %f",f); // PM5138 (*PSend)(0, 17, buf, buflen, NLend); // sends buflen characters in buf with \n added and with EOI // Read Fluke 45 DMM (address 7) (*PSend)(0, 7, "val?", 4, NLend); (*PReceive)(0, 7, buf, 80, STOPend); // Receive maximum 80 characters buf[(*Pibcntl)]='\0'; // Use the null character to mark the end of the received string cout << buf << endl; v=atof(buf); cout << v << endl; /*******************************************************/ // Cleanup before exit FreeLibrary (Gpib32Lib); } //end

GPIB communication in LabView.


LabView calls the same GPIB-32.DLL "DLL-routines" as used in the C++ example.

MATLAB
MEX-files ("Matlab Executable") are dynamically linked subroutines produced from C or Fortran source code that, when compiled, can be run from within Matlab in the same way as m-files or built-in functions. Using similar code as in the previous C/C++ program example one can call the GPIB-functions also from a Matlab program.

Excel
Using Visual Basic VBA-macros one can call the GPIB-32.dll driver in a similar manner as in the C/C++-program example. An example may be downloaded from www.ni.com (search on "Calling NI-488.2 Functiuons Directly in Excel").

Some useful NI-488.2 functions


The full NI-488.2M Function reference Manual for Win32 can be downloaded from: http://digital.ni.com/manuals.nsf/ void DevClear (int boardID, Addr4882_t address)
boardID: The interface board number address: Address of the device you want to clear DevClear sends the Selected Device Clear (SDC) GPIB message to the device described by address. If address is the constant NOADDR, then the Universal Device Clear (DCL) message is sent to all devices.

void EnableLocal (int boardID, Addr4882_t *addrlist)


boardID: The interface board number addrlist: A list of device addresses that is terminated by NOADDR EnableLocal sends the Go To Local (GTL) GPIB message to all the devices described by addrlist. This places the devices into local mode. If addrlist contains only the constant NOADDR, then the Remote Enable (REN) GPIB line is unasserted.

void EnableRemote (int boardID, Addr4882_t *addrlist)


boardID: The interface board number addrlist: A list of device addresses that is terminated by NOADDR EnableRemote asserts the Remote Enable (REN) GPIB line. All devices described by addrlist are put into a listen-active state.

void ReadStatusByte (int boardID, Addr4882_t address, short *result)


boardID: The interface board number address: A device address result: Serial poll response byte ReadStatusByte serial polls the device described by address. The response byte is stored in result.

void Receive (int boardID, Addr4882_t address, void *buffer, long count, int termination)
boardID: The interface board number address: Address of a device to receive data count: Number of bytes to read termination: Description of the data termination mode (STOPend or an EOS character) buffer: Stores the received data bytes Receive addresses the device described by address to talk and the interface board to listen. Then up to count bytes are read and placed into the buffer. Data bytes are read until either count bytes have been read or the termination condition is detected. If the termination condition is STOPend, the read is stopped when a byte is received with the EOI line asserted. Otherwise, the read is stopped when an 8-bit EOS character is detected. The actual number of bytes transferred is returned in the global variable, ibcntl.

void Send (int boardID, Addr4882_t address, void *buffer, long count, int eotmode)
boardID: The interface board number address: Address of a device to which data is sent buffer: The data bytes to be sent count: Number of bytes to be sent eotmode: The data termination mode: DABend, NULLend, or NLend Send addresses the device described by address to listen and the interface board to talk. Then count bytes from buffer are sent to the device. The last byte is sent with the EOI line asserted if eotmode is DABend, or sent without the EOI line asserted if eotmode is NULLend. If eotmode is NLend then a new line character ('\n') is sent with the EOI line asserted after the last byte of buffer. The actual number of bytes transferred is returned in the global variable, ibcntl.

void SendIFC (int boardID)


boardID: The interface board number SendIFC: is used as part of GPIB initialization. It forces the interface board to be Controller-In-Charge of the GPIB. It also ensures that the connected devices are all unaddressed and that the interface functions of the devices are in their idle states.

void TestSRQ (int boardID, short *result)


boardID: The interface board number result: State of the SRQ line: non-zero if the line is asserted, zero if the line is not asserted TestSRQ returns the current state of the GPIB SRQ line in result. If SRQ is asserted, then result contains a non-zero value. Otherwise, result contains a zero. Use TestSRQ to get the current state of the GPIB SRQ line. Use WaitSRQ to wait until SRQ is asserted.

void WaitSRQ (int boardID, short *result)


boardID: The interface board number result: State of the SRQ line: non-zero if line is asserted, zero if line is not asserted WaitSRQ waits until either the GPIB SRQ line is asserted or the timeout period has expired. When WaitSRQ returns, result contains a non-zero if SRQ is asserted. Otherwise, result contains a zero. Use TestSRQ to get the current state of the GPIB SRQ line. Use WaitSRQ to wait until SRQ is asserted.

14. Analog and digital. D/A and A/D-converters (DAC - ADC)


Digital-to-analog and analog-to-digital converters serve as the link between the digital world inside the computer and the analog signals to actuators and from sensors. A simple D/Aconverter may be constructed with weighted resistors in a summing amplifier based on a opamplifier. A more elegant and better solution is to use a "R-2R ladder" (Figure 14.1).

Figure .1: 4-bit DAC based on a R-2R ladder. The current through any of the 2R from a single Dn=V (with the others =0) is V/3R, but this current is then successively halved at each junction on its way to the opamp. Hence the necessary weighting by 2, corresponding to the binary number (D3 D2 D1 D0) is achieved. Rf determines the final amplification. The output voltage is negative but may be reversed with yet another opamp. A "multiplying DAC" is a D/A-converter with variable external reference voltage (or current). Output voltage = reference voltage multiplied with the digital number on the input. This is achieved in Figure 14.1 by connecting the inputs to a reference voltage and ground respectively, via FET-switches controlled by the digital signal. DAC specifications: Number of bits, resolution, and voltage range. Offset error, linearity etc. Speed: Slew-rate and settling-time. Typical voltage range is from 0 to +10V with 12 bit resolution and a settling time of about 5 s. Three different and often used ADC principles will be discussed: parallel-encoded, successive approximation and dual-slope. Other circuits are also useful such as VFC / VCO - Voltage to Frequency Converters / Oscillators. Special voltage controlled oscillators can convert a voltage to a square wave and the pulses are then counted during a known time interval. The output from the counter gives the binary information. May be useful when the information has to be transmitted in serial form (single wire) over long distances. ADC characteristic specifications are similar as for the DAC but "speed" is discussed in terms of conversion rate. Parallel-encoded ADC (Flash-ADC) has one comparator for each value defined by the resolution. Hence, an ADC with 3 bit resolution has 7 comparators which are encoded (see Figure 14.2). They are very fast (3-10 ns) but expensive and with a relatively low (4-10 bit) resolution. Typical application is in digital oscilloscopes.

Figure .2: Parallel-encoded ("flash") ADC. The priority encoder 148 generates a digital output corresponding to the highest comparator activated by the input voltage Vin. Ramp ADC. A counter chip counts up the input to a D/A-converter (see Figure 14.3). The DAC output is compared with the Vin voltage using a comparator. When the DAC voltage is higher than the "unknown" voltage the counter is stopped via an enable or gate input on the counter chip. Alternatively the clock pulse to the counter is gated with an AND. Next conversion is starting from 0 again (see Figure 14.4).

Figure .3: The principle of the RAMP and SERVO-ADC. The zenerdiode on the comparator output ensures approximate TTL-levels even when an ordinary opamp is used with 12V driving. Servo ("fljning"). A modification of the RAMP-ADC where the comparator output controls if the counter should count up or down. The least significant bit (LSB) will flip up and down all the time which requires special care in the software. Successive approximation ADC. The same construction, with a DAC and a comparator, as above but using a binary search method("intervallhalvering"). a) First the highest bit (2n) is tried. If VDAC < Vx keep it (DAC=2n). b) Then try the next bit (DAC + 2n-1). If VDAC < Vx keep it (DAC=DAC+2n-1), else not (DAC=DAC). And so on until all bits are examined. For n bit resolution n values are tested. The counter in Figure 14.3 is replaced by special control logic which performs the described search. Figure 14.4 compares the three different methods. Successive approximation is perhaps the most common ADC. It is cheep, relatively fast (1-50 s) and has a relatively high resolution (12-16 bit).

Figure .4: Illustration of the three search methods for ADC based on a DAC and a comparator. Dual slope ("dubbelramp") ADC: First the "unknown" voltage V is integrated during a certain time tref (a certain number of clock pulses from a accurate oscillator). Then a negative reference voltage Vref is integrated until the integral value is zero again. The time t for this is related to V by V tref = Vref t. The digital information comes from the number of clock pulses presented on a counter. High accuracy, noise is reduced by the time integration, a high resolution (many bits) is easily achieved (by longer integration time) but slow (ca 30 ms for 20 bit). This type of ADC is used in digital multimeters (DMM). Some more advanced DMM can set the "rate" (e.g. the dual-slope integration time), which affects the resolution of the instrument. Additional integration of the input signal before conversion is often also possible to set. S/H Sample and hold. While the ADC is converting the input voltage should not be changed. A sample and hold circuit uses a FET switch and the charging of a capacitor (Figure 14.5). A short pulse opens the switch transistor and the capacitor is momentarily charged to the input voltage - the input voltage is sampled. When the switch is closed the voltage over the capacitor is kept until the next sampling pulse is given after the ADC conversion is ready. Figure .5: Sample-and-hold amplifier

1. Noise 1) Johnson-noise and shot noise = "white" noise - always present. Results directly from the random motion of electrons in resistive components and the fact that electricity is quantized, respectively. Amplitude and phase are randomly distributed with the same probability for all frequencies. 2) 1/f - noise - found in particular in components that are granular in structure. Drift, due to self heating or aging, is also a form of low-frequency 1/f noise. Avoid DC measurements when working with very small signals. 3) Interference noise - e.g. 50 Hz and its harmonics, or electromagnetic interference (EMI) from radio, TV transmitters, etc. 4) Impulse noise - from the switching transients of digital circuits or thyristors/triacs. Signal to noise ratio is defined as SNR = 20 log10 (Vsignal / Vnoise) dB. Interference noise is reduced with notch filters. Bandpass filters can reduce the other types since Vnoise is integrated over all frequencies. For repetitive signals the noise may also be reduced with phase locked amplifiers (Lock-in amplifiers - see Figure 14.6 or with repetitive additive sampling of the signal. With these techniques signals buried in the noise are possible to detect.

Figure .6: Block diagram of a typical lock-in amplifier system. Proper shielding and grounding is also very important, in particular to avoid interference noise. Remember that a ground line has a resistance and a current flowing to the ground can generate a signal on an amplifier input (Figure 14.7). Avoid "ground loops".

Figure .7: Ground paths for low-level signals. a) Wrong! The second amplifier (power amplifier) may cause fluctuations on the first signal amplifier and the load current return makes the case ground fluctuate.

b) Right. IR drops along the leads to the power stage do not appear on the low-level (first) amplifier.

2. Isolation amplifiers Another solution to serious ground problems is the use of isolation amplifiers, also mandatory for medical electronics in order to isolate any instrument circuits powered from the ac power lines. Currently available isolation amplifiers use one of three methods: (1) Transformer isolation of a high frequency carrier signal, which is either frequency-modulated or pulse-width modulated with the relatively low bandwidth signal (dc to 10 kHz or so). It may also be based on the previously mentioned VFC / VCO - Voltage to Frequency Converters / Oscillators. The analog signal is converted to a frequency which after the isolation barrier is converted back to an analog signal by a frequency-to-voltage converter (phase-locked loop). (2) Capacitively coupled isolation of a high frequency carrier signal which is frequency modulated as in (1). (3) Optically coupled signal transmission via an LED at the sending end and photodiode or phototransistor at the receiving end. No high-frequency carrier is needed, since signals all the way to dc can be transmitted optically (see Figure 14.8).

Figure .8: Opto-coupled analog isolation amplifier. Note the feedback photodiode arrangement that cancels nonlinearities in both LED and photodiode.

15 Signal analysis Computer Based Measuring Techniques

1. Definitions: Sampling time: Sampling interval t: Sampling interval t: Aperture: 2. Sampling theorem: The highest measurable frequency is determined by half the sampling frequency, also called the Nyquist or folding frequency. Higher frequencies are folded at the Nyquist frequency and seems to be lower ("aliasing")! Hence, if a function f(x) is known in N equidistant points (x=0,1,..,N-1) the highest observable frequency is k N/2 (in units of 1 / sampling time). At least two samples are needed per period. In the figure below with N=4, the frequency corresponding to k=3 (3 periods on the sampling time) has the same sampled values as for k=1. Total measuring time of a signal. Time between two samples ("avlsningar av signalvrdet"). 1/t, the number of samples per second. Time window for one sample, during which the signal is time averaged.

3. Signal analyses and Fourier methods A function f(x) which is periodic with the period N, can be expressed as a sum of cos- and sin-terms, a Fourier series: (eq.1) Using the orthogonal relations between cos- and sin-functions one obtains: (eq.2) If the highest frequency (k/N) component in the periodic function f(x) is limited by k<N/2 (the sampling theorem) the integrals may be replaced by discrete summations: (eq.3) A direct calculation (DFT) of the Fourier coefficients from eq. (3) is very time consuming and proportional to N2. By using relations between cos , cos 2, cos 3, ... the calculations becomes much faster. A particular algorithm is called "Fast Fourier Transforms" (FFT) with a calculation time proportional to N log(N) (J.W.Cooley, P.A.W.Lewis and P.D.Welch, IEEE

Transactions on Educations E-12 (1969) 27). Today specially designed FFT-processors are used for signal analyses in real time. Most FFT programs works with N = 2r values, where r is an integer, and with the complex Fourier transforms: FFT IFFT ("inverse" FFT)

(eq.4) where t=k/N, k=0,1,...N-1. NOTE! There is no standard for in which transform the normalization factor 1/N should be. Most commercial programs (e.g. MATLAB) defines the Fourier transform as in eq. 4 which is opposite to eq. 2 and 3. Unfortunately manuals seldom give any information about this. Test unknown programs always on this point. For a real function f(t) one can show that (folded) in the Nyquist frequency N/2 : , that is the complex conjugate mirrored

(eq.5) For a function sampled in N points during the time T the first value from a FFT corresponds to the frequency = 0, the 2:nd = 1/T, 3:rd = 2/T, and so on with a folding in = 1/(2T).

Example: yi = sin(10i) + sin(30.5i) for i=0,1,...127 and yi = 0 for i=128,...1023, where = 2/128 correspond to 1 period on 128 samples.

Matlab commands y=sin(10*x)+sin(30.5*x); Y=fft(y); semilogy(abs(Y).^2); semilogy(abs(fft(y,1024)).^2);

Figure .1: Power spectrum (log-scale) of signal with 128 samples (top) and where zeros has been added to achieve 1024 data points totally (top). The first 128 values contains two sin-terms with 10 and 30.5 periods on this interval. Figure 15.1 shows the intensity spectrum ("power" spectrum, ) from a FFT on only the first 128 values (top) and on all 1024 values (bottom). The full FFT range, including the mirror half has been plotted. In the top figure the 10 frequency component is a "delta-function" while the non-periodic 30.5 component (not a full number of periods on the observation interval or sampling time) shows a "broad distribution". If the resolution of the FFT is increased artificially, by extending the observation time 8 times with zero-data values, the two components, 10 and 30.5 , looks the same (30.5 is actually periodic now - bottom figure). If only each 8:th point of the bottom figure data is plotted, the same result as in the top figure is obtained (see Figure 15.2). For the periodic 10 component the FFT samples only the top and the minimum values in the side lobes ("ringningar").

Figure .2: Expanded FFT of 1024 data points with each 8:th value marked. The origin of the side lobes is understood by regarding the function y(t) = f(t) w(t), where f(t) is the original signal and w(t) a window function w(t) = 1 for 0 t T ; = 0 else. According to the convolution theorem: (eq.6) where capital letter indicates the Fourier transform to the frequency domain and * denotes convolution. The Fourier transform of the rectangular function window function w is the well-known , which cause the side lobes.

Other window functions then the rectangular one are regularly used in signal analysis in order to damp out the effects of the Gibbs phenomenon resulting from truncation of an infinite series (Table 15.1). See also the MATLAB examples for further illustrations and comments. An optional "signal Toolbox" to MATLAB have a number of useful window functions. Fourier transforms are also possible to calculate in Excel - see example. Table .1: Some often used window functions Window (Matlab) Description w[k]=..., k=1..N

Boxcar

rectangular (=1)

Triang

Hanning

Hamming

Kaiser

Spherical Bessel function with parameter . =0 "rectangular window" larger better side lobe reduction but broader lines. Here =7.

4. Digital filters A general recursive digital filter in the time domain is written as: (eq.7) Example a: " 3 points average"

Example b: 1:st order lowpass "RC" filter with time constant according to

Design of digital filters are often based of Fourier transforms of the frequency response. 5. Correlation - autocorrelation The correlation function is defined as: (eq.8) If g and h are the same functions we have autocorrelation. Eq.8 looks much the same as the convolution integral and similar to the convolution theorem we have for the Fourier transforms: F( ) = G( ) H*( ) and for real functions F( ) = G( ) H(- ). In particular, the Fourier transform of the autocorrelation is equivalent to the powerspectrum of the function.

View FFT with MATLAB

Download demofft.m (1 kB) (Matlab has also "fftdemo") fftdemo.xls (229 kB)

FFT with Excel

16. Data analysis 16.1 Basics

New recommendations for data treatment and presentation has been defined by BIMP (Bureau International des Poids et Mesures - Internationella byrn fr mtt och vikt) and other International Organizations for Standardization (ISO). A review in Swedish is given by Jan Lindskog: "Mtvrdesbehandling och rapportering av mtresultat" (Sandtorp Consult AB). See also: http://physics.nist.gov/cuu/Uncertainty/ . Here we only summarize certain points concerning the uncertainty in measurements and give some practical advises on Least Square Fits to different linear or non-linear models. Examples are given in MATLAB and Excel. The accuracy of a measurement may be seperated into two concepts: (i) high precision, which not necessary means a correct value but where a calibration of the instruments may improve, and (ii) the trueness which is associated with the statistical distribution and treatment of the data. A third concept is the resolution which is depending on the design of the instruments and experiments. The new norm distinguishes between measurement error (mtfel) and uncertainty (mtoskerhet): Errors: Uncertainties: should be corrected should be given e.g. a calibration error of an instrument. e.g. statistical distribution of measurement + imported uncertainties in calibration etc + estimated other "errors".

The precision of a measurement or of an instrument is estimated by repeating the measurements several times and treat the values statistically. An average (mean) value and its distribution width "standard deviation" may be calculated. The following formulas assumes that the values follows a Normal (or Gaussian) distribution. Mean value of n measured values xi: (eq.1)

Uncertainty (standard (eq.2) deviation) in a single measured value: (eq.3) Uncertainty in mean value:

16.2

Expanded measurement uncertainty

The Student t-distribution accounts for the limited number of measurements. The "degree of freedom" (antal frihetgrader) is defines as the number of measured values (samples) minus the number of parameters in the model. For a determination of a mean value the number of parameters is one (same as the nominator inside the square root of eq.2). The standard uncertainty u(x) is then multiplied by a coverage factor according to the table below.
Degree of freedom

10

Confidence level

68.27 % 95.45 % 99.73 %

1.84 13.97 235.8

1.32 4.53 19.21

1.20 3.31 9.22

1.14 2.87 6.62

1.11 2.65 5.51

1.09 2.52 4.90

1.08 2.43 4.53

1.07 2.37 4.28

1.06 2.32 4.09

1.05 2.28 3.96

1.00 2.00 3.00

The standard uncertainty is usually given within parentheses after the value: 1.234(12) Expanded uncertainty is give with notation together with the coverage factor and the confidence level: 1.234 0.030 ; coverage factor 2.5; confidence level 95%.

16.3

Combination of measurement uncertainty:

y = f(x1, x2, ...xn), xi are uncorrelated parameters with the uncertainty u(xi). Differentiate: (eq.4) Special case: Differentiate the logarithm : (eq.5)

16.4

Least Square Fits - LSQF

Measured values (xi ; yi ui ) Model y = f(a; x) where a = [a1, a2, ...] are parameters to be fitted to the measured data. Find the minimum of the sum of squares: (eq.6) by varying the parameters a. If the uncertainties ui are different, minimize the weighted sum of squares: (eq.7) Set all derivatives of ak to zero: (eq.8) These gives a set of equations which must be solved. The choice of model function depends on the physics of the measuring system. As an example let us consider the temperature calibration of a sensor output signal. The resistance of a metal wire varies with temperature as (chapter 2.3): R = R0 {1 + (T - T0)}, where R0 is the resistance at the temperature T0. Hence, the model to fit is a straight line y=a+bT. Many programs for data analyses and some pocket calculators can perform a linear regression which solves the least square fitting of the parameters a and b from which R0 and are deduced. The temperature dependence of the thermoelectric voltage of a thermocouple (chapter 2.2) may often be approximated by a second order polynomial U(T) = a0 + a1T + a2T2. This model is also linear in the fitting parameters a0, a1 and a2, though the temperature dependence is not linear. The temperature dependence of a thermistor (chapter 2.4) is described by: , which is a non linear model in the parameter . However, taking the logarithm of the resistance gives a straight line dependence y = a + bx, with y=lnR, x=1/T, a=lnR0 and b=. The function is an example of a non linear model in the parameters B and C while is a linear model if A and B are to be fitted. With linear models eq. 8 describes a linear system of equations to be solved, while non linear models requires some kind of linearization and iterations. A Linear model A function linear in the parameters a can be written as: (eq.9) (eq. 10) In matrix form (eq.11) this linear equation system is:

If ui are true standard deviations in a Normal distribution one can show that "chi2": 2 = S / (n-p) (eq.12) has the expectation value 1 with a standard deviation of (eq.13) n = number of measured values and p = number of fitted parameters. 2 >> 1: bad LSQF due to e.g. a badly chosen model function f. 2 << 1: "too good". Probably to big ui or too many parameters in the model. The uncertainty of the parameter ak is obtained by: (eq.14) if the non-diagonal elements of the "correlation matrix" are neglected. If all measurement uncertainties are equal, they cancel in Eq. (14) and the weight factor may be omitted in the summation. However, the expectation value of 2 is no longer 1. B Non-linear model The equation system (Eq. 8) becomes non-linear and is solved by linearizing the problem and iterating for a converged solution. Estimate start values A for the solution of the parameters. Taylor expand the model function and truncate after first order terms: (eq.15) (eq. 16) This is a linear equation system with k = ak - Ak (eq.17) From the solution new parameters ak = Ak + k are calculated and the procedure is iterated until for instance 2 is not changed more than some convergence value, or a maximum number of iterations is reached. The parameter uncertainty is give as before by: (eq.18) Numerical estimates of the partial derivatives in Hkl and bk (Eq. 17) are often preferred, in particular if the model function include recursive formulas, matrix diagonalization, etc. Example: LSQF to a line f(x) = q x + p ("linear regression") (All ui = 1)

(eq.19) (eq.20) (eq.21) (eq.22)

Fitting of parameters of a model to experimental data may also be formulated as a over-determined equation system, where each equation corresponds to a measurement. With the linear model (eq. 9) the equation system is written in matrix form as: (eq.23) This over-determined equation system is solved in a least squares sense by multiplying both sides with the transposed matrix At from the left, which reduces to the same equation system as in Eq. 11. (eq.24) This is a particular useful method in MATLAB where the equation system (23): G*a=y is solve using back-slash: a=G\y. Example: Calibration of a thermistor resistance R = R0 exp( /T) temp. / C 18.9 24.7 36.6 48 57.7 65.6 72.2 R in ohm 6803.9 5053.4 3005.4 1886.9 1302.1 976.5 770.8 u(R) 4.2 3.3 2.3 1.7 1.5 1.3 1.2 x = 1000/T 3.4258 3.3591 3.2300 3.1153 3.0239 2.9533 2.8969 lnR 8.8253 8.5278 8.0082 7.5427 7.1717 6.8840 6.6474

a)

Non-weighted linear regression used on ln R = ln R0 + /T or y = x + A, with x=1/T and A=ln R0 gives = 4090(17) and A = -5.199(52). which gives R0 = 0.0055(3). A non-linear LSQF directely to R = R0 exp(/T), without using weights, gives =4129 and R0=0.0049 which is outside the uncertainty limits quoted in a). The measuring uncertainties of R (u(R) in column 3) correspond essentially to a constant relative uncertainty 0.05% of R. Hence all y-values in a) will have the same uncertainty (dy = dR/R) and the LSQF need not be weighted. However in b) all terms in the sum of squares should be weighted to 1/u2(R) which then gives: =4090 and R0=0.0055 in agreement with a).

b) c)

Example Sallen and Key filter: The output voltage of a 2:nd order Sallen and Key filter (chapter 7) is given by: where fc is the cutoff frequency (-3dB). The table below contains some experimental data obtained with U0 1V. f / Hz 100 200 300 500 700 1000

U/V

0.9493

0.8284

0.6831

0.4379

0.28423

0.16296

a) Assuming U0=1V, the equation for the frequency response can be rewritten as: If these z-values are calculated for each measured value, the mean value and its uncertainty are obtained by eq. 1 and 3. Differentiating gives . With Excel the mean value is calculated using the function AVERAGE(Z:Z) and the standard deviation in a single measured value (eq.2) by STDEV(Z:Z). Hence, with eq.3: STDEV(Z:Z)/SQRT(COUNT(Z:Z)). In a Swedish version of Excel the corresponding function names are: MEDEL(Z:Z) and STDAV(Z:Z)/ROT(ANTAL(Z:Z)). In Matlab you use mean(z) and std(z)/sqrt(length(z)). Numerical results: z=193061, u(z)=2919 and fc = 439.4(1.4) Hz. b) From the graph it is obvious that in particular low frequency data deviates from the average value. This is due to the assumption on the input voltage U0=1 V. You may instead rewrite the data and the equation as: which corresponds to a straight line: A LSQ-fit to this equation gives a=1.00155; u(a)=0.00051 b=5.1349E-06; u(b)=1.1E-09 fc = 441.64(12) Hz.

c) As a third alternative you may directly use the original non-linear formula and LSQ-fit U0 and fc using SOLVER ("PROBLEMLSAREN") in Excel or fmins in Matlab. See attached examples. The results (without uncertainties) are: fc = 441.96 Hz U0 = 0.998 V As with the Thermistor example the three different obtained values for fc is explained by the fact that no weighting of the sum of squares have been used, hence assuming all data to have the same weight, which is not the case rewriting the data in different forms.

Example AC-voltage amplitude: Plug-in-cards with analog converters can usually not measure ac-voltage amplitudes or rms-values directly. However, if the sampling frequency is high enough (fulfilling the sampling theorem given in chapter 15.2), data can be fitted to: f(t) = A sin(t+) = a sin(t) + b cos(t), with A2=a2+b2 which is a linear model, provided the frequency of the signal is known. The two leftmost columns of the table show data from a 500 Hz signal sampled with 0.3 ms intervals (3.3 kHz). t / ms 0 0.3 0.6 0.9 1.2 y/V 1.130 0.207 -0.885 -1.260 -0.608 sin( t) 0 0.809017 0.951057 0.309017 -0.58779 cos( t) 1 0.587785 -0.30902 -0.95106 -0.80902 a*sin( t)+b*cos( t) 1.139611 0.216718 -0.88484 -1.25691 -0.59275

The solution to the least squares fit is given by the system of equations (11): . The inverse of the coefficient matrix: is obtained by inv(H) in Matlab or in Excel by MINVERSE() in Excel and the solution by MMULT() (Swedish Excel: MINVERT and MMULT). See the downloadable example files: http://www.Fysik.UU.SE/kurser/fy660/compendium/Lsqf/lsqfdemo.m http://www.Fysik.UU.SE/kurser/fy660/compendium/Lsqf/lsqfdemo.xls Solution: a=-0.560 and b=1.140 which gives A=1.270 V. The measuring uncertainty in A is obtained by combining those of a and b. First calculate the model function values (rightmost column) and "chi2" 2=0.000143 (eq. 12). Then the uncertainties of a and b are obtained by eq. 14 giving u(a)=0.0086 and u(b)=0.0070. Finally , hence A = 1.270(9) V. View Least square fits with MATLAB Least square fits with Excel - linear model Least square fits with Excel - non linear model Download lsqfdemo.m (5 kB) lsqfdemo.xls (482 kB) or lsqfdemo.zip (91 kB)

Glossary - Ordlista med frklaringar


FYSIKUM 1998.
a b c d e f g h i j k l m n o p q r s t u vw xyz |
Absolut givare Absolute sensor

English sort.

Sensor which gives the absolute value. Absolute temperature sensor which generates 1 A/K.

AD590

AD590

Aktivt filter

Active filter

A frequency-selective circuit consisting of active devices such as transistors or op-amps coupled with passive components, R and C. Filter where the coil (L) is substituted for an operational amplifier.

Amplitud (Toppvrde)

Amplitude

Amplitudmodulering (AM)

Amplitude modulation (AM)

A communication method in which a lower frequency signal modulates (varies the amplitude of a higher frequency signal (carrier).

Analog

Analog

Characterized by a linear process in which a variable takes on a continuous set of values.

Analog-till-digital omvandlare

A/D, ADC

Analog-to digital converter or conversion. A process whereby information in analog form is converted into digital form.

Anod

Anode

The positive terminal of a diode and certain other electronic devices.

Anrikning

Enhancement

In a MOSFET, the process of creating a channel or increasing the conductivity of the channel by the addition of charge carriers.

Anslutning

Terminal

The external contact point of an electrical or electronic device. (Connection)

Arbetspunkt

Q - point

The dc operating (bias) point of an amplifier specified by the voltage and current values.

ASCII-kod

ASCII-code

American Standard Code for Information Interchange

Astabil vippa

Astable flip-flop

Device with two non-stable states. Can be used as an oscillator.

Asymptotisk lutning

Roll-off

The decrease in the gain of an amplifier above or below the critical frequencies.

Audio

Audio

Related to the frequency range of sound waves that can be heard by the human ear.

Avkoda

Decode

Signals on a few lines control the flow of information over a large number of lines.

Avlnkning

Deflection

Backspnd

Reverse bias

The condition in which a pn junction blocks current .

Baffel

Baffle

Plate that holds one (or several) loudspeaker.

Bandbredd

Bandwidth

The characteristic of certain electronic circuits that specifies the usable range of frequencies that pass from input to output. Frequency interval where F (=Uout/Uin) never changes more than +/- 3 dB.

Bandpassfilter

Band-pass filter

A type of filter that passes a range of frequencies lying between a certain lower frequency and a certain higher frequency.

Bandspelare

Tape recorder

Bandsprrfilter

Band-stop filter

A type of filter that blocks or rejects a range of frequencies between a certain lower and higher frequency (Notch filter).

Bandsprrfilter

Notch filter

See Band-stop filter.

Barrir potential

Barrier potential

The effective voltage across a pn junction.

Bas

Base

One of the semiconductor regions in a bipolar junction transistor.

Bashgtalare

Woofer

Handles low range frequencies in a loud speaker system.

Basreflexlda

Bass-reflex enclosure

Open loud speaker enclosure.

Belastning

Load

Belastningslinje

Load line

A straight line on the characteristic curve of an amplifier that represents the operation range of the amplifier's voltages and currents .

Besselfilter

Bessel filter

A type of filter response having a linear phase characteristic and less than 20 dB/decade/pole roll-off.

Binrkodad decimal

BCD

Binary-coded Decimal. A code for representing decimal digits in a binary format.

Bipolr

Bipolar

Characterized by both free electrons and holes as current carriers.

Bipolr transistor

Bipolar junction transistor (BJT)

A transistor constructed with three doped semiconductor regions separated by two pn junctions.

Bit

Bit

The smallest unit of digital information, either a 1 or a 0. BInary digiT.

Bode-diagram

Bode plot

An idealized graph of the gain in dB versus frequency used to graphically illustrated the response of an amplifier or filter.

Boolesk algebra

Boolean algebra

A mathematical disciplin, handling variables that can take only one of two values.

Bottning (Mttning)

Saturation

The state of a BJT in which the collector current has reached a maximum and is independent of the base current.

Brus

Noise

An unwanted signal.

Buffert

Buffer

A device such as a transistor or op-amp used to separate two active elements.

Butterworth

Butterworth

A type of filter response characterized by flatness in the pass band and a 20 dB/decade/pole roll-off. A unit of information made up of eight bits.

Byte

Byte

Brvg

Carrier

The frequency (Radio Frequency, RF) signal that carries modulated information in AM, FM or other systems.

CCD

CCD

Charge coupled device.

Chebyshewfilter

Chebyshev filter

A type of filter response characterized by ripples in the pass band and greater than 20 dB/decade/pole roll-off.

Clamper

Clamper

A circuit using a diode and a capacitor which adds a dc level to an ac voltage.

CMOS

CMOS

Complementary MOS

CMRR

Common-mode rejection ratio (CMRR)

The ratio of open-loop gain to common-mode gain. A measure of an op-amp's ability to reject common-mode signals.

Common mode

Common mode

A condition characterized by the presence of the same signal on both op-amp inputs.

Darlingtonpar

Darlington

A configuration of two transistors n which the collectors are connected and the emitter of the first drives the base of the second to achieve multiplication.

De Morgans teorem

De Morgan

Decibel (dB)

Decibel (dB)

The unit of the logarithmic expression of a ratio, such as power or voltage.

Dekad

Decade

A ten times increase or decrease in the value of a quantity such as frequency.

Delningsfilter

Cross-over filter

Used in multi-way speaker systems.

Demultiplexer

Demultiplexer

One input is shown on several outputs given by an address.

Deriverande filter

Deriving filter

See high pass filter.

Diac

Diac

A two-terminal four-layer semiconductor device (thyristor) that can conduct current in either direction when properly activated.

Differentialfrstrkare

Differential amplifier (diff-amp)

An amplifier that produces an output voltage proportional to the difference of the two input voltages.

Differentiator

Differentiator

A circuit that produces an output which approximates the instantaneous rate of change of the input function.

Differentiell givare

Differential sensor

Sensor that gives the output as a difference of two signals.

Digital

Digital

Characterized by a process in which a variable takes on either of two values.

Digital-till-analog omvandlare

D/A, DAC

Digital-to analog converter or conversion.

Diod

Diode

A two-terminal electronic device that permits current in only one direction.

Diodekvationen

Diode equation

Diodspnningsfall

Diode drop

The voltage across the diode when it is forward biased. Approximately the same as the barrier potential.

DIP

DIP

Dual-in-line package (for ICs).

Diskanthgtalare

Tweeter

High frequency audio loudspeaker.

Dopningsgrad

Doping

The process of implanting impurities to an intrinsic semiconductor material in order to control its conduction characteristics.

Drain (Kollektor)

Drain

One of the three terminals of an FET.

Drivenhet

Actuator

A servomechanism that supplies and transmits a measured amount of energy for the operation of another system .

Drivspnning

Supply voltage.

VCC, VDD, etc..

Dynamisk resistans

Dynamic resistance

For diodes and other non-linear devices.

Dmpfaktor

Damping factor

A filter characteristic that determines the type of response.

Dmpning

Attenuation

The reduction in the level of power, current, or voltage.

Effektivvrde

RMS value (Root Mean Square)

Egenledning

Intrinsic conductivity

Conductivity for pure Si or Ge, etc.. Function of temperature.

Elektroluminisens

Electroluminescence

The process of releasing light energy by the recombination of

electrons in a semiconductor.

ELLER

OR

EMI

EMI

Electromagnetic interference.

Emitter

Emitter

One of the three regions of a BJT. Marked with an arrow head in circuit diagrams.

Emitterfljare

Emitter-follower

A popular term for a common-collector amplifier. Voltage gain =1

Emitterkopplad logik

ECL

Emitter coupled logic.

EXKLUSIVTELLER

XOR

Falltid

Fall time

Time from 90% to 10% of signal amplitude, tf.

Fan-out (Drivfrmga)

Fanout

The number of devices that can be fed by a given output.

Fasgng

Phase response

Phase difference plotted as a function of the logaritm of the frequency.

Faslst slinga

PLL

Phase locked loop.

Fasmarginal

Phase margin

The difference between the total phase shift through an amplifier and 180 degrees. The additional amount of phase shift that can be allowed before instability occurs.

Fasvinkel

Phase

The relative angular displacement of a time-varying function relative to a reference.

Felskning (Studenters rop p hjlp)

Troubleshooting (Debugging)

The process and technique of identifying and locating faults in an electronic circuit or system.

FFT

FFT

Fast Fourier transform, an algorithm that quickly determines the frequency components of a waveform.

Filter

Filter

A type of circuit that passes or blocks certain frequencies to the exclusion of all others.

Flanktriggad (Kanttriggad)

Flank trigged

Change of state on the clock pulse low/high transition.

Flyktigt minne

Volatile memory

Memory that does not retain its content when power is lost.

Fldesgivare

Flow sensor

Fotodiod

Photodiode

A diode in which the reverse current varies directly with the amount of light.

Fototransistor

Phototransistor

A transistor in which base current is produced when light strikes the photosensitive semiconductor base region.

Framspnd

Forward bias

The condition in which a pn junction conducts current.

Frekvensgng

Frequency response

See Bode plot.

Frekvensmodulering (FM)

Frequency modulation (FM)

A communication method in which a lower frequency intelligence carrying signal modulates (varies) the frequency of a higher frequency signal.

Fyrkantvg

Square wave

Flteffekttransistor (FET)

Field-Effect Transistor (FET)

A type of unipolar, voltage controlled transistor that uses an induced electric field to control current.

Frdelning

Distribution

Frdrjningstid

Delay

Frspnning

Bias

The application of a dc voltage to a transistor or other device to produce a desirable mode of operation.

Frstrkare

Amplifier

Frstrkarsteg

Stage

One of the amplifier circuits in a multistage configuration with cascaded arrangement of two or more amplifiers.

Frstrkning

Gain

The amount by which an electrical signal is increased or

amplified.

Gemensam emitterkoppling (GE-koppling)

Common-emitter

A BJT amplifier configuration .

Givare

Sensor / transducer

A device that responds to a physical stimulus and produces a corresponding electrical output .

GPIB

GPIB

General Purpose Interface Bus, same as IEEE-488.

Graykod

Gray code

Only ONE position changes between numbers in the code.

Grind

Gate

Logic building block.

Grindnt

Network

Several gates functioning together.

Grnsfrekvens

Critical frequency Cutoff frequency

The frequency at which the response of an amplifier or filter is 3 dB less than at midrange .

Grnssnitt

Interface

The point of external communication in a computer.

Halvledare

Semiconductor

Material with properties between isolators and conductors.

Halvvgslikriktare

Half-wave rectifier

A circuit that converts an ac sine wave input voltage into a pulsating dc voltage with one pulse occurring for each input cycle.

Helvgslikriktare

Full-wave rectifier

A circuit that converts an ac sine wave input voltage into a pulsating dc voltage with two pulses occurring for each input cycle.

Hi-Fi

High Fidelity

Nice in an audio system.

Hysteres

Hysteres

Characteristic of a circuit in which two different trigger levels create an offset or lag in the switching action.

Hl

Hole

The absence of an electron in the valence band of an atom.

Hgpassfilter

High-pass filter

A type of filter that passes frequencies above a certain frequency while rejecting lower frequencies.

Hgtalare

Loudspeaker

Hgtalarlda

Loudspeaker enclosure

Hrlur

Headphone

ICKE (Invers)

NOT

Icke inverterande frstrkare

Noninverting amplifier

An op-amp closed-loop configuration in which the input signal is applied to the noninverting input.

ICKE-ELLER (NELLER)

NOR

Not OR.

ICKE-OCH (NOCH)

NAND

Not AND.

IEEE-488

IEEE-488

A parallel bus interface standard for connecting instruments and computers. Refers also to devices accepting such connections. Same as HPIB or GPIB.

Ingng

Input terminal

Integrator

Integrator

A circuit that produces an output which approximates the area under the curve of the input function.

Integrerad krets

Integrated circuit (IC)

A type of circuit in which all the components are constructed on a single tiny chip of silicon.

Integrerande filter

Integrating filter

See low pass filter

Interfacing

Interfacing

The process of making the output of one type of circuit compatible with the input of another so that they can operate properly together.

Intrinsisk (egen-)

Intrinsic

The pure or natural state of a material.

Inverterande frstrkare

Inverting amplifier

An op-amp closed-loop configuration in which the input signal is applied to the inverting input.

Invertering

Inversion

The conversion of a quantity to its opposite value.

ISO

ISO

International Standards Organization.

JFET

Junction fieldeffect transistor (JFET)

One of two major types of field-effect transistor.

Kanal

Channel

The conducting path between the drain and source in an FET.

Karakteristisk kurva

Characteristic curve

A graph showing current vs. voltage in a diode or transistor.

Kaskadkoppling

Cascade

An arrangement of circuits in which the output of one circuit becomes the input to the next.

Katod

Cathode

The more negative terminal of a diode and certain other devices.

Katodstrlerr

CRT

Cathode ray tube, used in television and computer displays.

Koda

Encode

Condensation of information transmitted along several parallel lines so that the flow can be reduced to only a few lines.

Kollektor

Collector

One of the three semiconductor regions of a bipolar transistor.

Komparator (jmfrare)

Comparator

A circuit which compares two input voltages and produces an output in either of two states indicating the greater or less than relationship of inputs.

Kompensering

Compensation

The process of modifying the roll-off rate of an amplifier to ensure stability.

Komplementrt par

Complementary pair

Two transistors, one npn and one pnp, having matching characteristics.

Kondensator

Capacitor

Kopplingsschema

Circuit diagram

Kraftaggregat

Power supply

The circuit that supplies the proper dc voltage and current to operate a system.

Krets

Circuit

Laddning

Charge

Latch

Latch

A term used to indicate that the state of a digital signal will remain stored until changed by an external command signal.

Likriktarbrygga

Bridge rectifier

A type of full-wave rectifier using four diodes arranged in a bridge configuration.

Likriktare

Rectifier

An electronic circuit that converts ac into pulsating dc. Used in power supplies.

Likspnning

Offset

Mean voltage.

Likstrm

Direct current

DC.

Limiter

Limiter

A diode circuit that clips off or removes part of a waveform above and/or below a specified value.

Ljudstyrka

Loudness

Intensity of sound.

LSB

LSB

Least significant bit.

LSI

LSI

Large Scale Integration. Involves about 1000 - 10 000 transistors on a single chip.

Lysdiod

Light-emitting diode (LED)

A type of diode that emits light when forward current flows.

Lgpassfilter

Low-pass filter

A type of filter that passes frequencies below a certain frequency while rejecting higher frequencies.

Lngt ord

Long word

Four bytes. 32 bits.

Lsgaffel

Optical coupler

The LED and foto doide / transistor are separated. Possible to block out the light.

Majoritetsbrare

Majority carrier

The most numerous charge carrier in a semiconductor material, either free electrons or holes.

Markr

Cursor

Measuring aid on the oscilloscope screen.

Matningsspnning (Drivspnning)

Supply voltage

Medelvrde

Mean value

Mellanregisterhgtalare

Squawker

Handles middle range frequencies in an audio loud speaker system.

Minoritetsbrare

Minority carrier

The least numerous charge carrier in a semiconductor material.

Mittfrekvens

Midrange frequency

The frequency range of an amplifier lying between the lower and upper critical frequencies.

Monostabil vippa

Monostable flipflop

Used to create a pulse with a specific length.

MOS

MOS

Metal oxide-semiconductor.

MOSFET

MOSFET

Metal oxide semiconductor field transistor; one of two major types of FET.

Motstnd

Resistor

MSB

MSB

Most significant bit.

Multiplexer (MUX)

Multiplexer (MUX)

An address selects one of several inputs. This input is shown at the output.

Mrkerstrm

Dark current

The amount of thermally generated reverse current in a photodiode in the absence of light.

Negativ terkoppling

Negative feedback

The process of returning a portion of the output signal to the input of an amplifier such that it is out-of-phase with the input signal.

Nibble

Nibble

4 bits.

Niv

Level

OCH

AND

Oktav

Octave

A two times increase or decrease in frequency.

Omslagstid

Transition time

Open-loop gain

Open-loop gain

The gain of an op-amp without feedback.

Operationsfrstrkare

Operational amplifier (op-amp)

A type of amplifier that has very high voltage gain, very high input impedance, very low output impedance, and good rejection of common-mode signals.

Optokopplare

Optical coupler

Device consisting of a LED and a photodiode or phototransistor.

Ord

Word

Two bytes. 16 bits.

Oscillator

Oscillator

An electronic circuit based on positive feedback that produces a time-varying output signal without an external input signal.

Passband

Pass band

Frequency range equal to the bandwith.

Passivt filter

Passive filter

Filter with passive components only. R, L and C.

Peltiereffekt

Peltier effect

Temperature difference due to an applied voltage over a junction of different materials. The invers of the Seebeck effect.

Periodtid

Period time

Piezoelektrisk effekt

Piezoelectric effect

The property of a crystal whereby a changing mechanical stress produces a voltage across the crystal.

Piezo-resistiv

Piezo resistive

Semiconductor material where the resistivity changes.

Pinch-off spnning

Pinch-off voltage

The value of the drain-to-source voltage of a FET at which the drain current becomes constant when the gate-to-source voltage is zero.

Plattkondenstaor

Plate capacitor

PMOS

PMOS

P-channel MOS.

Pn-vergng

PN junction

The boundary between two different types of semiconductor materials.

Pol

Pole

Positiv terkoppling

Positive feedback

The return of a portion of the output signal to the input such that it sustains the output.

Pulskodmodulering (PCM)

Pulse code modulation

Pulssvar

Pulse response

Output as function of time for a pulse as input signal.

Push-Pull-steg

Push-Pull

A type of class B amplifier with two transistors in which one transistor conducts for one-half-cycle and the other conducts for the other half-cycle.

Q-vrde

Quality factor (Q-factor)

The ratio of a band-pass filter's center frequency to its bandwidth.

Realtid

Real time

The ability to acquire and process data immediately, rather than storing the data for later processing.

Referenspotential

Reference potential

Ground. Usually 0 volts.

Regulator

Regulator

An electronic device or circuit that maintains an essentially constant output voltage for a range of input voltage or load values; one part of a power supply.

Reservoarkondensator

Reservoir capacitor

Smoothes the output from a rectifier bridge.

RF

RF

Radio Frequency

Ringrknare

Ring counter

Rippelspnning

Ripple voltage

The small variation in the dc output voltage of a filtered rectifier caused by the charging and discharging of the filter capacitor.

Rfrstrkning

Open loop gain

Initial amplification of op-amp with no feedback.

Rknare

Counter

A circuit that can count pulses.

Rrlig spole

Moving coil

S/H

S/H

Sample and hold.

Sanningstabell (Funktionstabell)

Truth table

Schmittrigger

Schmitt trigger

A comparator with hysteres.

Schottky-diod

Schottky diode

A diode, fabricated with a metal-to-silicon junction rather than a pn junction and intended for high frequency operation. Faster than a Si-diode.

SCR

Silicon-controlled rectifier (SCR)

A type of three-terminal thyristor that conducts current when triggered on by a voltage at the single gate terminal and remains on until the anode current falls below a specified value.

SCS

Silicon-controlled switch (SCS)

A type of four terminal thyristor that has two gate terminals that are used to trigger the device on and off.

Seebeckeffekt

Seebeck effect

Current (or voltage) due to temperature difference of two soldering junctions joining two different materials, e.g. Copper/Constantan. Thermocouple.

Signalform

Wave form

Sine wave, square wave, triangular wave, etc..

Signal-till-brusfrhllande

S/N

Signal to noise ratio. Usually given in dB.

Sinusvg

Sine wave

Skiftregister

Shift register

Slewrate

Slew rate

The rate of change of the output voltage of an op-amp in response to a step input.

Slutet hgtalarsystem

Sealed enclosure loud speaker system

Source (Kollektor)

Source

One of the three terminals of an FET.

Spole

Coil

Spnningsfall

Voltage drop

Spnningsfljare

Voltage follower

A closed-loop, noninverting op-amp with voltage gain of one.

Stabilitet

Stability

A measure of how well an amplifier maintains its design values (Q-point, gain, etc.) over changes in and temperature; a condition in which the amplifier circuit dies not oscillate.

Steg (-vergng)

Step

A fast voltage transition from one level to another.

Stegmotor

Step motor

Stegsvar

Step response

Output as function of time for a step in the input signal.

Stigtid

Rise time

Time from 10% to 90% of the signal amplitude, tr.

Strypt transistor

Cutoff

The non conducting state of a transistor.

Strmbrytare

Switch , hFE

Strmfrstrkningsfaktor

The ratio of collector current to base current in a bipolar transistor. Current gain.

Styre

Gate

One of the three terminals of a FET. A logical circuit building block .

Styvhet

Stiffness

Sgtandvg

Sawtooth wave

Skring

Fuse

A protection device that opens when the current exceeds a rated limit.

Termisk verbelastning

Thermal overload

A condition where the internal power dissipation of the circuit exceed a certain maximum due to excessive current.

Termistor

Thermistor

A temperature-sensitive resistor with negative temperature coefficient.

Termoelement

Thermocouple

See Seebeck effect.

Tidskonstant

Time constant

Given in seconds.

Topp-till-toppvrde

Peak-to-peak value

Transformator

Transformer

Transistor

Transistor

A semiconductor device used for amplification and switching applications.

Transkonduktans

Transconductance

Ratio of output current to input voltage.

Triac

Triac

A three-terminal thyristor than can conduct current in either direction when properly activated.

Triangelvg

Triangular wave

Trigger

Trigger

The activating input of some electronic devices and circuits. Pulse or signal that is used to start or stop a particular action.

Tri-state

Tri-state

High impedance state for output.

Tryckgivare

Pressure sensor

TTL

TTL

Transistor-transistor logic.

Tunneldiod

Tunnel diode

A diode exhibiting a negative resistance characteristic region.

Tyristor

Thyristor

A class of four-layer (pnpn) semiconductor devices.

Tjningsgivare

Strain gauge

UJT

Unijunction Transistor (UJT)

A three-terminal single pn junction device that exhibits a negative resistance characteristic.

ULSI

ULSI

Ultra-large-scale integration. An IC with as many as a million transistors on a single chip.

Uppladdning

Charging

Upplsning

Resolution

The smallest detectable change in a measurement. Resolution can be given as a percentage of full scale, but in digital systems is more commonly expressed as a number of bits.

Urladdning

Discharging

Ursprunglig

Default

A preset command used in the absence of specific instructions.

Utarmning

Depletion

In a MOSFET, the process of removing or depleting the channel of charge carriers and thus decreasing the channel conductivity.

Utarmningsomrde

Depletion layer

The area near a pn-junction that has no majority carriers.

Utgng

Output terminal

Varaktor

Varactor

A variable capacitance diode.

Vindtunnel

Wind tunnel

Vinkelgivare

Angular sensor

Vippa

Flip-flop

Device with two stable states. A one-bit "memory".

VLSI

VLSI

Very-large-scale integration. An IC with up to about 100 000 transistors on a single chip.

VMOS

VMOS

Vertical MOS. Refers to a particular geometry within a chip.

Vgform

Wave shape (Wave form)

Vxelstrm

Alternating current

AC.

Zenerdiod

Zener diode

A diode designed for limiting the voltage across its terminals in reverse bias.

terkoppling

Feedback

The process of returning a portion of a circuit's output back to the input.

terkopplingsfrstrkning

Closed-loop gain

The overall voltage gain with external feedback.

terkopplingsmotstnd

Feedback resistor

ppen kollektor

Open collector

The collector is not connected, but left open.

verslng

Overshoot

verton

Harmonics

The frequencies contained in a composite waveform which are integer multiples of the repetition frequency (fundamental).

A B C D E F G H I J K L M N O P Q R S T U VW X Y Z |
, hFE Strmfrstrkningsfaktor

Swedish sort.

The ratio of collector current to base current in a bipolar transistor. Current gain.

A/D, ADC

Analog-till-digital omvandlare

Analog-to digital converter or conversion. A process whereby information in analog form is converted into digital form.

Absolute sensor

Absolut givare

Sensor which gives the absolute value.

Active filter

Aktivt filter

A frequency-selective circuit consisting of active devices such as transistors or op-amps coupled with passive components, R and C. Filter where the coil (L) is substituted for an operational amplifier.

Actuator

Drivenhet

A servomechanism that supplies and transmits a measured amount of energy for the operation of another system . Absolute temperature sensor which generates 1 A/K.

AD590

AD590

Alternating current

Vxelstrm

AC.

Amplifier

Frstrkare

Amplitude

Amplitud (Toppvrde)

Amplitude modulation (AM)

Amplitudmodulering (AM)

A communication method in which a lower frequency signal modulates (varies the amplitude of a higher frequency signal (carrier).

Analog

Analog

Characterized by a linear process in which a variable takes on a continuous set of values.

AND

OCH

Angular sensor

Vinkelgivare

Anode

Anod

The positive terminal of a diode and certain other electronic devices.

ASCII-code

ASCII-kod

American Standard Code for Information Interchange

Astable flip-flop

Astabil vippa

Device with two non-stable states. Can be used as an oscillator.

Attenuation

Dmpning

The reduction in the level of power, current, or voltage.

Audio

Audio

Related to the frequency range of sound waves that can be heard by the human ear.

Baffle

Baffel

Plate that holds one (or several) loudspeaker.

Band-pass filter

Bandpassfilter

A type of filter that passes a range of frequencies lying between a certain lower frequency and a certain higher frequency.

Band-stop filter

Bandsprrfilter

A type of filter that blocks or rejects a range of frequencies between a certain lower and higher frequency (Notch filter).

Bandwidth

Bandbredd

The characteristic of certain electronic circuits that specifies the usable range of frequencies that pass from input to output. Frequency interval where F (=Uout/Uin) never changes more than +/- 3 dB.

Barrier potential

Barrir potential

The effective voltage across a pn junction.

Base

Bas

One of the semiconductor regions in a bipolar junction transistor.

Bass-reflex enclosure

Basreflexlda

Open loud speaker enclosure.

BCD

Binrkodad decimal

Binary-coded Decimal. A code for representing decimal digits in a binary format.

Bessel filter

Besselfilter

A type of filter response having a linear phase characteristic and less than 20 dB/decade/pole roll-off.

Bias

Frspnning

The application of a dc voltage to a transistor or other device to produce a desirable mode of operation.

Bipolar

Bipolr

Characterized by both free electrons and holes as current carriers.

Bipolar junction transistor (BJT)

Bipolr transistor

A transistor constructed with three doped semiconductor regions separated by two pn junctions.

Bit

Bit

The smallest unit of digital information, either a 1 or a 0. BInary digiT.

Bode plot

Bode-diagram

An idealized graph of the gain in dB versus frequency used to graphically illustrated the response of an amplifier or filter.

Boolean algebra

Boolesk algebra

A mathematical disciplin, handling variables that can take only one of two values.

Bridge rectifier

Likriktarbrygga

A type of full-wave rectifier using four diodes arranged in a bridge configuration.

Buffer

Buffert

A device such as a transistor or op-amp used to separate two active elements.

Butterworth

Butterworth

A type of filter response characterized by flatness in the pass band and a 20 dB/decade/pole roll-off.

Byte

Byte

A unit of information made up of eight bits.

Byte

Byte

Eight bits.

Capacitor

Kondensator

Carrier

Brvg

The frequency (Radio Frequency, RF) signal that carries modulated information in AM, FM or other systems.

Cascade

Kaskadkoppling

An arrangement of circuits in which the output of one circuit becomes the input to the next.

Cathode

Katod

The more negative terminal of a diode and certain other devices.

CCD

CCD

Charge coupled device.

Channel

Kanal

The conducting path between the drain and source in an FET.

Characteristic curve

Karakteristisk kurva

A graph showing current vs. voltage in a diode or transistor.

Charge

Laddning

Charging

Uppladdning

Chebyshev filter

Chebyshewfilter

A type of filter response characterized by ripples in the pass band and greater than 20 dB/decade/pole roll-off.

Circuit

Krets

Circuit diagram

Kopplingsschema

Clamper

Clamper

A circuit using a diode and a capacitor which adds a dc level to an ac voltage.

Closed-loop gain

terkopplingsfrstrkning

The overall voltage gain with external feedback.

CMOS

CMOS

Complementary MOS

Coil

Spole

Collector

Kollektor

One of the three semiconductor regions of a bipolar transistor.

Common mode

Common mode

A condition characterized by the presence of the same signal on both op-amp inputs.

Common-emitter

Gemensam emitterkoppling (GE-koppling)

A BJT amplifier configuration .

Common-mode rejection ratio (CMRR)

CMRR

The ratio of open-loop gain to common-mode gain. A measure of an op-amp's ability to reject common-mode signals.

Comparator

Komparator (jmfrare)

A circuit which compares two input voltages and produces an output in either of two states indicating the greater or less than relationship of inputs.

Compensation

Kompensering

The process of modifying the roll-off rate of an amplifier to ensure stability.

Complementary pair

Komplementrt par

Two transistors, one npn and one pnp, having matching

characteristics.

Counter

Rknare

A circuit that can count pulses.

Critical frequency / Cutoff frequency

Grnsfrekvens

The frequency at which the response of an amplifier or filter is 3 dB less than at midrange .

Cross-over filter

Delningsfilter

Used in multi-way speaker systems.

CRT

Katodstrlerr

Cathode ray tube, used in television and computer displays.

Cursor

Markr

Measuring aid on the oscilloscope screen.

Cutoff

Strypt transistor

The non conducting state of a transistor.

D/A, DAC

Digital-till-analog omvandlare

Digital-to analog converter or conversion.

Damping factor

Dmpfaktor

A filter characteristic that determines the type of response.

Dark current

Mrkerstrm

The amount of thermally generated reverse current in a photodiode in the absence of light.

Darlington

Darlingtonpar

A configuration of two transistors n which the collectors are connected and the emitter of the first drives the base of the second to achieve multiplication.

De Morgan

De Morgans teorem

Decade

Dekad

A ten times increase or decrease in the value of a quantity such as frequency.

Decibel (dB)

Decibel (dB)

The unit of the logarithmic expression of a ratio, such as power or voltage.

Decode

Avkoda

Signals on a few lines control the flow of information over a large number of lines.

Default

Ursprunglig

A preset command used in the absence of specific instructions.

Deflection

Avlnkning

Delay

Frdrjningstid

Demultiplexer

Demultiplexer

One input is shown on several outputs given by an address.

Depletion

Utarmning

In a MOSFET, the process of removing or depleting the channel of charge carriers and thus decreasing the channel conductivity.

Depletion layer

Utarmningsomrde

The area near a pn-junction that has no majority carriers.

Deriving filter

Deriverande filter

See high pass filter.

Diac

Diac

A two-terminal four-layer semiconductor device (thyristor) that can conduct current in either direction when properly activated.

Differential amplifier (diff-amp)

Differentialfrstrkare

An amplifier that produces an output voltage proportional to the difference of the two input voltages.

Differential sensor

Differentiell givare

Sensor that gives the output as a difference of two signals.

Differentiator

Differentiator

A circuit that produces an output which approximates the instantaneous rate of change of the input function.

Digital

Digital

Characterized by a process in which a variable takes on either of two values.

Diode

Diod

A two-terminal electronic device that permits current in only one direction.

Diode drop

Diodspnningsfall

The voltage across the diode when it is forward biased. Approximately the same as the barrier potential.

Diode equation

Diodekvationen

DIP

DIP

Dual-in-line package (for ICs).

Direct current

Likstrm

DC.

Discharging

Urladdning

Distribution

Frdelning

Doping

Dopningsgrad

The process of implanting impurities to an intrinsic semiconductor material in order to control its conduction characteristics.

Drain

Drain (Kollektor)

One of the three terminals of an FET.

Dynamic resistance

Dynamisk resistans

For diodes and other non-linear devices.

ECL

Emitterkopplad logik

Emitter coupled logic.

Electroluminescence

Elektroluminisens

The process of releasing light energy by the recombination of electrons in a semiconductor.

EMI

EMI

Electromagnetic interference.

Emitter

Emitter

One of the three regions of a BJT. Marked with an arrow head in circuit diagrams.

Emitter-follower

Emitterfljare

A popular term for a common-collector amplifier. Voltage gain = 1

Encode

Koda

Condensation of information transmitted along several parallel lines so that the flow can be reduced to only a few lines.

Enhancement

Anrikning

In a MOSFET, the process of creating a channel or increasing the conductivity of the channel by the addition of charge carriers.

Fall time

Falltid

Time from 90% to 10% of signal amplitude, tf.

Fanout

Fan-out (Drivfrmga)

The number of devices that can be fed by a given output.

Feedback

terkoppling

The process of returning a portion of a circuit's output back to the input.

Feedback resistor

terkopplingsmotstnd

FFT

FFT

Fast Fourier transform, an algorithm that quickly determines the

frequency components of a waveform.

Field-Effect Transistor (FET)

Flteffekttransistor (FET)

A type of unipolar, voltage controlled transistor that uses an induced electric field to control current.

Filter

Filter

A type of circuit that passes or blocks certain frequencies to the exclusion of all others.

Flank trigged

Flanktriggad (Kanttriggad)

Change of state on the clock pulse low/high transition.

Flip-flop

Vippa

Device with two stable states. A one-bit "memory".

Flow sensor

Fldesgivare

Forward bias

Framspnd

The condition in which a pn junction conducts current.

Frequency modulation (FM)

Frekvensmodulering (FM)

A communication method in which a lower frequency intelligence carrying signal modulates (varies) the frequency of a higher frequency signal.

Frequency response

Frekvensgng

See Bode plot.

Full-wave rectifier

Helvgslikriktare

A circuit that converts an ac sine wave input voltage into a pulsating dc voltage with two pulses occurring for each input cycle.

Fuse

Skring

A protection device that opens when the current exceeds a rated limit.

Gain

Frstrkning

The amount by which an electrical signal is increased or amplified.

Gate

Grind

Logic building block.

Gate

Styre

One of the three terminals of a FET. A logical circuit building block .

GPIB

GPIB

General Purpose Interface Bus, same as IEEE-488.

Gray code

Graykod

Only ONE position changes between numbers in the code.

Half-wave rectifier

Halvvgslikriktare

A circuit that converts an ac sine wave input voltage into a pulsating dc voltage with one pulse occurring for each input

cycle.

Harmonics

verton

The frequencies contained in a composite waveform which are integer multiples of the repetition frequency (fundamental).

Headphone

Hrlur

High Fidelity

Hi-Fi

Nice in an audio system.

High-pass filter

Hgpassfilter

A type of filter that passes frequencies above a certain frequency while rejecting lower frequencies.

Hole

Hl

The absence of an electron in the valence band of an atom.

Hysteres

Hysteres

Characteristic of a circuit in which two different trigger levels create an offset or lag in the switching action.

IEEE-488

IEEE-488

A parallel bus interface standard for connecting instruments and computers. Refers also to devices accepting such connections. Same as HPIB or GPIB.

Input terminal

Ingng

Integrated circuit (IC)

Integrerad krets

A type of circuit in which all the components are constructed on a single tiny chip of silicon.

Integrating filter

Integrerande filter

See low pass filter

Integrator

Integrator

A circuit that produces an output which approximates the area under the curve of the input function.

Interface

Grnssnitt

The point of external communication in a computer.

Interfacing

Interfacing

The process of making the output of one type of circuit compatible with the input of another so that they can operate properly together.

Intrinsic

Intrinsisk (egen-)

The pure or natural state of a material.

Intrinsic conductivity

Egenledning

Conductivity for pure Si or Ge, etc.. Function of temperature.

Inversion

Invertering

The conversion of a quantity to its opposite value.

Inverting amplifier

Inverterande frstrkare

An op-amp closed-loop configuration in which the input signal is applied to the inverting input.

ISO

ISO

International Standards Organization.

Junction field-effect transistor (JFET)

JFET

One of two major types of field-effect transistor.

Latch

Latch

A term used to indicate that the state of a digital signal will remain stored until changed by an external command signal.

Level

Niv

Light-emitting diode (LED)

Lysdiod

A type of diode that emits light when forward current flows.

Limiter

Limiter

A diode circuit that clips off or removes part of a waveform above and/or below a specified value.

Load

Belastning

Load line

Belastningslinje

A straight line on the characteristic curve of an amplifier that represents the operation range of the amplifier's voltages and currents .

Long word

Lngt ord

Four bytes. 32 bits.

Loudness

Ljudstyrka

Intensity of sound.

Loudspeaker

Hgtalare

Loudspeaker enclosure

Hgtalarlda

Low-pass filter

Lgpassfilter

A type of filter that passes frequencies below a certain frequency while rejecting higher frequencies.

LSB

LSB

Least significant bit.

LSI

LSI

Large Scale Integration. Involves about 1000 - 10 000 transistors

on a single chip.

Majority carrier

Majoritetsbrare

The most numerous charge carrier in a semiconductor material, either free electrons or holes.

Mean value

Medelvrde

Midrange frequency

Mittfrekvens

The frequency range of an amplifier lying between the lower and upper critical frequencies.

Minority carrier

Minoritetsbrare

The least numerous charge carrier in a semiconductor material.

Monostable flip-flop

Monostabil vippa

Used to create a pulse with a specific length.

MOS

MOS

Metal oxide-semiconductor.

MOSFET

MOSFET

Metal oxide semiconductor field transistor; one of two major types of FET.

Moving coil

Rrlig spole

MSB

MSB

Most significant bit.

Multiplexer (MUX)

Multiplexer (MUX)

An address selects one of several inputs. This input is shown at the output.

NAND

ICKE-OCH (NOCH)

Not AND.

Negative feedback

Negativ terkoppling

The process of returning a portion of the output signal to the input of an amplifier such that it is out-of-phase with the input signal.

Network

Grindnt

Several gates functioning together.

Nibble

Nibble

4 bits.

Noise

Brus

An unwanted signal.

Noninverting amplifier

Icke inverterande frstrkare

An op-amp closed-loop configuration in which the input signal is applied to the noninverting input.

NOR

ICKE-ELLER (NELLER)

Not OR.

NOT

ICKE (Invers)

Notch filter

Bandsprrfilter

See Band-stop filter.

Octave

Oktav

A two times increase or decrease in frequency.

Offset

Likspnning

Mean voltage.

Open collector

ppen kollektor

The collector is not connected, but left open.

Open loop gain

Rfrstrkning

Initial amplification of op-amp with no feedback.

Open-loop gain

Open-loop gain

The gain of an op-amp without feedback.

Operational amplifier (op-amp)

Operationsfrstrkare

A type of amplifier that has very high voltage gain, very high input impedance, very low output impedance, and good rejection of common-mode signals.

Optical coupler

Lsgaffel

The LED and foto doide / transistor are separated. Possible to block out the light.

Optical coupler

Optokopplare

Device consisting of a LED and a photodiode or phototransistor.

OR

ELLER

Oscillator

Oscillator

An electronic circuit based on positive feedback that produces a time-varying output signal without an external input signal.

Output terminal

Utgng

Overshoot

verslng

Pass band

Passband

Frequency range equal to the bandwith.

Passive filter

Passivt filter

Filter with passive components only. R, L and C.

Peak-to-peak value

Topp-till-toppvrde

Peltier effect

Peltiereffekt

Temperature difference due to an applied voltage over a junction of different materials. The invers of the Seebeck effect.

Period time

Periodtid

Phase

Fasvinkel

The relative angular displacement of a time-varying function relative to a reference.

Phase margin

Fasmarginal

The difference between the total phase shift through an amplifier and 180 degrees. The additional amount of phase shift that can be allowed before instability occurs.

Phase response

Fasgng

Phase difference plotted as a function of the logaritm of the frequency.

Photodiode

Fotodiod

A diode in which the reverse current varies directly with the amount of light.

Phototransistor

Fototransistor

A transistor in which base current is produced when light strikes the photosensitive semiconductor base region.

Piezo resistive

Piezo-resistiv

Semiconductor material where the resistivity changes.

Piezoelectric effect

Piezoelektrisk effekt

The property of a crystal whereby a changing mechanical stress produces a voltage across the crystal.

Pinch-off voltage

Pinch-off spnning

The value of the drain-to-source voltage of a FET at which the drain current becomes constant when the gate-to-source voltage is zero.

Plate capacitor

Plattkondenstaor

PLL

Faslst slinga

Phase locked loop.

PMOS

PMOS

P-channel MOS.

PN junction

Pn-vergng

The boundary between two different types of semiconductor materials.

Pole

Pol

Positive feedback

Positiv terkoppling

The return of a portion of the output signal to the input such that it sustains the output.

Power supply

Kraftaggregat

The circuit that supplies the proper dc voltage and current to operate a system.

Pressure sensor

Tryckgivare

Pulse code modulation

Pulskodmodulering (PCM)

Pulse response

Pulssvar

Output as function of time for a pulse as input signal.

Push-Pull

Push-Pull-steg

A type of class B amplifier with two transistors in which one transistor conducts for one-half-cycle and the other conducts for the other half-cycle.

Q - point

Arbetspunkt

The dc operating (bias) point of an amplifier specified by the voltage and current values.

Quality factor (Q-factor)

Q-vrde

The ratio of a band-pass filter's center frequency to its bandwidth.

Real time

Realtid

The ability to acquire and process data immediately, rather than storing the data for later processing.

Rectifier

Likriktare

An electronic circuit that converts ac into pulsating dc. Used in power supplies.

Reference potential

Referenspotential

Ground. Usually 0 volts.

Regulator

Regulator

An electronic device or circuit that maintains an essentially constant output voltage for a range of input voltage or load values; one part of a power supply.

Reservoir capacitor

Reservoarkondensator

Smoothes the output from a rectifier bridge.

Resistor

Motstnd

Resolution

Upplsning

The smallest detectable change in a measurement. Resolution can be given as a percentage of full scale, but in digital systems is more commonly expressed as a number of bits.

Reverse bias

Backspnd

The condition in which a pn junction blocks current .

RF

RF

Radio Frequency

Ring counter

Ringrknare

Ripple voltage

Rippelspnning

The small variation in the dc output voltage of a filtered rectifier caused by the charging and discharging of the filter capacitor.

Rise time

Stigtid

Time from 10% to 90% of the signal amplitude, tr.

RMS value (Root Mean Square)

Effektivvrde

Roll-off

Asymptotisk lutning

The decrease in the gain of an amplifier above or below the critical frequencies.

S/H

S/H

Sample and hold.

S/N

Signal-till-brusfrhllande

Signal to noise ratio. Usually given in dB.

Saturation

Bottning (Mttning)

The state of a BJT in which the collector current has reached a maximum and is independent of the base current.

Sawtooth wave

Sgtandvg

Schmitt trigger

Schmittrigger

A comparator with hysteres.

Schottky diode

Schottky-diod

A diode, fabricated with a metal-to-silicon junction rather than a pn junction and intended for high frequency operation. Faster than a Si-diode.

Sealed enclosure loud speaker system

Slutet hgtalarsystem

Seebeck effect

Seebeckeffekt

Current (or voltage) due to temperature difference of two soldering junctions joining two different materials, e.g. Copper/Constantan. Thermocouple.

Semiconductor

Halvledare

Material with properties between isolators and conductors.

Sensor / transducer

Givare

A device that responds to a physical stimulus and produces a corresponding electrical output .

Shift register

Skiftregister

Silicon-controlled rectifier (SCR)

SCR

A type of three-terminal thyristor that conducts current when triggered on by a voltage at the single gate terminal and remains on until the anode current falls below a specified value.

Silicon-controlled switch (SCS)

SCS

A type of four terminal thyristor that has two gate terminals that are used to trigger the device on and off.

Sine wave

Sinusvg

Slew rate

Slewrate

The rate of change of the output voltage of an op-amp in response to a step input.

Source

Source (Kollektor)

One of the three terminals of an FET.

Square wave

Fyrkantvg

Squawker

Mellanregisterhgtalare

Handles middle range frequencies in an audio loud speaker system.

Stability

Stabilitet

A measure of how well an amplifier maintains its design values (Q-point, gain, etc.) over changes in and temperature; a condition in which the amplifier circuit dies not oscillate.

Stage

Frstrkarsteg

One of the amplifier circuits in a multistage configuration with cascaded arrangement of two or more amplifiers.

Step

Steg (-vergng)

A fast voltage transition from one level to another.

Step motor

Stegmotor

Step response

Stegsvar

Output as function of time for a step in the input signal.

Stiffness

Styvhet

Strain gauge

Tjningsgivare

Supply voltage

Matningsspnning (Drivspnning)

Supply voltage.

Drivspnning

VCC, VDD, etc..

Switch

Strmbrytare

Tape recorder

Bandspelare

Terminal

Anslutning

The external contact point of an electrical or electronic device. (Connection)

Thermal overload

Termisk verbelastning

A condition where the internal power dissipation of the circuit exceed a certain maximum due to excessive current.

Thermistor

Termistor

A temperature-sensitive resistor with negative temperature coefficient.

Thermocouple

Termoelement

See Seebeck effect.

Thyristor

Tyristor

A class of four-layer (pnpn) semiconductor devices.

Time constant

Tidskonstant

Given in seconds.

Transconductance

Transkonduktans

Ratio of output current to input voltage.

Transformer

Transformator

Transistor

Transistor

A semiconductor device used for amplification and switching applications.

Transition time

Omslagstid

Triac

Triac

A three-terminal thyristor than can conduct current in either direction when properly activated.

Triangular wave

Triangelvg

Trigger

Trigger

The activating input of some electronic devices and circuits. Pulse or signal that is used to start or stop a particular action.

Tri-state

Tri-state

High impedance state for output.

Troubleshooting (Debugging)

Felskning (Studenters rop p hjlp)

The process and technique of identifying and locating faults in an electronic circuit or system.

Truth table

Sanningstabell (Funktionstabell)

TTL

TTL

Transistor-transistor logic.

Tunnel diode

Tunneldiod

A diode exhibiting a negative resistance characteristic region.

Tweeter

Diskanthgtalare

High frequency audio loudspeaker.

ULSI

ULSI

Ultra-large-scale integration. An IC with as many as a million transistors on a single chip.

Unijunction Transistor (UJT)

UJT

A three-terminal single pn junction device that exhibits a negative resistance characteristic.

Varactor

Varaktor

A variable capacitance diode.

Wave form

Signalform

Sine wave, square wave, triangular wave, etc..

Wave shape (Wave form)

Vgform

Wind tunnel

Vindtunnel

VLSI

VLSI

Very-large-scale integration. An IC with up to about 100 000 transistors on a single chip.

VMOS

VMOS

Vertical MOS. Refers to a particular geometry within a chip.

Volatile memory

Flyktigt minne

Memory that does not retain its content when power is lost.

Voltage drop

Spnningsfall

Voltage follower

Spnningsfljare

A closed-loop, noninverting op-amp with voltage gain of one.

Woofer

Bashgtalare

Handles low range frequencies in a loud speaker system.

Word

Ord

Two bytes. 16 bits.

XOR

EXKLUSIVTELLER

Zener diode

Zenerdiod

A diode designed for limiting the voltage across its terminals in reverse bias.

Vous aimerez peut-être aussi