This paper presents a bidirectional DC-DC converter with high gain voltage, based on three state switching cell, to charge a battery bank with 96 Vdc operating voltage connected to a 380 Vdc nanogrid bus. This converter can be applied to a DC current nanogrid for residential prosumers and the battery bank can be used to power an electric vehicle, as well as provide power to the nanogrid DC bus. The converter can operate in buck or boost modes. The proposed control aims to guarantee both the bidirectionality of the power flow of the converter and the stability of the reference in steady state. For this, a cascade digital control system is designed through of the average current mode control technique, whose effectiveness of the control implementation and the bidirectionality of the converter are proven and presented by simulation.