Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

PC speaker

From Wikipedia, the free encyclopedia
Internal loudspeaker built into some (older) IBM PC-compatible computers
Not to be confused withComputer speakers.

PC speaker
Dynamic speaker with 4-pin connector
Date invented1981
Invented byIBM
Connects toMotherboard
Useloudspeaker built into mostIBM PC compatible computers
Common manufacturersseveral

APC speaker is aloudspeaker built into someIBM PC compatible computers. The firstIBM Personal Computer, model5150, employed a standard 2.25 inch magnetic driven (dynamic) speaker.[1] More recent computers use a tinymoving-iron orpiezo speaker instead.[2] The speaker allows software andfirmware to provide auditoryfeedback to a user, such as to report a hardware fault. A PC speaker generates waveforms using theprogrammable interval timer, anIntel 8253 or8254 chip.[3]

Use cases

[edit]

BIOS/UEFI error codes

[edit]
See also:Power-on self-test § Progress and error reporting

The PC speaker is used during thepower-on self-test (POST) sequence to indicate errors during theboot process. Since it is active before thegraphics card, it can be used to communicate "beep codes" related to problems that prevent the much more complex initialization of the graphics card to take place. For example, theVideo BIOS usually cannot activate a graphics card unless working RAM is present in the system while beeping the speaker is possible with just ROM and the CPU registers. Usually, different error codes will be signalled by specific beeping patterns, such as e.g. "one beep; pause; three beeps; pause; repeat". These patterns are specific to the BIOS/UEFI manufacturer and are usually documented in the technical manual of the motherboard.

Software

[edit]

Several programs, including music software, operating systems or games, could playpulse-code modulation (PCM) sound through the PC speaker using specialPulse-width Modulation techniques explained later in this article.

Games

[edit]
A fragment ofJ.S. Bach'sBWV 565 played through PC speaker as intro to the video gameParatrooper (1982)

Problems playing this file? Seemedia help.

The PC speaker was often used in very innovative ways to create the impression ofpolyphonic music or sound effects within computer games of its era, such as theLucasArts series of adventure games from the mid-1980s, using swiftarpeggios.[citation needed] Several games such asSpace Hulk andPinball Fantasies were noted for their elaborate sound effects;Space Hulk, in particular, even had full speech.

However, because the method used to reproduce PCM was very sensitive to timing issues, these effects either caused noticeable sluggishness on slower PCs or sometimes failed on faster PCs (that is, significantly faster than the program was originally developed for). Also, it was difficult for programs to do much else, even update the display, during the playing of such sounds. Thus, when sound cards (which can output complex sounds independent from the CPU once initiated) became mainstream in the PC market after 1990, they quickly replaced the PC speaker as the preferred output device for sound effects. Most newly-released PC games stopped supporting the speaker during the second half of the 1990s.

Other programs

[edit]

Several programs, including MP (Module Player, 1989),Scream Tracker,Fast Tracker,Impulse Tracker, and evendevice drivers forLinux[4] andMicrosoft Windows, could play PCM sound through the PC speaker.

Modern Microsoft Windows systems have PC speaker support as a separate device with special capabilities – that is, it cannot be configured as a normal audio output device. Some software uses this special sound channel to produce sounds. For example,Skype can use it as a reserve calling signal device for the case where the primary audio output device cannot be heard (for example because the volume is set to the minimum level, the amplifier is turned off or headphones are plugged in).

In the 1990s, acomputer virus forMicrosoft DOS named "Techno" appeared, playing a melody through the PC speaker while printing the word "TECHNO" on the screen until filled.[5]

Pinouts

[edit]
4-pin speaker connector (marked SPK) on motherboard
Tinymoving-iron PC speaker uses 4-pin 2-wire connection.

In some applications, the PC speaker is affixed directly to the computer'smotherboard; in others, including the first IBM Personal Computer, the speaker is attached by wire to a connector on the motherboard. Some PC cases come with a PC speaker preinstalled. A wired PC speaker connector may have a two-, three-, or four-pin configuration, and either two or three wires. Thefemale connector of the speaker connects topin headers on the motherboard, which are sometimes labeledSPEAKER orSPKR.

4-pin, 3-wire PC speaker pinout[6][7]
Pin NumberPin NamePin Function
1-SPSpeaker negative
2GND or KEYGround, or unwired key
3GNDGround
4+SP5VSpeaker positive +5V DC

Pulse-width modulation

[edit]

The PC speaker is normally meant to reproduce asquare wave via only 2 levels of output (two voltage levels, typically 0 V and 5 V), driven by channel 2 of theIntel 8253 (PC, XT) or 8254 (AT and later)Programmable Interval Timer operating in mode three (square wave signal). The speaker hardware itself is directly accessible via PC I/O port61H (61hexadecimal) via bit 1 and can be physically manipulated for 2 levels of output (i.e. 1-bit sound). However, by carefully timing a shortpulse (i.e. going from one output level to the other and then back to the first), and by relying on the speaker's physical filtering properties (limited frequency response, self-inductance, etc.), it is possible to drive the speaker to various intermediate output levels, functioning as a crudedigital-to-analog converter. This technique is calledpulse-width modulation (PWM) and allows approximate playback ofPCM audio. (A more refined version of this technique is used inclass Daudio amplifiers.)

With the PC speaker this method achieves limited quality playback, but a commercial solution namedRealSound used it to provide improved sound on several games.

Obtaining a high fidelity sound output using this technique requires a switching frequency much higher than the audio frequencies meant to be reproduced (typically with a ratio of 10:1 or more), and the output voltage to bebipolar, in order to make better use of the output devices' dynamic range and power. On the PC speaker, however, the output voltage is either zero or at a Transistor-Transistor Logic (TTL) level (unipolar).

The quality depends on a trade-off between the PWMcarrier frequency (effectivesample rate) and the number of output levels (effectivebit depth). The clock rate of the PC'sprogrammable interval timer which drives the speaker is fixed at 1,193,180 Hz,[3] and the product of the audio sample rate times the maximum DAC value must equal this. Typically, a 6-bit DAC[8] with a maximum value of 63 is used at a sample rate of 18,939.4 Hz, producing poor but recognizable audio.[9]

The audio fidelity of this technique is further decreased by the lack of a properly sized dynamic loudspeaker, specially in modern machines and particularly laptops that use a tinymoving-iron speaker (often confused withpiezoelectric). The reason for this is that PWM-produced audio requires a low-pass filter before the final output in order to suppress switching noise and high harmonics. A normal dynamic loudspeaker does this naturally, but the tiny metal diaphragm of the moving-iron speaker will let much switching noise pass, as will many direct couplings (though there are exceptions to this, e.g. filtered "speaker in" ports on some motherboards and sound cards).

This use of the PC speaker for complex audio output became less common with the introduction ofSound Blaster and othersound cards.

See also

[edit]

Notes

[edit]
  1. ^IBM 5150 Technical Reference(PDF). IBM. 1984. pp. 1–25.
  2. ^Rosenthal, Morris (August 2008).Computer Repair with Diagnostic Flowcharts (Revised ed.). Foner Books. p. 9.ISBN 978-0-9723801-7-1.
  3. ^ab"Bran's Kernel Development Tutorial: The Programmable Interval Timer".www.osdever.net. Retrieved23 January 2023.
  4. ^Sergeev, Stas."PC-Speaker PCM driver for Linux". Archived from the original on 26 October 2009. Retrieved15 February 2009.
  5. ^Nastasi, Alison (19 July 2014)."The World's Worst Computer Viruses Illustrated".Flavorwire. Retrieved11 September 2021.
  6. ^Ögren, Joakim (1997).The Hardware Book(PDF). p. 290.
  7. ^ASUS P5KPL-AM SE Motherboard manual(PDF). ASUSTek Computer Inc. 2008. p. 1-13. Archived fromthe original(PDF) on 13 October 2017. Retrieved27 February 2017.
  8. ^Leonard, Jim (2022)."IBM PC Sound Ramblings - The Best Sound You've Never Heard".The Oldskool PC. Retrieved31 August 2022.
  9. ^Schlunder, Edward (18 November 2006)."Resistor/Pulse Width Modulation DAC".K9spud Microcontroller Electronics. Archived fromthe original on 17 March 2017.

External links

[edit]
IBM compatible standards
Other standards
Related
Retrieved from "https://en.wikipedia.org/w/index.php?title=PC_speaker&oldid=1279161798"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp