You can't do this with pwmWrite.
You'll have to generate your signals explicitly pin by pin ,and use delays to get the timing.
eg here's some code I wrote to drive a 6-phase motor...
void setup() {
pinMode (2, OUTPUT);
pinMode (3, OUTPUT);
pinMode (4, OUTPUT);
pinMode (5, OUTPUT);
pinMode (6, OUTPUT);
pinMode (7, OUTPUT);
noInterrupts() ;
}
const byte pulseDelay = 11;
const byte pattern[] = {0, 0b00011100, 0, 0b00111000, 0 , 0b01110000,
0, 0b11100000, 0, 0b11000100, 0, 0b10001100
};
byte i = 0;
void loop() {
while (1) {
PORTD = pattern[i++];
if (i >= sizeof(pattern)) i = 0;
delayMicroseconds(pulseDelay);
}
}
I know it's clunky, but can't think of a better way offhand.
Note the use of noInterrupts() and the while(1) loop.
These disable the millis() and loop() background tasks - otherwise you get significant jitter.
Allan