  Oxide materials are important candidates for the next generation of
electronics due to a wide array of desired properties which they can exhibit
alone or when combined with other materials. While SrTiO$_3$ (STO) is often
considered a prototypical oxide, it too hosts a wide array of unusual
properties including a two dimensional electron gas (2DEG) which can form at
the surface when exposed to UV light. Using layer-by-layer growth of high
quality STO films, we show that the 2DEG only forms with the SrO termination
and not with the TiO$_2$ termination, contrary to expectation. This behavior is
similarly seen in BaTiO$_3$ (BTO), in which the 2DEG is only observed for BaO
terminated films. These results will allow for a deeper understanding, and
better control, of the electronic structure of titanate films, substrates and
heterostructures.
