How to get 20khz PWM on pin D9

SouthernAtHeart:
I've spent an hour reading through pages like "secretOfArduinoPWM", "PwmFrequency", "TimerPWNCheatsheet", About all I could get was that something called TCCR1B affects the timer1 which operates pin 9. This is WAY over my head. I've seen different examples, but I don't even know which of them to start with.

That's a good start. Each of the three timers has two PWM outputs (A and B). For Pin 9 you have to look at which timer controls it:

That spreadsheet shows that on an UNO the Pin 9 PWM comes from Timer 1 output A (T1A) and on the ATmega it's known as Port B Pin 1 (PB 1). If you switch to a Mega you need to change to Timer 2 output B (T2B) which on the ATmega is known as Port H Pin 6 (PH 6).

Knowing you want Timer/Counter 1 you read that section of the datasheet. It talks about the Timer Counter Registers: TCCR1A, TCCR1B, and TCCR1C (they had too many bit to fit in one byte so they made it into three registers).
TIMSK1: The Interrupt Mask Register. Since you aren't using interrupts this remains 0.
TIFR1: Interrupt Flag Register. Since you aren't using interrupts this isn't important.
Since it is a 16-bit counter the other registers are two bytes each:
TCNT1: The actual timer/counter count
OCR1A: The 'A' Output Compare Register that is associated with Pin 9
OCR1B: The 'B' Output Compare Register associated with a different pin.
ICR1: The Input Capture Register. In out case we are using it to set the TOP of the counting range so the counter doesn't go all the way to 65535.