In this paper, a novel time domain method by using a modified time domain reflectometry is presented for high accuracy modeling of microstrip discontinuities. The ordinary stimulus signals used in the TDR technique are voltage step or voltage impulse. In this paper, we propose an alternative technique, whereby a modified excitation pulse based on Barker-Code orthogonal pulses is employed as the stimulus signal in TDR. The advantage conferred by "Barker codes TDR" is that more energy is available at higher frequencies in contrast with conventional step or impulse TDR, and so a higher bandwidth and higher accuracy of the line impedance is achieved. It can also be advantageous when the user is looking for precision in spatial localization, say in a connector or similar in-line structure, as the increased energy at higher frequencies can help. Simulated results are presented to validate the usefulness of the proposed method for calculating the precise amount of time-dependent equivalent circuit of microstrip discontinuity.