S
S
SheJay2012-12-25 11:36:06
assembler
SheJay, 2012-12-25 11:36:06

Why is "ultrasound" heard?

Good afternoon, habralyudi. We are engaged in programming the system timer, or rather, programming the timer to play a melody. After experimenting with control words, we decided to reproduce ultrasound. We set the appropriate frequency and as a result heard clicks. Question: what is it?

Link to sources

Answer the question

In order to leave comments, you need to log in

6 answer(s)
S
SHeJay, 2012-12-29
@SHeJay

Launched in DosBox. The question has already been removed, today the teacher explained everything to us. Clicks are an incorrect program setting, they should not be when ultrasound is applied. We must hear the control frequency. Since when ultrasound is applied to one channel, a logical 1 is obtained there and playback begins. Something like this.

S
Stdit, 2012-12-25
@Stdit

The system speaker is not capable of generating a proper sinusoidal signal, and the rectangular ultrasonic signal most likely merges into one large rectangular pulse, the beginning and end of which is heard by the ear.

J
JDima, 2012-12-25
@JDima

How can you be sure that the DAC and speaker involved are capable of reproducing ultrasonic frequencies?

K
KEKSOV, 2012-12-25
@KEKSOV

Maybe you're just young and don't have Presbycusis hearing loss , so you just have a wide hearing range .
On this page you can "check" ...

S
SHeJay, 2012-12-25
@SHeJay

The system speaker is not capable of generating a proper sinusoidal signal, and the rectangular ultrasonic signal most likely merges into one large rectangular pulse, the beginning and end of which is heard by the ear.

Why can't the system timer generate a proper sine waveform?

E
elgordo, 2012-12-28
@elgordo

For starters, what OS are you running the whole thing under? If this is not a bare DOS, but at least already Windows 95, then this will not work normally, because. DOS applications run under a virtual machine whose speed is many times lower than a regular computer.
Secondly, I don't see interrupt disable commands in your program. Usually clicks during music playback mean that the system is causing some other (own) interrupts and preventing your program from playing sound.
In general, as much as I wrote under DOS in my youth, it is very difficult to get anything normal in terms of sound from the system speaker without disabling interrupts. Perhaps you simply do not have enough speed. Try running the program on another computer?
And clicks can also mean that you have some kind of timer overflowing and its value becomes 0, which is equivalent to 65536 for a two-byte counter and it works once with a low frequency, which gives a click.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question