PD7 can generate a square wave, but the function has not been tested yet