We compute the spectrum of the Dirac operator on 3-dimensional Heisenberg manifolds. The behavior under collapse to the 2-torus is studied. Depending on the spin structure either all eigenvalues tend to $\pm\infty$ or there are eigenvalues converging to those of the torus. This is shown to be true in general for collapsing circle bundles with totally geodesic fibers. Using the Hopf fibration we use this fact to compute the Dirac eigenvalues on complex projective space including the multiplicities. Finally, we show that there are 1-parameter families of Riemannian nilmanifolds such that the Laplacian on functions and the Dirac operator for certain spin structures have constant spectrum while the Laplacian on 1-forms and the Dirac operator for the other spin structures have nonconstant spectrum. The marked length spectrum is also constant for these families.