Text this: DSP-based fuzzy logic controller for a battery charger