In my sketch I specify begin(9600) but on Serial Monitor the output will be correct only at 1200 baud. Other SM settings produces garbled output of various sort depending on baud rate, at 9600 backward question marks.
UKHeliBob:
What type of Arduino board are you using ?
I didn't mention - I have an ATTiny85 on a Sparkfun AVR programmer board and have wired a USB-Serial cable to it. The green and white wires go to pins 3 and 4 (physical 2 and 3) on the Tiny.
Are you sure? The chips run at 1 MHz by default. If the chip is running at 1 MHz but you are compiling the code for 8 MHz, that would result in just the behavior you experienced. In order to configure the ATtiny85 to run at 8 MHz, you can do a Tools > Burn Bootloader in the Arduino IDE.
pert:
Are you sure? The chips run at 1 MHz by default. If the chip is running at 1 MHz but you are compiling the code for 8 MHz, that would result in just the behavior you experienced. In order to configure the ATtiny85 to run at 8 MHz, you can do a Tools > Burn Bootloader in the Arduino IDE.
I burned the bootloader and it works! Being a newbie, I have things to learn. Thanks !