The number of antenna elements in phased arrays in 5G base stations has been rapidly increasing, as well as the number of Power Amplifiers (PAs) and Phase Shifters (PSs) connected to each antenna element. Commercial mm-wave base stations may now have more than 3000 PAs and PSs, and need calibration to ensure optimal array performance. Therefore, the allowable calibration time per element is very short. In this tutorial, a fast phased array calibration technique using an orthogonal code is introduced. This method can characterize a large number of the array elements simultaneously within a short measurement time. Additionally, solutions to challenges such as digital predistortion under non-identical PA distortion, will be discussed.