Trying to use PortB

Thank you for your response.

I tried your code and it doesn´t work (I´m using arduino mega 2560). It turns on 10 and 11.

With PortD it works as with this.

I don´t know what else I should make.