SoftwareSerial.h not available for ATINY84 (arduino-tiny)

Hello everyone,

I have installed arduino-ide 1.6.0 and arduino-tiny to use for the ATtiny84. I can select the Attiny84 in the boards menu.

I can also compile sketches for this board using third-party libs in my sketchbook like the JeeLib.

But compilation fails, as soon as I try to

#include <SoftwareSerial.h>

The error I get is

fatal error: SoftwareSerial.h: No such file or directory
compilation terminated.
Error compiling.

So the IDE cannot find this library - but only if I select my ATtiny84. When I select the Arduino Uno for example, the Sketch compiles without problems.

Also in the menu, the SoftwareSerial library is selectable when choosing the Uno - but not when I select the ATtiny84.

Has someone an idea, what is going wrong here? Do I need to make some modifications to the boards.txt oder platform.txt that comes with arduino-tiny? I wished the arduino-tiny software project would get an update to the latest Arduino-IDE release. But maybe it is an easy to solve problem.

I tried on Linux Debian (latest stable, OS and arduino-ide) and on Mac OS X (Yosemite, with arduino-ide experimental, nightly)
Any help greatly appreciated,

Cheers,
pfanni

I believe Software Serial relies on PCINT interrupts for it to work.
Attiny84 seems to be somewhat lacking in those, see attached excerpt from the datasheet.
Have you looked into AltSoftSerial ? Maybe it wil work with the 2 PCINTs that are available.

Thanks for your reply.

I must confess that I am not completely familiar with the ATtiny84 yet. But I have seen projects and sketches that use the ATtiny84 and SoftwareSerial. So (I still hope!) there should be a solution for this problem:

e.g. the tinytx4 project: https://github.com/meigrafd/TinyRX4

When I copy the library from the Arduino-IDE over to my sketchbook, the compilation works:

cp -r /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/SoftwareSerial ~/Documents/Arduino/libraries/

Since I have no ATtiny84 board (YET!) I can not test if this actually works, but I guess it should work.

But this is only (hopefully I admit) a workaround - I still wonder if there is a problem with Arduino-IDE or arduino-tiny and its files.

Has someone a idea what needs to be changed so that Arduino-IDE will allow the use of SoftwareSerial with arduino-tiny out of the box?

CrossRoads: I believe Software Serial relies on PCINT interrupts for it to work. Attiny84 seems to be somewhat lacking in those, see attached excerpt from the datasheet. Have you looked into AltSoftSerial ? Maybe it wil work with the 2 PCINTs that are available.

I have looked some more into the datasheet. There are two PCINTs available, so I do not fully understand what you mean by "lacking":-) There are twelve ports with six of them linked to PCINT1 and six to PCINT2.

And thanks for the AltSoftSerial hint. I did not know this before. I wonder if it is usable with the Attiny84 - did you try this combination? The Attiny has one 16 bit timer, so maybe this does work. But I am completely unsure if the other hardware and software I need to use (Jeelib and rfm12b board) will be compatible with the AltSoftSerial requirements...

I use IDE 1.6.5. Writing in method to ATtiny is changed big from IDE 1.6.4 according to the following page. http://highlowtech.org/? p=1695

There is AddOn for ATtiny below. https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls#list-of-3rd-party-boards-support-urls

I tried both of ATtiny and FemtoCow AddOn. SoftwareSerial work with ATtiny AddOn. Serial don't work (Error compiling) with ATtiny AddOn.

BTW Serial work with FemtoCowy AddOn. SoftwareSerial dont't work (Error compiling) with FemtoCowy AddOn.