[bascom] potrzebuję procedurę czestotliwosc(argument)

Witam.

Potrzebuję procedurkę, która wyśle na głośniczek (podłączony do jakiegoś portu) zadaną częstotliwość. W grę wchodzą oczywiście tony słyszalne dla ucha ludzkiego.

Potrzebuję czegos w rodzaju czestotliwosc(argument), gdzie argument jest zadawaną wartością w [Hz].

Interesuje mnie zarówno bascom 51 jak i AVR.

Z góry dzięki za pomoc!

Reply to
Mariusz
Loading thread data ...

Mariusz napisał(a):

A po co szukać jak w Bascomie 8051 już coś takiego dawno jest? :-) Poczytaj w helpie na temat polecenia Sound.

Reply to
badworm

formatting link

Reply to
Mariusz

Mariusz napisał(a):

Albo ktoś tu się myli albo help Bascoma 8051 kłamie: "Action Sends pulses to a port pin.

Syntax SOUND pin, duration, frequency [,NOINT]

Remarks

pin Any I/O pin such as P1.0 etc. duration The number of pulses to send. Byte, integer/word or constant. (1- 32768). Frequency The time the pin is pulled low and high. NOINT An option to disable interrupts during the sound statement. "

Bascom College z EdW również mówi o częstotliwości.

Reply to
badworm

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.