USB ATTiny85 comms vs. SoftwareSerial - Solved See post #48

So far, so good. Any guidance on which T85 option to select?

Not deeply committed, but I just got these so was hoping they'd be sufficient. 
I'm wondering though, since this board has all the pins available could I use it as a standalone chip by simply ignoring the USB plug and making any connections on the breakout pads?

I think this is a known problem. The site it tries to download the file from is down, and has been for some time. I don't know if an alternate source is available.

See @Deva_Rishi's post USB ATTiny85 comms vs. SoftwareSerial - #20 by Deva_Rishi

Not quite. Not with the Micronucleus bootloader. There was just a discussion about a month ago on this forum. The poster had a Digi spark board. A certain pin was being pulled low at boot up and the program would not run. I forget which pins were the problem and I'm not where I can look at the moment, but he was pulling down one of the pins connected to the USB d+ or d-. So you need to be careful of that.

No experience with it but i suspect the lowest one of the highlighted options.

I am also not sure if tinySerial is included in the core (v1.5.2) or whether you need to include it yourself.
Core 2.0.0 is still beta and largely untested, but will include important improvements to some chips.

I got a compile with the Micronucleus/Digispark board AND included SoftwareSerial.h.
Yay!

There are a couple of warnings relating to possibly non-inlinable SoftwareSerial code.

Off to do some tinkering.

ATtinyCore 2.0.0 is indeed largely untested, with lots of improvements in terms of overall smaller sketches and more efficient core functions, but it has so many bugs it's a show stopper for anything remotely serious.

I encourage you to test TinyCore instead!

TinyCore is a fork of ATtinyCore 2.0.0 that have gone though extensive testing on read hardware. It has a ton of improvements like excellent bootloader support, PlatformIO support, greatly improved documentation and full hardware debugger support.

TinyCore is actively maintained by me. I have lots of experience with 3rd party Arduino cores like this, and the most popular core I currently maintain is MiniCore. Give TinyCore a try and have a look at the README!

https://github.com/MCUdude/TinyCore

Personally i rarely use the MCUs in the core package, the occasional 2313 but i mostly use the 13a for all sorts of things and find it easily suffices for a task at hand.

Okay, I've got a working, mostly, example.

The T85 sketch (with serial monitor open at 115200 baud):

/*
  Blink

  Turns an LED on for one second, then off for one second, repeatedly.

  Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
  it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
  the correct LED pin independent of which board is used.
  If you want to know what pin the on-board LED is connected to on your Arduino
  model, check the Technical Specs of your board at:
  https://www.arduino.cc/en/Main/Products

  modified 8 May 2014
  by Scott Fitzgerald
  modified 2 Sep 2016
  by Arturo Guadalupi
  modified 8 Sep 2016
  by Colby Newman

  This example code is in the public domain.

  https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/

#include <Arduino.h>
#include <SoftwareSerial.h>

#define tinyRcv 2
#define tinySend 1
// port order is RX, TX
SoftwareSerial mySerial(tinyRcv,tinySend);


void setup() {
 mySerial.begin(115200);

  pinMode(LED_BUILTIN, OUTPUT);

  mySerial.println("goodnight!");
  mySerial.println("second line");
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(1200);                      // wait for a second
  digitalWrite(LED_BUILTIN, LOW);   // turn the LED off by making the voltage LOW
  delay(1200); 
  mySerial.println("gouten tag") ;                    // wait for a second;
}

There's an UNO R3 running the bare minimum sketch.

The schematic:

This is the serial monitor output:

Notice the text printed in Setup() is fine but text printed in loop() is gibberish - although it's repeating gibberish. I've tried baud rates to 300 and it gets no better - in fact at really low rates print fails completely.

The board info:

Additional Board Manager URLs:
http://drazzy.com/package_drazzy.com_index.json
https://raw.githubusercontent.com/digistump/arduino-boards-index/master/package_digistump_index.json

I was wondering, is there any change needed here?

I can't speak for ATTinyCore, but it looks like the internal oscillator is quite off and needs calibration. TinyCore can do this, but it does not support uploading over USB (Micronucleus), and I don't have any intentions of adding this, because the bootloader is a hack job that violates the USB 1.1. spec.

Have a look at the TinyCore OSCCAL section:

https://github.com/MCUdude/TinyCore#internal-oscillator-calibration-osccal

(BTW, TinyCore has softwareSerial built-in, and you can use it as standard Serial. See here for more information)

Once you have installed the board package, the board URLs are completely irrelevant. That is just where the boards manager finds it's repositories. It does not even apply to the manual install.

115200 bps is a fair way beyond what is considered reliable on any softwareSerial, though for transmission it probably does work (it appears to anyway) A bit odd, but i would switch to the (according to the docs) builtin tinySoftSerial

This compiles

void setup() {
  Serial.begin(9600);

  pinMode(LED_BUILTIN, OUTPUT);

  Serial.println("goodnight!");
  Serial.println("second line");
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(1200);                      // wait for a second
  digitalWrite(LED_BUILTIN, LOW);   // turn the LED off by making the voltage LOW
  delay(1200); 
  Serial.println("guten tag") ;                    // wait for a second;
}

and is a more appropriate baud rate, though if i am not mistaken, the baud-rates are fixed from the clock setting.

ATTinyCore supports ATtiny85 (Micronucleus / Digispark) Board.

Fairly sure the Attinycore 1.5.2 can do this.

So in other words it does not support the specific board the OP is using ?

Someone needs to finish a design that is digispark-sized, but uses one of the new AVRxxDU14 chips (with native usb, more memory, and cheaper than a tiny85.

I started, but got stalled :frowning:

You can set the OSCCAL value to whatever you want in your sketch. The reason why I mentioned this was that TinyCore bundles a sketch that helps you find the correct value, based on UART timing from the host/PC.

The board is fully supported. Uploading using the USB connector is not. You can absolutely upload using a programmer, given that the RESET pin isn't disabled.

This would be a neat board! Designing a board is not the hard part. Getting a functional USB bootloader to work properly is.

As far as i know there are calibration sketches available using AttinyCore as well.

I think it's great that there is further development for the Attiny boards cores and i am a fan of your work and miniCore, but now this thread is no longer focussed on helping the OP solve the issues.

What is about the USB Port driver at the PC side? Is it freely avialable or the Windows's one coud be used or it has to be developed by the AVRDU14 board designer?

How can I know this for my board?

If you connect RST to GND, the board should reset.
Alternatively you can read the fuse settings (or set them using a HV-programmer)