Intelligent NiCd/NiMH Battery Charger using PIC16C711