In post # 3 you wrote:
The LED is working if I set PortB.1=1 manually in code...........
Which is in contradiction with your last post.

Regards

Al.