Italy
Online
Brattain Member
Karma: 219
Posts: 16438
Don't know what I do
|
 |
« Reply #120 on: November 14, 2011, 03:38:46 pm » |
You are not calling analogReference, correct?
No, I didn't. Please print the value of ADMUX right after calling analogRead(0) (e.g. Serial.println(ADMUX,HEX);). You do not need to have anything connected to A0.
0 0 0 0 etc... After calling analogRead(0), is there a stable voltage on the AREF pin?
4V64
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 116
Posts: 10137
|
 |
« Reply #121 on: November 14, 2011, 03:49:00 pm » |
Thanks again for taking the time to run these tests. Are you calling pinMode or digitalWrite? Maybe there is a pin-mapping bug and A0 is getting turned into an output. Or the internal pull-up is being enabled. After calling analogRead(0), is there a stable voltage on the AREF pin? 4V64 Does connecting a pull-down resistor to A0 change the voltage? I'm running out of ideas. Will using A1 and A2 cause any problems?
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Online
Brattain Member
Karma: 219
Posts: 16438
Don't know what I do
|
 |
« Reply #122 on: November 14, 2011, 04:22:02 pm » |
I'M SO SORRY....  I wasted your time searching non-existing bugs...  I didn't notice that I was using A0/D10 as the RX pin for NewSoftSerial..... SORRY. Deleting it, everything has started to work perfectly! I was using the serial to debug my sketch and my circuit... Me stupid... 
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 116
Posts: 10137
|
 |
« Reply #123 on: November 14, 2011, 05:22:27 pm » |
No need to apologize. We now have documented proof that A0 works. As far as I'm concerned, it was worth the time.
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Online
Brattain Member
Karma: 219
Posts: 16438
Don't know what I do
|
 |
« Reply #124 on: November 14, 2011, 06:04:25 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 116
Posts: 10137
|
 |
« Reply #125 on: November 14, 2011, 06:26:19 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 64
|
 |
« Reply #126 on: December 03, 2011, 07:52:28 am » |
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
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 55
Arduino rocks
|
 |
« Reply #127 on: December 08, 2011, 08:29:34 am » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Online
Brattain Member
Karma: 219
Posts: 16438
Don't know what I do
|
 |
« Reply #128 on: December 09, 2011, 03:37:58 am » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Online
Brattain Member
Karma: 219
Posts: 16438
Don't know what I do
|
 |
« Reply #129 on: December 14, 2011, 06:56:27 pm » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 116
Posts: 10137
|
 |
« Reply #130 on: December 14, 2011, 08:30:10 pm » |
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.cPut a conditional compile around or comment out everything in init (bottom of the file) that starts with "MillisTimer_".
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 116
Posts: 10137
|
 |
« Reply #131 on: December 14, 2011, 08:35:33 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 116
Posts: 10137
|
 |
« Reply #132 on: December 14, 2011, 08:38:16 pm » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Online
Brattain Member
Karma: 219
Posts: 16438
Don't know what I do
|
 |
« Reply #133 on: December 15, 2011, 03:55:24 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: 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.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 116
Posts: 10137
|
 |
« Reply #134 on: December 15, 2011, 04:20:05 am » |
Huh. How strange. Does digital 5 (physical 8, PA5) work?
|
|
|
|
|
Logged
|
|
|
|
|
|