Photovoltaic energy from renewable sources is becoming more prevalent nowadays, as part of the process of converting this energy to AC voltage and feeding it into the power grid network, the output voltage or injected current total harmonic distortion (THD) should be low, usually below 5 %. This unwanted distortion can lead to increased current in the PV inverter resulting in higher temperature and additional energy loss. To suppress injected grid current THD, an advanced controller, i.e. a proportional resonant (PR) control design is commonly used. In this work, we report an approach to optimally select parameters (Kp, Ki and Wc for this controller to suppress the THD, reduce leakage current, and ensure a unity power factor operation in the system. The control algorithm is implemented in an integrated digital signal processing evaluation board from TI-TMS320F28335 eZdsp board. In this paper, both simulation and experimental results are provided to demonstrate the effectiveness of the proposed technique in reducing the injected current THD through the development of 500 W micro-inverter prototype as a case study.