This controller has 3 pins for each motor ( ENA, IN1, IN2 for the one motor, ENB, IN3, IN4 for the other) and you can control the motors by just setting "high" or "low"the corresponding pins. For example, fi you have one motor connected to ENA, IN1 and IN2 you stop the motor by setting the IN1 and IN2 pins to both "high" or "low". To change direction you set one of them to "high" or "low".

I plugged one motor and made a little code to test it, but the problem is that it doesn't change the rotation direction despite the fact that the leds on the controller change ( red and yellow) each time I set a command to change direction.

You really ought to use Project Designer from my website http://webbot.org.uk as it makes life much easier for you and will even generate the initial code to move the motor back and forth. It also create the AVRStudio project file - so all you have to do is compile and upload.

First of all: you don't need all those 'pin_make_output' commands. The reason that you tell the driver that it uses pins B4,B5,B6 is so that it can manage those pins for you.So here is a version of the code that should work (but I'm just typing it into the thread so it may have compile errors if I've made a typo).