DigitalWrite to pin 0 and 1 ?

Hi ladies&gentlemen,

Just wondering if it's possible to use the digital pin 0 and 1 on the duemilanove as normal digital output pins ? Doesn't the command digitalWrite (1, HIGH) hurt the serial communication on the USB... ::)

Thanks, Dries

As far as I know, digitalWrite() will work on pins 0 AND 1 when serial communication is inactive, so:

// digitalWrite on 0 and 1 working...
Serial.begin(...);
// digitalWrite on 0 and 1 NOT working...
Serial.end();
// digitalWrite on 0 and 1 working...

Somebody correct me, if I'm wrong...

Doesn’t the command digitalWrite (1, HIGH) hurt the serial communication on the USB

When outputting a low on pin 0 ( the RX input from the USB) you will have the USB / serial chip trying to output a high to it. Normally this would fry something but there is a 1K series resistor from the USB / serial chip so that stops any damage. However you will need to set the pin mode again as the serial makes it an input.