I recently had a similar need for more I/O pins ;-)You can do it, but you must disable the UART the 'hard way'. It is activated by default and overrides the pin-direction (input/output) internally in hardware. Once you've disabled it you cannot use any hardware serial communication anymore (in that program).Insert this at the very beginning of setup()Code: [Select]UCSR0A = 0x00;UCSR0B = 0x00;UCSR0C = 0x03;This sets the uart control & status registers to their default values and turns the uart + port override off.
UCSR0A = 0x00;UCSR0B = 0x00;UCSR0C = 0x03;
That data was taken with the collector wired to Vcc and the emitter to GND + amp-meter in there.Anyhow, it needs 5V to turn on fully. If you only need 40mA per channel that is of less a concern.Maybe this datasheet is a bit clearer on how the values were obtained:http://www.datasheetcatalog.org/datasheet/allegromicrosystems/2801.pdf
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16