0
Offline
Newbie
Karma: 0
Posts: 31
I found my friends, they're in my head
|
 |
« on: January 19, 2011, 03:17:06 pm » |
I have found several threads where people ask about using an attiny, and now I'm pretty sure there are at least two different ways to program them using the arduino IDE. So my question is, does anyone have an example project posted? I'm planning on buying a few next time I make an order, and I'm wondering if they use the internal oscillators or if they are programmed to run an external.
|
|
|
|
« Last Edit: January 19, 2011, 07:28:39 pm by 92_foxgt »
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 129
Posts: 10379
|
 |
« Reply #1 on: January 19, 2011, 03:44:09 pm » |
I'm pretty sure there are at least two dfferent bootloaders for them There are? Please post links.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 31
I found my friends, they're in my head
|
 |
« Reply #2 on: January 19, 2011, 07:22:50 pm » |
:-/ *sigh* that is my n00b shining through. I meant just ways to program an attiny in the arduino IDE, it's been a long day lol. I edited the post to hopefully not confuse anyone who is new like me
|
|
|
|
|
Logged
|
|
|
|
|
SE USA
Offline
Faraday Member
Karma: 35
Posts: 3650
@ssh0le
|
 |
« Reply #3 on: January 19, 2011, 07:47:28 pm » |
I have no links, but I have done both, depends on what is needed
|
|
|
|
|
Logged
|
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 129
Posts: 10379
|
 |
« Reply #4 on: January 19, 2011, 08:09:13 pm » |
So my question is, does anyone have an example project posted? I've seen a few write-ups but they are all "general purpose". These are good examples... http://sites.google.com/site/elettronicaarduinoesperimenti/Home/arduino-ide-and-attiny45http://hlt.media.mit.edu/wiki/pmwiki.php?n=Main.ArduinoATtiny4585I'm planning on buying a few next time I make an order Lately, my favorite processor is the ATtiny85. It has enough memory to do interesting / complicated things but is physically small enough to squeeze into tight spaces. The big drawback is the limited number of I/O pins. My second choice is the ATtiny84. and I'm wondering if they use the internal oscillators or if they are programmed to run an external. I've done both. The internal oscillator can be calibrated to (usually better than) ±1% which is good enough for everything I've done so far. There is some information available here... http://code.google.com/p/arduino-tiny/I am very happy with the Pololu AVR Programmer. It has served me well... http://www.pololu.com/catalog/product/1300
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 31
I found my friends, they're in my head
|
 |
« Reply #5 on: January 19, 2011, 09:20:00 pm » |
Awesome, thanks for all of the info. I read through a lot of it and installed the tiny support files for my arduino ide. I also found Coding Badly's write up on how to tune an attiny and I'm reading through it. Hopefully within a week or two I'll have some simple little projects with an attiny
|
|
|
|
|
Logged
|
|
|
|
|
Denver
Offline
God Member
Karma: 19
Posts: 777
Inactive - PM
|
 |
« Reply #6 on: January 19, 2011, 11:13:47 pm » |
A few days ago I posted an I2C Master lib for the ATtiny85. You can get it (with an example) here . . . http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236434254/255#255Tonight I attached a 2x16 display (using an I2C GPIO) to the ATtiny85. It's fun seeing what you can do with an 8 pin chip.
|
|
|
|
« Last Edit: January 20, 2011, 12:54:04 am by BroHogan »
|
Logged
|
"Data is not information, information is not knowledge, knowledge is not understanding, understanding is not wisdom." ~ Clifford Stoll
|
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 31
I found my friends, they're in my head
|
 |
« Reply #8 on: January 20, 2011, 05:43:18 pm » |
Yup, I downloaded the files and looked through them, I am completely new to all of this(less than a month of arduino experience, which is my only experience with a microprocessor). Is calibrating the attiny really as simple as just running the Save_to_EEProm sketch and following the instructions? The documentation is great, I ordered a few attiny85s, the 84s had a 20 dollar handling charge from my local(ish) vendor, next time I have a mail order from somewhere else I'll grab a couple and try those too. Thanks for all of the help. edit: what terminal program do you favor? I've been searching and it seems like everyone uses a different one, any benefits to a certain one?
|
|
|
|
« Last Edit: January 20, 2011, 06:05:31 pm by 92_foxgt »
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 129
Posts: 10379
|
 |
« Reply #9 on: January 20, 2011, 07:15:32 pm » |
Yup, I downloaded the files and looked through them, I am completely new to all of this(less than a month of arduino experience, which is my only experience with a microprocessor). Is calibrating the attiny really as simple as just running the Save_to_EEProm sketch and following the instructions? Yes. I like the interactive ones just for the entertainment value (I'm easily amused). If you use the Save_to_EEProm method, be sure to add code to load the OSCCAL value from EEPROM. I suggest using one of the interactive ones and read a bit of the datasheet until you get a feel for how it works. (Or ask here.) Over the last few months, I've tested to ensure the calibration works and, so far, it works very well. The calibration varies by temperature and supply voltage. In my case, the gadgets are used indoors and run from batteries. The calibration does not vary enough to make a difference. But, if you expect the temperature to vary by more than about 5°F you may have to either use an "average" calibration or compensate by temperature (or use a resonator / crystal). The documentation is great Are you referring to my posts? I ordered a few attiny85s Excellent! Welcome to the club! the 84s had a 20 dollar handling charge from my local(ish) vendor Yikes! That's harsh. edit: what terminal program do you favor? I like "Terminal by Br@y++". It's simple and very easy to use. (I have it running right now.  ) It occasionally misbehaves but the problems have been minor and far between. https://sites.google.com/site/terminalbpp/
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 31
I found my friends, they're in my head
|
 |
« Reply #10 on: January 20, 2011, 10:22:39 pm » |
I assume you mean the datasheet for the attiny85 on the OSCCAL values? I installed the cores through links to the site from other posts, I didn't realize that was your site. Installing it all was a breeze, I'm hoping programming the 85 will be as simple. I'm in my second semester of my electrical engineering degree, so there are a lot of things I have yet to see, but I am pretty far ahead of the game. I have a couple practical projects I'm working on and one I'm thinking about doing that will be just for show. Hopefully I'll get the first done soon and I'll post it up!
|
|
|
|
|
Logged
|
|
|
|
|
nr Bundaberg, Australia
Offline
Tesla Member
Karma: 75
Posts: 6970
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #11 on: January 20, 2011, 11:20:58 pm » |
I love the 85, so much so I've built an emulator for it. (CB, got PCBs the other day and have half written a monitor program.)
It's the little chip that can.
______ Rob
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 51
Arduino rocks / OpenLCB rocks
|
 |
« Reply #12 on: January 20, 2011, 11:47:08 pm » |
Please tell us more :-)
D
|
|
|
|
|
Logged
|
Dr. David Harris OpenLCB Dev Team
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 129
Posts: 10379
|
 |
« Reply #13 on: January 21, 2011, 12:12:32 am » |
It's the little chip that can. ;D I assume you mean the datasheet for the attiny85 on the OSCCAL values? Yes. Keep the datasheet close at hand. Tiny Tuner provides you with an OSCCAL value. It's up to you to do something with that value. I installed the cores through links to the site from other posts, I didn't realize that was your site. I'm trying to keep it from becoming "my site". Anyone want to contribute / help? Installing it all was a breeze Excellent! I'm hoping programming the 85 will be as simple I think it is. From a software perspective, the core should make working with the 85 very similar to working with a 168 or 328. The big thing lacking are libraries. Most (all?) Arduino libraries will not work as-is on the tiny processors. Hopefully I'll get the first done soon and I'll post it up! Please do. I love the 85, so much so I've built an emulator for it. (CB, got PCBs the other day and have half written a monitor program.) Nice! Is it the PCB you published in the Hardware / Development section? Did you make any changes from what you published? Did you farm out the PCBs or etch them yourself?
|
|
|
|
« Last Edit: January 21, 2011, 12:14:44 am by bcook »
|
Logged
|
|
|
|
|
nr Bundaberg, Australia
Offline
Tesla Member
Karma: 75
Posts: 6970
Scattered showers my arse -- Noah, 2348BC.
|
 |
« Reply #14 on: January 21, 2011, 02:05:36 am » |
Is it the PCB you published in the Hardware / Development section? Yep. Did you make any changes from what you published? Quite a few actually, the emulator is now affectively an Arduino clone (if I get it all working that is  ). To save from highjacking this thread here's a link to the details. http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286853922/0#5and the web site http://emul8or.robgray.com/index.phpDid you farm out the PCBs or etch them yourself? Thought I'd try PCBcart in China, they did a great job. ______ Rob
|
|
|
|
|
Logged
|
|
|
|
|
|