Maximum pin toggle speed

The code is what selfonlypath posted a while ago. Note that this does NOT generate "very fast PWM signals"; it just uses the same PWM peripheral to generate a very fast waveform (2 bits of PWM. OFF and ON) To retain the 256-bit "analogWrite" capability, the overall frequency will need to be much lower. Still, you can probably get something like 16kHz or 32kz just by changing the clock source in TCCR1B