Generating sine wave from square wave discussion

Question description

#include “mbed.h”PwmOut PwmPin (p22);int main() {PwmPin.period(0.000005);  // Set frequency to 200,000 Hz (period = 5 us)     while(1){ //infinite loop     PwmPin.write(0);  // Set the duty cycle to 0%  wait_us(500); // wait 100 PWM cyles     PwmPin.write(1);  // Set the duty cycle to 100%  wait_us(500);  // wait 100 PWM cycles     }     }Hi I’m working on mbed LPC1768. I have generated 1kHz square wave from 200 kHz wave using PwmOut (pin22). I need to convert that square wave into sine wave but i don’t know how to do it. Please help me. Thank youRavneet