When was Moshe on Har Sinai to atone for Yisrael's sin?
In Shemos 33:11, Rashi states that Moshe ascended Har Sinai for the second time on the 19th of Tamuz! See Sifsei Chachamim there.
Rashi: The atonement was only completed however, when, after ascending the Mountain for the third time on Rosh Chodesh Elul, he descended with the second Luchos on Yom Kipur, and Hashem forgave them with Simchah and announced 'Salachti ki'Devarecha!' - which explains why Yom Kipur became the day of atonement.