Basic logic of transfering data.

It is not gonna be UNO,only Atmega328 used as a display controller,ADC,and sender of data.I will burn them only with UNO.I want to use two digital pins.One as a ,,clock,,(if will be HIGH UNO will write a blinks powered by another pin as a number like 0111000).If one of the pins will be LOW,MEGA will write a blinks as a number like 0111001.That is it .A lot of skecht of ,,ifs,, can do what I want.Is there in programming any other options????Thanks.