Truncated match.
PICList
Thread
'Music [OT]ones'
1999\01\04@064900
by
paulb
|
Myke Predko wrote:
> 1. If this is a PC Speaker, then it cannot output a sine wave. I
> don't understand where these comments are coming from. The PC's
> speaker is the timer overflow output driven to a cap and a speaker.
Nearly right, but forget the capacitor for starters. There isn't one.
It puts up with the DC bias.
> 2. The period of the square wave driving the speaker is produced by
> the 8253/8254 timer built into the PC's motherboard. The timer is
> normally loaded with a "reload" value that determines the frequency of
> the timer's overflow, which is the square wave output.
Err, no, it's the MSB actually (for most practical purposes/ timer
modes). For single tones, you load the timer, enable it and count clock
ticks (18.6Hz) for the duration.
But in fact, and noting Bill Westfield's comments, there are two
sources to the speaker; the timer chip and an an override bit which IIRC
is in the keyboard interface. The "speech" and "music" programs use
bit-banging (PWM, Magic Sinewaves etc.) on this bit to do the dirty
work.
The good ones, hopefully Eric's coprolalic ejaculation included,
use the timer to call the shots. The archetypal one, "DRAIN.COM", uses
program loops and regrettably, *only* works on a genuine PC/XT.
--
Cheers,
Paul B.
1999\01\04@132349
by
myke predko
|
Paul Webster wrote:
>> 1. If this is a PC Speaker, then it cannot output a sine wave. I
>> don't understand where these comments are coming from. The PC's
>> speaker is the timer overflow output driven to a cap and a speaker.
>
> Nearly right, but forget the capacitor for starters. There isn't one.
>It puts up with the DC bias.
Yes, you're right (I just checked with my Tech Ref). It is a 75477 driving
a 30 Ohm resistor (with a 0.01 uF cap) and 8 Ohm speaker.
>> 2. The period of the square wave driving the speaker is produced by
>> the 8253/8254 timer built into the PC's motherboard. The timer is
>> normally loaded with a "reload" value that determines the frequency of
>> the timer's overflow, which is the square wave output.
>
> Err, no, it's the MSB actually (for most practical purposes/ timer
>modes). For single tones, you load the timer, enable it and count clock
>ticks (18.6Hz) for the duration.
Are you sure about that? When I've looked at it with a scope, it's a square
wave.
> But in fact, and noting Bill Westfield's comments, there are two
>sources to the speaker; the timer chip and an an override bit which IIRC
>is in the keyboard interface. The "speech" and "music" programs use
>bit-banging (PWM, Magic Sinewaves etc.) on this bit to do the dirty
>work.
Sorry, I forgot about the Keyboard controller bit - I try to avoid using it
because the timer port requires less effort than the timer. For anything
other than a tone, I'll use the Soundblaster (and I'll use it most of the
time anyway).
myke
Myke's 1998 book of the year, "Citizen Soldiers" by Stephen Ambrose. Find
out more at:
http://www.myke.com/Book_Room/book1a.htm
Learn more about the Apollo 13 disaster in this weeks' book at:
http://www.myke.com/Book_Room/book1a.htm
Coming Very Soon - "Programming and Customizing the 8051 Microcontroller".
Find out more at:
http://www.myke.com/My_Books/pac8051.htm
1999\01\10@064134
by
paulb
Myke Predko wrote, quoting myself:
>> Err, no, it's the MSB actually (for most practical purposes/ timer
>> modes). For single tones, you load the timer, enable it and count
>> clock ticks (18.6Hz) for the duration.
That is, to determine the duration in the easiest manner.
> Are you sure about that? When I've looked at it with a scope, it's a
> square wave.
The timer has various modes - can output a "terminal pulse" for the
last clock cycle in mode 2, but the "standard" mode 3 rather cleverly
divides the count in two and outputs high for (N+1)/2 counts, low for
N/2 counts. According to The Book.
--
Cheers,
Paul B.
More... (looser matching)
- Last day of these posts
- In 1999
, 2000 only
- Today
- New search...