Arduino Tiny

Just another question.

Do you think to support the Tiny861 into your Tiny core in the future?
It should be an interesting micro to work with.

I agree. The 861 is an interesting processor. It seems to be fourth on the "popularity" list: 85 (and 13), 84, 2313, then the 861.

I have one here for testing. I even let it out of its cage about two weeks ago.

At some point, I will add support for it. Unfortunately, too many things keep getting in the way.

Hello,

Thanks again to Coding Badly for work on Tiny.

I have an application I am working on making use of 16 bit Timer1 with interrupts.

If I do not plan to use mills/delay in my app, is it possible for me to disable Timer0 within core, or would the be major surgery?

George

Hi

I have designed a breakout for the Attiny2313, Attiny85 and Attiny84. Please have a look here http://arduino.cc/forum/index.php/topic,82083.0.html for more info.

Hope it can be useful to some people.

Thanks

Just a question.

Atmel has released new versions of ATtinyx4 marked "A" (ATtiny24A/44A/84A) that, it seems, should differ from the previous ones for the adoption of the PicoPower core.

Does the Tiny core support them? Or do you have in mind to add the support for them shortly?

A question about PWM.
Is it me or it isn't possible to use more that 1 PWM signal?

I would like to fade an RGB LED using PWM signals on digital pins 2-3-4 using analogWrite but I'm having strange results. It seems that 3 PWM signals cannot be used together: only the last one appears to work.

Is it a limit of the Tiny core or a limit of the micro itself?

MGeo:
Thanks again to Coding Badly for work on Tiny.

You are welcome.

If I do not plan to use mills/delay in my app, is it possible for me to disable Timer0 within core, or would the be major surgery?

Should not be too difficult. The code in question starts here...
http://code.google.com/p/arduino-tiny/source/browse/trunk/hardware/tiny/cores/tiny/wiring.c

Put a conditional compile around or comment out everything in init (bottom of the file) that starts with "MillisTimer_".

leo72:
Atmel has released new versions of ATtinyx4 marked "A" (ATtiny24A/44A/84A) that, it seems, should differ from the previous ones for the adoption of the PicoPower core.

Does the Tiny core support them? Or do you have in mind to add the support for them shortly?

In core_build_options.h ...
http://code.google.com/p/arduino-tiny/source/browse/trunk/hardware/tiny/cores/tiny/core_build_options.h#63
...there is a section for the X4 family. You may have to add something like this; current code...

#if defined( AVR_ATtiny24 ) || defined( AVR_ATtiny44 ) || defined( AVR_ATtiny84 )
#define AVR_ATtinyX4
#endif

...potential new code...

#if defined( AVR_ATtiny24 ) || defined( AVR_ATtiny44 ) || defined( AVR_ATtiny84 ) || defined( AVR_ATtiny24A ) || defined( AVR_ATtiny44A ) || defined( AVR_ATtiny84A )
#define AVR_ATtinyX4
#endif

You may also have to update boards.txt; current entry...

attiny84at16.build.mcu=attiny84

...potential new entry...

attiny84at16.build.mcu=attiny84a

But I doubt any of those changes are necessary. In any case, please report back with what you find.

leo72:
Is it me or it isn't possible to use more that 1 PWM signal?

In my testing, all available PWM channels worked correctly.

Is it a limit of the Tiny core or a limit of the micro itself?

Should not be a problem with either.

Which processor?

I'm trying to fade an RGB LED using an Attiny84@8 MHz.
Connet an RGB LED to phisical pins 5-6-7 (digital pins 2-3-4) and try this code:

const byte RED=4;
const byte BLUE=3;
const byte GREEN=2;

void setup() {
    pinMode(RED, OUTPUT);
    pinMode(BLUE, OUTPUT);
    pinMode(GREEN, OUTPUT);
}

void loop() {
    for (byte i=0; i<255; i++) {
        analogWrite(RED, i);
        analogWrite(BLUE, i);
        analogWrite(GREEN, i);
        delay(10);
    }
}

You'll see that only the red signal fades; the other 2 stay off.

Huh. How strange. Does digital 5 (physical 8, PA5) work?

Yeah, it does (flashing right now :wink: ).
It seems that it's not possible to have the PWM signals with timer 0. Strange....

That is strange. I must have broken something after testing it.

It will be a few days before I have time to investigate. In the meantime, if you try to fix it yourself, I will do what I can to assist (like answering questions).

I don't know if I will have time to do that, because I was preparing a simple funny light for my "presepio" (Nativity scene or crib, I don't know the exact translation :sweat_smile: ) so I chose the Atmega328 to finish my work. :sweat_smile:

After that work, maybe I could try to get a look at the code of the core.

leo72:
I'm trying to fade an RGB LED using an Attiny84@8 MHz. Connet an RGB LED to phisical pins 5-6-7 (digital pins 2-3-4) and try this code: [ code snipped ] You'll see that only the red signal fades; the other 2 stay off.

Your sketch works well here.

Are you using Linux?

Yes, I am...
Why do you ask this? :cold_sweat:

You're the second person on the forum...

  • To have a problem with the Tiny Core
  • That I cannot reproduce
  • That is using Linux for development

At this point, the evidence points to the GCC AVR toolset you're using. For what it's worth, I'm using WinAVR-20100110 (the IDE comes with WinAVR-20081205).

When I tested, I used your sketch. It worked as expected (all three LEDs fading from off to full-on).

I'm very happy to hear this from you... :cold_sweat:
Do you remember this problem:
Linux Kernel 3.0 stopped ArduinoISP working

So, if 1+1=2, I can say for sure that the Linux AVR toolchain is BUGGY at the maximal level! Crap....
This is not the first problem that I'm having with the toolchain, with Tiny but with Arduino/Atmega328 too.

With ArchLinux I had to heavely patch all the toolchain because I had a lot of problems compiling the sketches, and after I patched everything, I discovered the above bug.... that was replicated on the latest Ubuntu 11.10 too.... So I roll back to Ubuntu 11.04.... and a new bug has emerged!!
:0

Start thinking to switch to PIC for their Linux support.... :roll_eyes:

leo72:
I'm very happy to hear this from you... :cold_sweat:

I am sorry for bringing you such bad and annoying news.

Do you remember this problem:
Linux Kernel 3.0 stopped ArduinoISP working

I do. And I (finally) have a possible theory (see the other thread).

Start thinking to switch to PIC for their Linux support.... :roll_eyes:

Noooo! You must not fall to the Darkside!

XD
By the way, I don't understand why Atmel isn't supporting other OSes than Windows! Atmel is very common through hobbiest and hackers but a lot of them use Linux rather than Win's....