In this paper, a bidirectional buck-boost converter for connecting energy storages to a DC microgrid is presented. The integration of energy storages into the microgrid allows an enhanced utilization of renewable energy sources. Therefore, an efficient control of energy storages and corresponding power converters is required. Two operating modes of the converter are considered: current control mode and voltage control mode. Current control enables efficient charge/discharge process of energy storages whereas the voltage control is responsible for maintaining the microgrid bus voltage. Both modes have different applications in a microgrid operation. An averaged model of the converter was derived for controller design purposes and utilized for development of a cascaded contol loop. Controller parameters are chosen by using the root locus method. The developed model and control structures are validated through simulations of a detailed converter model in PLECS.