Hi I would like some help please if possible.
I have not been able to get the serial monitor to show data transmitted by the ATTiny85 as I need it to continue with my projects:
These are the connections between the ATtiny and the Arduino Uno:
- Tiny physical pin 1 to Arduino pin 10
- Tiny physical pin 5 to Arduino pin 11
- Tiny physical pin 6 to Arduino pin 12
- Tiny physical pin 7 to Arduino pin 13
- Tiny physical pin 4 to Arduino pin GND
- Tiny physical pin 8 to Arduino pin 5V
- 10uF capacitor between Arduino Reset and Ground
This is the configuration of Arduino IDE I am using for the ATtiny85:
- Tools > Board > ATTiny25/45/85
- Tools > Processor ATTiny85
- Tools > Clock > Internal 8MHz
- Tools > Port > Com7 (Arduino Uno)
- Tools > Port > Programmer: Arduino as ISP
- tools > Burn Bootloader - successful
I am using Windows 10 and Arduino IDE 2.3.6.
This is what I have tried so far:
- Cleared all wires and components from the Arduino Uno R3
- Set the board settings to Arduino Uno; com port 7
- Uploaded the Bare Minimum sketch to clear the board
- Uploaded the Examples > Basics > Blink sketch to check that the board is working okay. The Built-In LED blinked regularly.
- Uploaded a basic Arduino Serial Monitor sketch and it worked perfectly
- Uploaded the Examples > 11.ArduinoISP > ArduinoISP sketch
- Uploaded a basic ATTiny85 Blink sketch using Tiny physical pin 5 - successful
- Ran the same sketch using physical pins 2 and 3 as output pins - successful each time.
- Uploaded the sample sketch using ATTiny physical pin 3 as transmission pin.
- Connected ATTiny physical pin 3 to Arduino RX / 0 - just a continuous line of "?". The baud is the same in the sketch and serial monitor and the TX LED on the Arduino is flashing regularly.
- Swapped USB cables.
- Swapped Arduinos.
- Changing the baud rate, up or down, only changes the character displayed.
I think I have proved the Arduino Uno is okay and the ATTiny85 is okay and that I am using the correct Transmit / Receive pins.
I have tried many different sketches from many different sources and keep getting the same result.
Does anyone have any ideas please?
Here is the sketch:
#include <SoftwareSerial.h>
#define RX 3 //Receive using ATTiny digital pin 3 / physical pin 2
#define TX 4 //Transmit using ATTiny digital pin 4 / physical pin 3
const int kpinLed = 0; //Physical pin 5 on Tiny
//Set up a SoftwareSerial object
SoftwareSerial mySerial(RX, TX); //(Target MCU: ATtiny digital pin PB3, physical pin 2; digital pin PB4, physical pin 3)
void setup() {
//Set the baud rate for the SoftwareSerial object
mySerial.begin(9600);
pinMode(kpinLed, OUTPUT); //Set ATTiny physical pin 5, digital pin d0 as output
mySerial.println("Initializing...");
digitalWrite(kpinLed, HIGH);
delay(1000);
digitalWrite(kpinLed, LOW);
mySerial.println("Setup complete");
}//end setup
void loop() {
mySerial.println("Hello World");
digitalWrite(kpinLed, HIGH);
delay(2000);
digitalWrite(kpinLed,LOW);
delay(2000);
}//end loop
Thank you in advance to all those taking the trouble to respond.