Go Down

Topic: Arduino Tiny (Read 68281 times) previous topic - next topic

Coding Badly

@Codingbadly: just a side note, but this is now my favorite way of developing apps for the Tiny.


Mine, too.   :)

Quote
Excellent work


Thanks.  Got some other goodies in the pipe: Arduino ISP version that better supports ISP development.  Dramatically improved Tiny Tuner.  Addition of fast*Digital.  Support for ATtiny13 and ATtiny4313.  But, work is getting in the way.

Quote
and wholehearted thanks for sharing


You are quite welcome.  And, if you're interested, I suspect we can find a way for you to give back.   ;)

Quote
It's really enabled me to make a lot more crazy devices with my tinys without having to resort to AVR studio


Don't be shy...
http://arduino.cc/forum/index.php/board,29.0.html

robbo

Sharing a tip.

Using the Arduino ISP programmer I got the annoying messages from avrdude asking to define PAGEL and BS2.  Since the ATtinyX5 family doesn't have these pins, and I guess we don't actually need them, I defined them in AVRDUDE.CONF to be pins/ports that don't exist - no more error messages.

Code: [Select]

# PAGEL and BS2 defined by --RL so we don't get a warning error from avrdude n/a on attiny85
    pagel            = 0xD0;  # these don't exist on the ATtinyX5 series
    bs2              = 0xD1;  # these don't exist on the ATtinyX5 series


You can find AVRDUDE.CONF in

arduino-0022\hardware\tools\avr\etc




gijs

hi,

i trying to get my attiny85 to run at 8mhz. but i cant get it to work..

when i upload the blink sketch at 1mhz it will blink like it is supposed to. but when i upload it at 8mhz it will blink much slower. so i assume the attiny thinks it is running at 8mhz but it is actually running at 1mhz..

i read somewhere in this threat that you need to set the fuse buts by burning the bootloader. but this is not working for me, when i do i get this error message

Code: [Select]
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avr_read(): error reading address 0x0000
    read operation not supported for memory "lock"
avrdude: failed to read all of lock memory, rc=-2


i am using the arduino as a isp programmer..

Coding Badly


The PAGEL and BS2 warnings can be ignored.

Close the Arduino IDE.

Locate and open the avrdude.conf file.  It should be located in the {Arduino}\hardware\tools\avr\etc folder.

Make a backup copy of the avrdude.conf file.

Find the ATtiny85 section.  It starts with this...

Code: [Select]
#------------------------------------------------------------
# ATtiny85
#------------------------------------------------------------


Locate the memory lock section.  It looks like it starts 134 lines below the start of the ATtiny85 section.

Add "read" data...

Code: [Select]
     memory "lock"
         size            = 1;
         write           = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
                           "x x x x  x x x x  1 1 i i  i i i i";
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
                           "0 0 0 0  0 0 0 0  o o o o  o o o o";
        min_write_delay = 9000;
        max_write_delay = 9000;
       ;


Save and close the avrdude.conf file.

Try again.

gijs

thanks! now it works (-:

there were 2 of these files: avrdude.conf.bak and avrdude.conf
so i changed both.

maybe its good to include this in the readme.txt

Coding Badly


Excellent.  I'm glad you have it working.

This is a good place to make suggestions...
http://code.google.com/p/arduino-tiny/issues/list

I've already added an entry...
http://code.google.com/p/arduino-tiny/issues/detail?id=12

moustic

Sometimes ago, while searching info about Attiny and RGB Leds, I found this code which does PWM software on 3 pin with the timer0.
I don't remember where I found this code and the author did not write his name on it.

Maybe It could help to create a small lib to handle rgb leds.

Bobnova

I think Coding Badly's core enables all three PWM outputs by default, two on timer0 and one on timer1.  Unless of course you start editing config files and swapping what is where.

BrainBooster

@Coding Badly what about the incoming structural changes in the arduino ide?
i mean the arduino.h instead of wprogram.h and the external pins file etc....
We are building a "large family" arduino ide called ArduOpen ( a kind of arduino on steroids)  and we would like to include your core, beside the arduino-extras and the original one, so we need to know what you are planning to do.

Coding Badly

@Coding Badly what about the incoming structural changes in the arduino ide?  i mean the arduino.h instead of wprogram.h and the external pins file etc....


I've been following progress on the Developer's List.  From what I can tell, the only required change is to rename "WProgram.h" to "Arduino.h".

Quote
We are building a "large family" arduino ide called ArduOpen ( a kind of arduino on steroids) and we would like to include your core, beside the arduino-extras and the original one, so we need to know what you are planning to do.


Sounds good.

My policy is to deliver an update as soon as possible after a release of the Arduino IDE.  I believe the Arduino crew is targeting Sep 15.  Usually, I perform a complete review and, when possible, ensure the Tiny Core is "highly compatible".  This time around I probably won't have time to do that until mid-October.  So, just after the Arduino 1.0 release, I plan to make just enough changes so the Tiny Core, as it is now, can be used with the new IDE.

But, work has a bad habit of getting in the way.

BrainBooster

..and about the extetnal pins configuration file?
can i try to patch myself the core files, just to see if it can work in the new ide?

Coding Badly

..and about the extetnal pins configuration file?


The intent is to make it easier to port the Standard Core to other processors.  Unfortunately, the idea falls considerably short with the Tiny processors.  In the short term, I intend to mostly ignore / workaround the feature.

Quote
can i try to patch myself the core files, just to see if it can work in the new ide?


Please do.  And please let me know how you progress or if you get stuck.

BrainBooster

ok thank you.
it will be done :) asap

BrainBooster

@Coding Badly i did the 1st experiment with arduino 1 beta 3 and the modded arduinotiny and i succeded in compile the blink example for the attiny85 at 1mhz as selected board  XD.
i'm not at home now so i can't try to upload the sketch, but i would say that a big step has been done :)
i'm planning to allot some time in the weekend to do further tests...
stay tuned

CrashingDutchman

Quote from: Rick Kimball
For using Arduino as ISP, I need to disable Auto Reset capabilities. Therefore I inserted 110 ohms (330 ohms / 3) resistor between Reset-pin and 5V-pin. This resistor should be above 110 ohms and below 124 in accordance with this document: DisablingAutoResetOnSerialConnection.


Is it correct that this resistor goes between +5V (from Arduino pin with 5V) and reset pin on ATTiny?

Go Up