# Arduino Tiny

**URL:** <https://forum.arduino.cc/t/arduino-tiny/8942>\
**Category:** Exhibition\
**Created:** [September 23, 2010, 5:04am UTC](https://forum.arduino.cc/t/arduino-tiny/8942 "2010-09-23T05:04:05Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Coding\_Badly](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Coding\_Badly](https://forum.arduino.cc/u/Coding_Badly)\
**Post date:** [September 23, 2010, 5:04am UTC](https://forum.arduino.cc/t/arduino-tiny/8942/1 "2010-09-23T05:04:05Z")

</div>

The first Arduino Tiny release is ready...  
[http://code.google.com/p/arduino-tiny/](http://code.google.com/p/arduino-tiny/)

Included is a "highly compatible" core for the ATtiny84 processor: most of the functions are very similar or identical to the 0019 core.

Features...

- All 8 analog pins are supported
- All 10 digital pins are supported
- All 4 PWM pins are supported
- The three analogReference modes work
- NewSoftSerial works
- Burn Bootloader can be used to change fuse settings

Limitations...

- _Serial_ is an empty stub. A Sketch that references _Serial_ compiles but method calls do nothing but return.

Caveats...

- _tone_ may not generate the correct frequency. We need a few more people to test.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [September 23, 2010, 8:14am UTC](https://forum.arduino.cc/t/arduino-tiny/8942/2 "2010-09-23T08:14:10Z")

</div>

Thank you - looking forward to trying this out!

There's been a HUGE missing part of the arduino world is the lack of support for smaller chips. This is great!

---

<div class="post-metadata">

**Author:** ![Coding\_Badly](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Coding\_Badly](https://forum.arduino.cc/u/Coding_Badly)\
**Post date:** [September 23, 2010, 5:39pm UTC](https://forum.arduino.cc/t/arduino-tiny/8942/3 "2010-09-23T17:39:47Z")

</div>

Forgot one...

Features...

- Direct output for _tone_ on pin 4. Sound quality is a bit better and no CPU time is needed.

---

<div class="post-metadata">

**Author:** ![volvodani](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/volvodani/32/213699_2.png) [@volvodani](https://forum.arduino.cc/u/volvodani)\
**Post date:** [September 23, 2010, 6:19pm UTC](https://forum.arduino.cc/t/arduino-tiny/8942/4 "2010-09-23T18:19:18Z")

</div>

How to burn the bootloader to an attiny85 i will try this because i had one free for these trying. Wich .hex i have to burn with a ISP?

---

<div class="post-metadata">

**Author:** ![catalkn](https://avatars.discourse-cdn.com/v4/letter/c/eb8c5e/32.png) [@catalkn](https://forum.arduino.cc/u/catalkn)\
**Post date:** [September 23, 2010, 6:47pm UTC](https://forum.arduino.cc/t/arduino-tiny/8942/5 "2010-09-23T18:47:05Z")

</div>

Look at the thread [http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1274820597/all](http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1274820597/all)

---

<div class="post-metadata">

**Author:** ![Osgeld](https://avatars.discourse-cdn.com/v4/letter/o/71e660/32.png) [@Osgeld](https://forum.arduino.cc/u/Osgeld)\
**Post date:** [September 24, 2010, 1:11am UTC](https://forum.arduino.cc/t/arduino-tiny/8942/6 "2010-09-24T01:11:48Z")

</div>

I have been using the pre-release of this for about a week now, its very nice

and Thank you very much

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [September 24, 2010, 2:37am UTC](https://forum.arduino.cc/t/arduino-tiny/8942/7 "2010-09-24T02:37:42Z")

</div>

Wonderful work!

Is the Servo library working?

Thanks!

---

<div class="post-metadata">

**Author:** ![Coding\_Badly](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Coding\_Badly](https://forum.arduino.cc/u/Coding_Badly)\
**Post date:** [September 24, 2010, 2:58am UTC](https://forum.arduino.cc/t/arduino-tiny/8942/8 "2010-09-24T02:58:55Z")

</div>

Thank you all for the kind words and encouragement.

> Is the Servo library working?

No. If you (or anyone else) is willing to test I can provide the changes to Servo.cpp that should get it working.

Please take a moment to click a few checkboxes...  
[http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1285276725](http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1285276725)  
[http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1285316262](http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1285316262)

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [September 24, 2010, 11:31am UTC](https://forum.arduino.cc/t/arduino-tiny/8942/9 "2010-09-24T11:31:07Z")

</div>

Clicked.

I plan on using Tiny 84 and 85 at 8MHz for tiny robots and I need the Servo Lib, the SoftwareSerial Lib, the EEPROM Lib and the analog read (if there is support) at the moment. After successful tests I'll make dedicated boards for these chips. The idea is to have 6 and 3 servo connectors plus serial or sensor connectors on the boards. All servo positions will be saved in the EEPROM so the user can connect the board to the PC using a FTDI cable and set new servo positions as new moves that are later played back directly on board.

So I am willing to do any tests you can throw at me.

---

<div class="post-metadata">

**Author:** ![Coding\_Badly](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Coding\_Badly](https://forum.arduino.cc/u/Coding_Badly)\
**Post date:** [September 24, 2010, 6:43pm UTC](https://forum.arduino.cc/t/arduino-tiny/8942/10 "2010-09-24T18:43:50Z")

</div>

> Clicked.

Thanks!

> I plan on using Tiny 84 and 85 at 8MHz

For the next few weeks, my efforts are restricted to the 84 core. The 85 processor is next.

> for tiny robots

Excellent!

> and I need the Servo Lib

For Servo to work with the 84 processor a minor change must be made to the Servo.cpp source file. The file is located in the {ArduinoRoot}\libraries\Servo directory. On line #103 should be this...

```arduino
SIGNAL (TIMER1_COMPA_vect)

```

Change it to this...

```arduino
#if defined( TIMER1_COMPA_vect )
SIGNAL (TIMER1_COMPA_vect) 
#else
SIGNAL (TIM1_COMPA_vect)
#endif

```

Once this change has been tested, I'll ask for it to be applied the official version.

> the SoftwareSerial Lib

I've been using NewSoftSerial (@ 9600 baud) with success. I'll switch to SoftwareSerial and report back.

Bear in mind that, from the factory, the internal oscillator may not be accurate enough for serial communications. The oscillator can be tuned (using the OSCCAL register) to be accurate enough.

> the EEPROM Lib

There is a bug in \<avr/eeprom.h\> that prevents it from working with the 84 processor. There's a replacement file in the Arduino Tiny download that I belive fixes the problem.

> and the analog read (if there is support)

There is support. I've tested the three analogReference modes1 and all eight analog input pins. It all seems to work.

> After successful tests I'll make dedicated boards for these chips. The idea is to have 6 and 3 servo connectors plus serial or sensor connectors on the boards. All servo positions will be saved in the EEPROM so the user can connect the board to the PC using a FTDI cable and set new servo positions as new moves that are later played back directly on board.

Nice!

> So I am willing to do any tests you can throw at me.

Two things need to be tested...

1. _tone_ may not be working correctly. I need someone to measure the frequency generated. Ideally with the processor at 1 MHz and 8 MHz.

2. Servo. I currently don't have the means to test the Servo library with the 84 processor.

Any help you're willing to contribute is greatly appreciated!

1 Be sure to read the datasheet! The analogReference modes for the 84 processor are a bit different from the 168 / 328 processor.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [September 25, 2010, 6:47pm UTC](https://forum.arduino.cc/t/arduino-tiny/8942/11 "2010-09-25T18:47:38Z")

</div>

ATTiny84 has SPI. I've not seen where one of these has been used with any Arduino yet.

> **[Mixed-signal and digital signal processing ICs | Analog Devices](https://www.analog.com/en/index.html)**
>
> Analog Devices is a global leader in the design and manufacturing of analog, mixed signal, and DSP integrated circuits to help solve the toughest engineering challenges.

MAX3110E, MAX3111E

---

<div class="post-metadata">

**Author:** ![Coding\_Badly](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Coding\_Badly](https://forum.arduino.cc/u/Coding_Badly)\
**Post date:** [September 27, 2010, 8:12am UTC](https://forum.arduino.cc/t/arduino-tiny/8942/12 "2010-09-27T08:12:51Z")

</div>

> I'll switch to SoftwareSerial and report back

...testing has not gone well.

NewSoftSerial works at least to 9600 baud (I haven't tried higher rates). SoftwareSerial won't work at 2400 baud. Unfortunately, NewSoftSerial adds almost 2K; SoftwareSerial is considerably smaller.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [September 27, 2010, 12:02pm UTC](https://forum.arduino.cc/t/arduino-tiny/8942/13 "2010-09-27T12:02:29Z")

</div>

SPI  
.. is a quite trivial matter. It is a part of 019 now, isn't it? Here a library  
[http://www.arduino.cc/playground/Code/Spi](http://www.arduino.cc/playground/Code/Spi)

NSS  
.. can be simplified a little bit, especially when you constrain to a few bit-rates only. It can be re-written using USI. The size of the receive buffer must most likely also be reduced.

I have ordered some 84 chips - I cannot start testing before next week.

---

<div class="post-metadata">

**Author:** ![Osgeld](https://avatars.discourse-cdn.com/v4/letter/o/71e660/32.png) [@Osgeld](https://forum.arduino.cc/u/Osgeld)\
**Post date:** [September 27, 2010, 1:12pm UTC](https://forum.arduino.cc/t/arduino-tiny/8942/14 "2010-09-27T13:12:42Z")

</div>

spi lib doesnt work with the 84, as its handled though the USI, course you can bit bang it nearly as fast on any pins you want

---

<div class="post-metadata">

**Author:** ![Coding\_Badly](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Coding\_Badly](https://forum.arduino.cc/u/Coding_Badly)\
**Post date:** [September 27, 2010, 6:59pm UTC](https://forum.arduino.cc/t/arduino-tiny/8942/15 "2010-09-27T18:59:40Z")

</div>

> NSS.. can be simplified a little bit, especially when you constrain to a few bit-rates only

Trimming the bit-rate tables will help but not by much.

There are a few spots in the SoftwareSerial source where it looks like the person who wrote it assumed the clock would be a specific rate (probably 16 MHz). I suspect SofwareSerial can be made more reliable with less effort than trying to trim NewSoftSerial.

> It can be re-written using USI

Not for me. I need PA6 and Timer 1 for tone.

> The size of the receive buffer must most likely also be reduced.

In my case, it can be eliminated! I'm only sending for debug purposes.

---

<div class="post-metadata">

**Author:** ![Coding\_Badly](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Coding\_Badly](https://forum.arduino.cc/u/Coding_Badly)\
**Post date:** [September 27, 2010, 7:01pm UTC](https://forum.arduino.cc/t/arduino-tiny/8942/16 "2010-09-27T19:01:30Z")

</div>

> spi lib doesnt work with the 84

Does it need to? Who's using SPI with an 84 processor? Please post if you're using SPI with an 84 processor.

---

<div class="post-metadata">

**Author:** ![Osgeld](https://avatars.discourse-cdn.com/v4/letter/o/71e660/32.png) [@Osgeld](https://forum.arduino.cc/u/Osgeld)\
**Post date:** [September 27, 2010, 10:45pm UTC](https://forum.arduino.cc/t/arduino-tiny/8942/17 "2010-09-27T22:45:13Z")

</div>

im using it to send out to shift registers , but I found it easier to just bitbang pins manually (not digitalWrite) and the speed difference is negligible and I can use any pins I want vs the USI needs to be on the same 2 pins as everything else the USI controls

if you need input, well thats a different ball

---

<div class="post-metadata">

**Author:** ![Coding\_Badly](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Coding\_Badly](https://forum.arduino.cc/u/Coding_Badly)\
**Post date:** [October 2, 2010, 7:58pm UTC](https://forum.arduino.cc/t/arduino-tiny/8942/18 "2010-10-02T19:58:48Z")

</div>

I set out to make a smaller core for the '84 processor and ended up with...

- An empty Sketch is 30 bytes less (332 vs 302)
- pinMode only is 44 bytes less (466 vs 422)
- digitalWrite only is 76 bytes less (522 vs 446)
- digitalRead only is 78 bytes less (512 vs 434)
- One of each is 122 bytes less (732 vs 610)
- analogWrite only is 166 bytes less (728 vs 562)
- All four functions is 42 bytes less (868 vs 826)
- Largish test Sketch that contains a mix of the four functions is 10 bytes larger (bad / confusing news)
- pinMode is approximately 16% faster
- digitalWrite is about 18% faster
- digitalRead is 23% to 25% faster
- analogWrite is about 22% faster
- A few fringe cases are considerably faster

In theory, this core is a bit more portable to other Tiny processors than the standard core.

I'm disappointed in the memory savings. There are some changes that would probably make it bit smaller but the speed increase would diminish considerably.

Which is more important ... Faster or less memory?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [October 6, 2010, 1:22pm UTC](https://forum.arduino.cc/t/arduino-tiny/8942/19 "2010-10-06T13:22:19Z")

</div>

if you look at this link :  
[http://code.google.com/p/codalyze/wiki/CyzRgb](http://code.google.com/p/codalyze/wiki/CyzRgb)  
in the source code, they have an implementation of i2c master/slave using USI from tiny44 and tiny45.  
Maybe it could be usefull for you to make wire library working on tiny.

---

<div class="post-metadata">

**Author:** ![Osgeld](https://avatars.discourse-cdn.com/v4/letter/o/71e660/32.png) [@Osgeld](https://forum.arduino.cc/u/Osgeld)\
**Post date:** [October 6, 2010, 2:03pm UTC](https://forum.arduino.cc/t/arduino-tiny/8942/20 "2010-10-06T14:03:10Z")

</div>

hm I am going to say memory because there is always the option to use an external clock and if one uses a oscillator package its only eating up one pin, adding memory not so easy ...

course in a perfect world, both! ;D

[Next page](https://forum.arduino.cc/t/arduino-tiny/8942.md?page=2)
