RPiのGPIOで1Mhzのクロックをだそうとして失敗。
http://qiita.com/7of9/items/d4c2ec34c368569e0882
関連して、ESP8266ではどうなのかと疑問に思った。
以下を見つけた。
The fastest I was able to get it going on GPIO output was 5.172 KHz.. for a 80 Mhz device, that's a huge order of magnitude of terrible.
...
In pure C tight loop in AVR maybe 1Mhz
using Arduino calls to their API maybe 250khz
on 80Mhz 32 bit platform... maybe 10-20Mhz
...
Arudino IDEを使うと5kHz程度が限界ということだろうか。
PWMを使う?
PWMを使って31kHzを出している例がある。