Italy
Offline
Brattain Member
Karma: 226
Posts: 16983
Don't know what I do
|
 |
« Reply #135 on: December 15, 2011, 04:26:37 am » |
Yeah, it does (flashing right now  ). It seems that it's not possible to have the PWM signals with timer 0. Strange....
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 129
Posts: 10374
|
 |
« Reply #136 on: December 15, 2011, 04:40:13 am » |
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
|
|
|
|
|
Italy
Offline
Brattain Member
Karma: 226
Posts: 16983
Don't know what I do
|
 |
« Reply #137 on: December 15, 2011, 04:48:17 am » |
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  ) so I chose the Atmega328 to finish my work.  After that work, maybe I could try to get a look at the code of the core.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 129
Posts: 10374
|
 |
« Reply #138 on: December 18, 2011, 02:50:50 am » |
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
|
|
|
|
|
Italy
Offline
Brattain Member
Karma: 226
Posts: 16983
Don't know what I do
|
 |
« Reply #139 on: December 18, 2011, 04:11:52 pm » |
Yes, I am... Why do you ask this? 
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 129
Posts: 10374
|
 |
« Reply #140 on: December 18, 2011, 05:16:48 pm » |
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
|
|
|
|
|
Italy
Offline
Brattain Member
Karma: 226
Posts: 16983
Don't know what I do
|
 |
« Reply #141 on: December 19, 2011, 03:08:36 am » |
I'm very happy to hear this from you...  Do you remember this problem: Linux Kernel 3.0 stopped ArduinoISP workingSo, 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!!  Start thinking to switch to PIC for their Linux support.... 
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 129
Posts: 10374
|
 |
« Reply #142 on: December 24, 2011, 03:48:58 am » |
I'm very happy to hear this from you...  I am sorry for bringing you such bad and annoying news. I do. And I (finally) have a possible theory (see the other thread). Start thinking to switch to PIC for their Linux support....  Noooo! You must not fall to the Darkside!
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Offline
Brattain Member
Karma: 226
Posts: 16983
Don't know what I do
|
 |
« Reply #143 on: December 25, 2011, 01:14:38 am » |
Start thinking to switch to PIC for their Linux support....  Noooo! You must not fall to the Darkside!  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
Offline
Shannon Member
Karma: 129
Posts: 10374
|
 |
« Reply #144 on: December 25, 2011, 01:22:49 am » |
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
|
|
|
|
|
Italy
Offline
Brattain Member
Karma: 226
Posts: 16983
Don't know what I do
|
 |
« Reply #145 on: December 25, 2011, 01:30:19 am » |
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)...  Have you tried the toolset available from Atmel?
Where are they? I didn't know about them.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 129
Posts: 10374
|
 |
« Reply #146 on: December 25, 2011, 01:54:44 am » |
Scott Howard graciously posted this to the Developers List... That is, quite literally, all I know about it.
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Offline
Brattain Member
Karma: 226
Posts: 16983
Don't know what I do
|
 |
« Reply #147 on: December 25, 2011, 02:04:10 am » |
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
Offline
Shannon Member
Karma: 129
Posts: 10374
|
 |
« Reply #148 on: December 25, 2011, 02:25:01 am » |
Bummer.
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Offline
Brattain Member
Karma: 226
Posts: 16983
Don't know what I do
|
 |
« Reply #149 on: December 25, 2011, 06:02:33 am » |
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. #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
|
|
|
|
|
|