tone command time limits?

project: IRLED Remote control
LED is on pin 4
using tone(4,40000); with no duration specified to drive the LED works, but if I use the following,
code it doesn't work.!
tone(4,40000);
delayMicroseconds(625);
noTone(4);
delayMicroseconds(625);
tone(4,40000);
delayMicroseconds(625);
noTone(4);
etc.
Is there a lower limit to the tone duration? I didn't see one in the programming reference.

See my topic "piano tones micros" for making your own tone. Can be played as long as you want - button push, flag, serial read, timer (blink without delay based).

hello,

you can see here : Google Code Archive - Long-term storage for Google Code Project Hosting.

Pierre

your question has nothing to do with time limits. I am not sure the upper limit of frequency for tone. but by using tone(4,40000), you mean you want a tone with frequency of 40000Hz, which is ultrasonic and beyond what we can hear.

In addition, delay of 625 microseconds maybe too short for human ear, even if arduino can do it.

1/.000625 = 1600, definitely hearable.

CrossRoads:
1/.000625 = 1600, definitely hearable.

1600 is the number of times the tone is started and stopped in one second. If the frequency is out of the audible range, I don't see what bearing the number of times per second you play the tone has to do with anything.