DC-DC conversion standalone code. Based on Jorge's original code