Washington
Offline
God Member
Karma: 20
Posts: 715
Firefox & Arduino rocks
|
 |
« Reply #15 on: December 30, 2011, 03:22:10 pm » |
You are better off using avr-gcc and avrdude directly when programming an attiny.
|
|
|
|
|
Logged
|
Avoid throwing electronics out as you or someone else might need them for parts or use. Solid state rectifiers are the only REAL rectifiers. Resistors for LEDS!
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 116
Posts: 10130
|
 |
« Reply #16 on: December 30, 2011, 03:28:20 pm » |
Excellent! I'm glad you have it working.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 116
Posts: 10130
|
 |
« Reply #17 on: December 30, 2011, 03:28:55 pm » |
You are better off using avr-gcc and avrdude directly when programming an attiny. Why?
|
|
|
|
|
Logged
|
|
|
|
|
Romania
Offline
Full Member
Karma: 0
Posts: 174
|
 |
« Reply #18 on: December 30, 2011, 04:11:12 pm » |
@smeezekitty well you are already using both of them  cause even if your using arduino ide or other ide youll compile your code with avr-gcc same for avrdude even if you use the bootloder or not you still need avrdude probably you meant programming the attiny in C but why , as Coding Badly asked, not sure what youll gain 
|
|
|
|
|
Logged
|
|
|
|
|
Washington
Offline
God Member
Karma: 20
Posts: 715
Firefox & Arduino rocks
|
 |
« Reply #19 on: December 30, 2011, 05:16:34 pm » |
You are better off using avr-gcc and avrdude directly when programming an attiny. Why? I wasn't even aware that the Arduino IDE could program non arduino-like boards until recently. The boards.txt is not very flexible in built parameters. Also, if you need to program both the Arduino and attiny on a regular basis, that would equate to alot of board switching.
|
|
|
|
|
Logged
|
Avoid throwing electronics out as you or someone else might need them for parts or use. Solid state rectifiers are the only REAL rectifiers. Resistors for LEDS!
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 109
Arduino rocks
|
 |
« Reply #20 on: December 31, 2011, 12:11:54 am » |
@smeezekitty, thanks for adding that spin. Apparently, there is lot of misinformation -- or let's say, just plain confusing information out there, that gives an impression that programming AVRs using Arduino IDE is actually 'suboptimal' compared to say programming it directly using plain'ol C using a compiler. What a coincidence, that I asked a specific question about it here on the exact same subject. What I do continue to wonder about however, is, are there avr-libc alternatives that are smaller / lighter, which probably break-down the functionality in avr-libc into smaller modules, s.t. you can save on program memory on the extremely tiny attiny's like attiny13 ? I see that Arduino-Tiny google-code pages seems to allude to support for attiny13's (figures as one of the search tags on the project). Is that a reality ? I don't see an option in the IDE, so thought of asking. Or is attiny13 one of those AVRs which cannot be programmed in C ? My understanding that is only for those which have no SRAM.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 116
Posts: 10130
|
 |
« Reply #21 on: December 31, 2011, 12:27:06 am » |
What I do continue to wonder about however, is, are there avr-libc alternatives that are smaller / lighter, which probably break-down the functionality in avr-libc into smaller modules, s.t. you can save on program memory on the extremely tiny attiny's like attiny13 ? It is possible but very unlikely. The folks who developed AVR Libc have done a fantastic job of balancing high performance and low memory consumption. I see that Arduino-Tiny google-code pages seems to allude to support for attiny13's Are you referring to this? (figures as one of the search tags on the project) I don't understand. Is that a reality ? It is on my computer. Unfortunately, I have not had time to finish it for publication. Or is attiny13 one of those AVRs which cannot be programmed in C ? The ATtiny13 can be programmed in C. It has (just barely) enough resources for non-trivial applications. For example, I built a "tea timer" (basically, it's a specialized kitchen timer) for my wife using an ATtiny13A, the Arduino IDE, the Tiny Core 2, and an Uno acting as a programmer.
|
|
|
|
|
Logged
|
|
|
|
|
Washington
Offline
God Member
Karma: 20
Posts: 715
Firefox & Arduino rocks
|
 |
« Reply #22 on: December 31, 2011, 12:38:00 am » |
What I do continue to wonder about however, is, are there avr-libc alternatives that are smaller / lighter, which probably break-down the functionality in avr-libc into smaller modules, s.t. you can save on program memory on the extremely tiny attiny's like attiny13 ?
I would agree with Coding Badly. avr-libc is written in highly optumized ASM and C. Most the the functions are plenty small the a attiny13. Some are too large such as floating point, stdio and dynamic memory allocation but with 1K of flash and 64b of ram that isn't too bad  I see that Arduino-Tiny google-code pages seems to allude to support for attiny13's (figures as one of the search tags on the project). Is that a reality ? I don't see an option in the IDE, so thought of asking.
I do think this is the case. But working with PORTB and stuff like that isn't that hard once you learn about it. Its faster too. Or is attiny13 one of those AVRs which cannot be programmed in C ? I am playing with one programmed in C right now
|
|
|
|
|
Logged
|
Avoid throwing electronics out as you or someone else might need them for parts or use. Solid state rectifiers are the only REAL rectifiers. Resistors for LEDS!
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 109
Arduino rocks
|
 |
« Reply #23 on: December 31, 2011, 01:44:56 am » |
Thanks @Coding-Badly and @smeezekitty.
Coding-Badly, would be great if you could publish the attiny13 support in Arduino-Tiny. Maybe just count this as a +1 up vote for the request.
Smeezekitty, would like to take that approach of dealing with PORTB, but getting there, slowly. Right now, the direct port manipulation seems a bit daunting (not scary though!).
|
|
|
|
|
Logged
|
|
|
|
|
Belgium
Offline
Full Member
Karma: 0
Posts: 140
Just Do it (with Arduino of course)
|
 |
« Reply #24 on: January 08, 2012, 10:43:46 am » |
@falcon74, I'm not sure what you exactly look for as "more optimal libraries", but you could take a look at the work done by the "MHV" guys (make hack void) in Australia. I believe they did some kind of optimisations. Not sure what kind, nor on which libraries, though.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 109
Arduino rocks
|
 |
« Reply #25 on: January 09, 2012, 07:56:21 am » |
@falcon74, I'm not sure what you exactly look for as "more optimal libraries",
Well what I meant is based on an impression I've formed (without deep insights) reading various posts is that Arduino libraries are often, not the most optimal because of the fact that the software tries to cater to several AVR uC's, with varying parametrics/functionalities. A solid case in point, which I've encountered first hand is the difference between "DigitalWriteFast" lib and the standard Digital I/O library bundled with Arduino (or as part of the core). but you could take a look at the work done by the "MHV" guys (make hack void) in Australia. I believe they did some kind of optimisations. Not sure what kind, nor on which libraries, though.
Thanks, will check this out. Other such libraries seem to be the spin around Timer1 library which people apparently have used to get higher resolution / reliability delays, when say PWM function is not required. This one I am citing from memory, so I could be wrong, as I've not yet been successful in using Timer1 (though I do want to).
|
|
|
|
|
Logged
|
|
|
|
|
Washington
Offline
God Member
Karma: 20
Posts: 715
Firefox & Arduino rocks
|
 |
« Reply #26 on: January 09, 2012, 10:39:45 pm » |
Well what I meant is based on an impression I've formed (without deep insights) reading various posts is that Arduino libraries are often, not the most optimal because of the fact that the software tries to cater to several AVR uC's, with varying parametrics/functionalities. A solid case in point, which I've encountered first hand is the difference between "DigitalWriteFast" lib and the standard Digital I/O library bundled with Arduino (or as part of the core).
avr-libc is not Arduino specific.
|
|
|
|
|
Logged
|
Avoid throwing electronics out as you or someone else might need them for parts or use. Solid state rectifiers are the only REAL rectifiers. Resistors for LEDS!
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 109
Arduino rocks
|
 |
« Reply #27 on: January 20, 2012, 01:07:36 am » |
Well, what I meant was something like this. Found pretty recently. Does anyone here have experience with this, and any feedback to share regarding it ?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #28 on: February 20, 2012, 08:50:12 am » |
will the exact above procedure work on Linux(Ubuntu)..?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 109
Arduino rocks
|
 |
« Reply #29 on: February 21, 2012, 01:18:16 pm » |
@technodict, if your question is about the procedure for using Arduino-as-ISP to program attiny2313A's, then the answer is YES. The only thing different is selection of USB device for Arduino (since windows and Linux device naming and access is different... Windows being COM1, COM2... and Linux being /dev/ttyUSB0, /dev/ttyUSB1...), and the pathnames.. especially the Sketchbook path.
|
|
|
|
|
Logged
|
|
|
|
|
|