Teensy 3.2 Spectrum analyzer

If the sample rate is 16384 Hz, then the maximum allowable frequency in the audio input stream is half that, or 8192 Hz. Any input signal component with higher frequency will be aliased and confuse the spectrum display.

I think what the code is doing is dividing the 64 display columns among the 512 values to get an equal change of pitch (not frequency) in each column.

Correct. The FFT frequency bins are grouped logarithmically on the x-axis, to correspond to the logarithmic response of human hearing.