> For the complete documentation index, see [llms.txt](https://ubtechedu.gitbook.io/chinese/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ubtechedu.gitbook.io/chinese/arduino-language/functions/time/delaymicroseconds-us.md).

# delayMicroseconds(us)

使程序暂停指定的一段时间（单位：微秒）。

### 参数

| 参数名 | 描述                       |
| --- | ------------------------ |
| us  | 暂停的时间，单位微秒（unsigned int） |

### 例子 <a href="#li-zi" id="li-zi"></a>

```c
int outPin = 8;                 // digital pin 8
 
void setup()
{
pinMode（outPin，OUTPUT）; //设置为输出的数字管脚
}
 
void loop()
{
digitalWrite（outPin，HIGH）; //设置引脚高电平
  delayMicroseconds(50);        // 暂停50微秒
  digitalWrite(outPin, LOW);    // 设置引脚低电平
  delayMicroseconds(50);        // 暂停50微秒
}
```

将8号引脚配置为输出脚。它会发出一系列周期100微秒的方波。

### 警告和已知问题 <a href="#jing-gao-he-yi-zhi-wen-ti" id="jing-gao-he-yi-zhi-wen-ti"></a>

此函数在3微秒以以上工作的非常准确。我们不能保证，delayMicroseconds在更小的时间内延时准确。
