Pages: 1 ... 8 9 [10] 11 12 ... 22   Go Down
Author Topic: Arduino Tiny  (Read 60034 times)
0 Members and 2 Guests are viewing this topic.
Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 327
Posts: 22640
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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


Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 206
Posts: 12850
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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).
Logged

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 327
Posts: 22640
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-sweat ) so I chose the Atmega328 to finish my work.  smiley-sweat

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


Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 206
Posts: 12850
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 327
Posts: 22640
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, I am...
Why do you ask this?  smiley-roll-sweat
Logged


Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 206
Posts: 12850
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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).
Logged

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 327
Posts: 22640
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm very happy to hear this from you...  smiley-roll-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!!
 smiley-mad

Start thinking to switch to PIC for their Linux support....  smiley-roll
Logged


Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 206
Posts: 12850
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm very happy to hear this from you...  smiley-roll-sweat

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

Quote
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).

Quote
Start thinking to switch to PIC for their Linux support....  smiley-roll

Noooo!  You must not fall to the Darkside!
Logged

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 327
Posts: 22640
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Start thinking to switch to PIC for their Linux support....  smiley-roll
Noooo!  You must not fall to the Darkside!
smiley-lol
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....
Logged


Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 206
Posts: 12850
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


I think Atmel has a "supported" Linux toolset available from their website.  I believe they even have two (or more) binary packages available.

Have you tried the toolset available from Atmel?
Logged

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 327
Posts: 22640
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I think Atmel has a "supported" Linux toolset available from their website.  I believe they even have two (or more) binary packages available.
For "Linux support" I mean an official IDE. AVRStudio works only under Windows. Microchip has its IDE both for Win and Linux. The AVR toolchain under Linux has always been bugged (starting from binutils-avr ending to gcc-avr)...  smiley-roll-blue

Quote
Have you tried the toolset available from Atmel?
Where are they? I didn't know about them.
Logged


Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 206
Posts: 12850
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Scott Howard graciously posted this to the Developers List...

Quote

That is, quite literally, all I know about it.
Logged

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 327
Posts: 22640
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Those are patches to apply to the GNU AVR tools. But it seems that they are a little bit out of date since they seem to be dated feb/2011. Debian/Ubuntu should already have the AVR tools patched.
Logged


Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 206
Posts: 12850
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Bummer.
Logged

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 327
Posts: 22640
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

One question about PWM with Attiny85.
In the file pins_arduino.c there are the alternative functions of the pins, and PWM signals are marked on pins D0 and D1.
Code:
#if defined( __AVR_ATtinyX5__ )

// ATMEL ATTINY45 / ARDUINO
//
//                           +-\/-+
//  Ain0       (D  5)  PB5  1|    |8   VCC
//  Ain3       (D  3)  PB3  2|    |7   PB2  (D  2)  INT0  Ain1
//  Ain2       (D  4)  PB4  3|    |6   PB1  (D  1)        pwm1
//                     GND  4|    |5   PB0  (D  0)        pwm0
//                           +----+

// these arrays map port names (e.g. port B) to the
// appropriate addresses for various functions (e.g. reading
// and writing) tiny45 only port B

But the datasheet says that both timers 0 & 1 are capables of PWM functions, and that the PWM pin are D0, D1, D3 and D4 (to be more exact, D3 is the inverse of the signal that is present on D4). Does the core Tiny support PWM signals on pin D4 too? Is the pin mapping out of date?
Logged


Pages: 1 ... 8 9 [10] 11 12 ... 22   Go Up
Jump to: