Concentrate on one bridge and motor to begin with, when you have that working apply the same procedure to the second bridge/motor.
Bridge 1 is controlled In1, In2 and ENA - in your case (according to your latest schematic) PortD.0, PortD.1 and PortC.4 respectively.
To drive the motor forward you drive PortD.0 high, PortD.1 low and apply the PWM signal to PortC.4
Code:
PortD.0 = 1
PortD.1 = 0
Main:
For i = 0 to 200 ' Ramp up.
PWM PortC.4, i, 10
NEXT
For i = 200 to 0 Step -1 ' Ramp down.
PWM PortC.4, i, 10
NEXT
Pause 500
Goto Main
According to the photo of the board there are a jumper for each bridge which says Remove jumper for PWM - did you do that? If you didn't the EN-pins are tied high and will short your PWM signal to the boards Vcc.
/Henrik.
Bookmarks