Now disconnecting the serial lines from pins 0 and 1 until you call Serial.begin(); that way they can be used as normal digital i/o.

This commit is contained in:
David A. Mellis 2006-11-20 17:02:57 +00:00
parent 22971709e4
commit 9964122513
2 changed files with 13 additions and 0 deletions

View File

@ -45,6 +45,11 @@ from Processing and Wiring.
UPDATES
0007
You can now use digital pins 0 and 1 for input or output until you call
Serial.begin().
0006 - 2006.10.21
Mac version no longer requires Java 1.5, meaning it should run on 10.3.9.

View File

@ -523,6 +523,14 @@ int main(void)
// enable a2d conversions
sbi(ADCSRA, ADEN);
// disconnect USART from pins 0 and 1 so they can be used as normal
// digital i/o; they will be reconnected in any call to Serial.begin()
#if defined(__AVR_ATmega168__)
UCSR0B = 0;
#else
UCSRB = 0;
#endif
setup();
for (;;)