[PD] how to pd2stepper motor?
Martin Peach
martin.peach at sympatico.ca
Fri Oct 6 15:53:41 CEST 2006
Georg Holzmann wrote:
> Hallo!
>
>> As far as steppers go it would be nice to have arduino commands for
>> steppers. It looks like the existing pduino firmware code can only
>> change one pin at a time, it would be nice to have a parallel digital
>> pin command with a mask like set_digital_outs(int output_pattern, int
>> mask) so the set bits in mask would be changed, at the same time,
>> according to output_pattern and the zero bits would be unaffected.
>
> AFAIR it is like this - only that the output bits are splitted in 2
> halfs (7 lower and 7 higher bits) ...
In the Pd_firmware.pde code the pins are set on at a time even if the
data is sent as two bytes:
for(i=0; i<7; ++i) {
mask = 1 << i;
if( (digitalPinStatus & mask) && !(pwmStatus & mask) ) {
digitalWrite(i, inputData & mask);
}
}
Martin
More information about the Pd-list
mailing list