The outputs from the cpu to the Toshiba M2 motor driver are identical even though the inention was to keep PB3 = Low and PD3 = high.
M1 motor is working fine but since the signals PB3 and PD3 are pulsing high and low at the same time the outputs from the motor driver are low. I have observed the pulses on a oscilloscope. Have also checked on a multimeter that PB3 and PD3 are not shorted on the Toshiba chip. Here is the simple code I am using to drive the two motors. M1 is working as expected. I have physical disconnected the USB program Loader board that use the PB3 pin for SPI interface. Any ideas why this is not working ?
#define F_CPU 20000000UL
#include <avr/io.h>
#include <util/delay.h>
#include <pololu/orangutan.h>
int main (void)
{
DDRD |= 0b01101010; //m1 (bit 5 and 6) and m2 (bit 3)
DDRB |= 0b00001000; //m2 (bit 3)
DDRC |= 0b01000000;
PORTC |= 0b01000000; //disables motor standby
while (1)
{
PORTD |= 0b00101010;
PORTB &= ~0b00001000;
}
return 0;
}