Ps4 controller not connectring

I have a ps4 controller that is not charging o conecting wen using the micro usb port i have tried a different port out of another controller wich i know work and i have also tried a battery out of another controller again works fine on the other controller but still not working any advice would be much appreciated tha ks