PC speaker
Encyclopedia
A PC speaker is a loudspeaker
Loudspeaker
A loudspeaker is an electroacoustic transducer that produces sound in response to an electrical audio signal input. Non-electrical loudspeakers were developed as accessories to telephone systems, but electronic amplification by vacuum tube made loudspeakers more generally useful...

, built into some IBM PC compatible
IBM PC compatible
IBM PC compatible computers are those generally similar to the original IBM PC, XT, and AT. Such computers used to be referred to as PC clones, or IBM clones since they almost exactly duplicated all the significant features of the PC architecture, facilitated by various manufacturers' ability to...

 computers. The first IBM Personal Computer, model 5150, employed a standard 2.25 inch magnetic driven speaker. More recent computers use a piezoelectric speaker instead. The speaker allows software and firmware
Firmware
In electronic systems and computing, firmware is a term often used to denote the fixed, usually rather small, programs and/or data structures that internally control various electronic devices...

 to provide auditory feedback
Feedback
Feedback describes the situation when output from an event or phenomenon in the past will influence an occurrence or occurrences of the same Feedback describes the situation when output from (or information about the result of) an event or phenomenon in the past will influence an occurrence or...

 to a user, such as to report a hardware fault. A PC speaker generates waveforms using the programmable interval timer
Programmable Interval Timer
In computing and in embedded systems, a programmable interval timer is a counter which triggers an interrupt when it reaches the programmed count.- Common features :...

.

BIOS error codes

The PC speaker is generally the first output device
Output device
An output device is any piece of computer hardware equipment used to communicate the results of data processing carried out by an information processing system to the outside world....

 to be activated during the boot process
Booting
In computing, booting is a process that begins when a user turns on a computer system and prepares the computer to perform its normal operations. On modern computers, this typically involves loading and starting an operating system. The boot sequence is the initial set of operations that the...

. Since it is active before the graphics card, it can be used to communicate error codes related to problems that prevent the much more complex initialization of the graphics card to take place. For example the Video BIOS
Video BIOS
Video BIOS is the BIOS of a graphics card in a computer.Much the way the system BIOS provides a set of functions that are used by software programs to access the system hardware, the video BIOS provides a set of video-related functions that are used by programs to access the video hardware...

 usually cannot activate a graphics card unless working RAM is present in the system, while beeping the speaker is doable with just ROM and the CPU registers. Usually, different error codes will be signaled by specific beeping patterns, such as e.g. "one beep; pause; three beeps; pause; repeat". These patterns are motherboard
Motherboard
In personal computers, a motherboard is the central printed circuit board in many modern computers and holds many of the crucial components of the system, providing connectors for other peripherals. The motherboard is sometimes alternatively known as the mainboard, system board, or, on Apple...

 specific and are usually documented in the technical manual of the motherboard.

Games

The PC speaker was often used in very innovative ways to create the impression of polyphonic
Polyphony
In music, polyphony is a texture consisting of two or more independent melodic voices, as opposed to music with just one voice or music with one dominant melodic voice accompanied by chords ....

 music or sound effects within computer games of its era, such as the LucasArts
LucasArts
LucasArts Entertainment Company, LLC is an American video game developer and publisher. The company was once famous for its innovative line of graphic adventure games, the critical and commercial success of which peaked in the mid 1990s...

 series of adventure games from the mid-1990s, using swift arpeggios. Several games such as Space Hulk and Pinball Fantasies
Pinball Fantasies
Pinball Fantasies is an Amiga pinball game developed by Digital Illusions CE in late 1992, as a sequel to Pinball Dreams. A further sequel was released in 1995 called Pinball Illusions.- Tables :...

were noted for their elaborate sound effects; Space Hulk in particular even had full speech.

Other programs

Several programs, including MP (Module Player, 1989), ScreamTracker, Fast Tracker
Fast Tracker
FastTracker 2 is a tracker created by Fredrik "Mr. H" Huss and Magnus "Vogue" Högdahl, two members of the demogroup Triton which set about releasing their own tracker after breaking into the scene in 1992 and winning several demo competitions. The source code of FastTracker 2 is written in Pascal...

, Impulse Tracker
Impulse Tracker
Impulse Tracker is a multi-track digital sound tracker . It was one of the last tracker programs for the DOS platform. It was authored by Jeffrey "Pulse" Lim, and example music was provided by Jeffrey Lim and Chris Jarvis...

, and even device drivers for Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 and Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

, could play pulse-code modulation
Pulse-code modulation
Pulse-code modulation is a method used to digitally represent sampled analog signals. It is the standard form for digital audio in computers and various Blu-ray, Compact Disc and DVD formats, as well as other uses such as digital telephone systems...

 (PCM) sound through the PC speaker using special techniques explained later in this article.

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
Skype
Skype is a software application that allows users to make voice and video calls and chat over the Internet. Calls to other users within the Skype service are free, while calls to both traditional landline telephones and mobile phones can be made for a fee using a debit-based user account system...

 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 or the amplifier is turned off).

Pinouts

In some applications, the PC speaker is affixed directly to the computer's motherboard
Motherboard
In personal computers, a motherboard is the central printed circuit board in many modern computers and holds many of the crucial components of the system, providing connectors for other peripherals. The motherboard is sometimes alternatively known as the mainboard, system board, or, on Apple...

; in others,including the first IBM Personal Computer, the speaker is attached by wire to a connector on the motherboard. A wired PC speaker connector may have a two-, three-, or four-pin configuration, and either two or three wires. The female connector
Gender of connectors and fasteners
In electrical and mechanical trades and manufacturing, each half of a pair of mating connectors or fasteners is conventionally assigned the designation male or female...

 of the speaker connects to pin headers on the motherboard, which are sometimes labeled or .
4-pin, 3-wire PC speaker pinout
Pin Number Pin Name Pin Function
1 -SP Speaker negative
2 [KEY] None (unwired)
3 GND Ground
Ground (electricity)
In electrical engineering, ground or earth may be the reference point in an electrical circuit from which other voltages are measured, or a common return path for electric current, or a direct physical connection to the Earth....

4 +SP5V Speaker positive

Pulse-width modulation

The PC speaker is normally meant to reproduce a square wave
Square wave
A square wave is a kind of non-sinusoidal waveform, most typically encountered in electronics and signal processing. An ideal square wave alternates regularly and instantaneously between two levels...

 via only 2 levels of output. However, by carefully timing a short pulse
Pulse (signal processing)
In signal processing, the term pulse has the following meanings:#A rapid, transient change in the amplitude of a signal from a baseline value to a higher or lower value, followed by a rapid return to the baseline value....

 (i.e. going from one output level to the other and then back to the first), it is possible to drive the speaker to various output levels in between the two defined levels. This effectively allows the speaker to function as a crude DAC
Digital-to-analog converter
In electronics, a digital-to-analog converter is a device that converts a digital code to an analog signal . An analog-to-digital converter performs the reverse operation...

, thereby enabling approximate playback of PCM audio. This technique is called pulse-width modulation
Pulse-width modulation
Pulse-width modulation , or pulse-duration modulation , is a commonly used technique for controlling power to inertial electrical devices, made practical by modern electronic power switches....

 (PWM) and is notably used in class D audio amplifiers.

With the PC speaker, this method achieves limited quality playback; the quality depends on a trade-off between the PWM carrier frequency (effective sample rate) and the number of output levels (effective bitrate). The clock rate of the PC's programmable interval timer
Programmable Interval Timer
In computing and in embedded systems, a programmable interval timer is a counter which triggers an interrupt when it reaches the programmed count.- Common features :...

 which drives the speaker is fixed at 1,193.18 KHz. This relatively low modulation frequency limits the resolution and produces poor but recognizable audio.

This use of the PC speaker became obsolete with the introduction of the Sound Blaster
Sound Blaster
The Sound Blaster family of sound cards was the de facto standard for consumer audio on the IBM PC compatible system platform, until the widespread transition to Microsoft Windows 95, which standardized the programming interface at application level , and the evolution in PC design led to onboard...

 and other sound cards.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK