Arduino Tiny

Coding Badly,

Slowly working on TinyDebugSerial.

A clarification please. From http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1285218245/25#25
"Serial transmit pin is PB3 / pin 3. Basically, the transmit pin is the first I/O pin in the upper-left corner. " I soldered up pin 3 in my TinyDuino and tried it but no joy. I assigned pin 2 to as output to power a diagnostic LED as well.

Checking the data sheet, PB3 is pin 2 and is the first I/O pin in the upper left corner (not counting /RESET, which can be used for I/O if you want it bad enough?). This means the pin 2 LED output assignment was stomping on TinyDebugSerial.

So... I am switching to pin 2, and modifed the test sketch to what is attached below. Did I get all this correct? Want to clarify so others can follow.

/*

ATMEL ATTINY45/ARDUINO:
                  +--\/--+
 Ain0 (D5) PB5  1 |      | 8  VCC
 Ain3 (D3) PB3  2 |      | 7  PB2 (D2) Ain1 INT0
 Ain2 (D4) PB4  3 |      | 6  PB1 (D1) pwm1
           GND  4 |      | 5  PB0 (D0) pwm0
                  +------+

*/ 

#define LED_PIN           4                     // ATtiny Pin 3 (D4)

void setup(){
  pinMode(LED_PIN,OUTPUT);                      // for general DEBUG use
  LED_Blink(LED_PIN,2);                         // show it's alive
  Serial.begin(9600);
}

void loop() {
  int test = 0x31;
  Serial.println( F("This string only consumes Flash.") );
  Serial.print(test);
}

// LED blinker for status
void LED_Blink(byte pin, byte times){
  for (byte i=0; i< times; i++){
    digitalWrite(pin,LOW);
    delay (1000);
    digitalWrite(pin,HIGH);
    delay (1000);
  }
}

Thanks again for all the help,
George