Pages: [1]   Go Down
Author Topic: ATTINY for a begginer  (Read 2591 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Sr. Member
****
Karma: 7
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello all,
I want to get serious with Atmel, Arduino's good for prototyping but I just don't always need the pin count.

One application is to simulate the bright blue flickering of an arc welder in a 1/76 scale model or 1/87 for our american cousins, an atmega 328 would be overkill for this project which only requires generating random delays to turn a led on and off.

So I'm looking at an 8 pin attiny, trouble is there are so many variations, I'm more used to microchip pic's so am lost in the relm of attiny's, I don't need adc, comparators, pwm or anything fancy, so whats a good 8 pin chip to start off with?  And can i use my atmega 328 to ICSP it?

Thanks in advance
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 210
Posts: 13039
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So I'm looking at an 8 pin attiny, trouble is there are so many variations

There are?  As far as I can tell, there are only four 8-pin models: ATtiny13, ATtiny25, ATtiny45, and ATtiny85.  The ATtinyX5s are only different in the amount of memory; in all other respects they are identical.

Any of those will work for your application and can easily be programmed using your ATmega328.  I would go with the cheapest (probably the ATtiny13).  If the difference in price is insignificant, I suggest "upgrading" to the ATtinyX5 models.  They have two timers instead of one which gives you considerably more flexibility with blinky LEDs.

Part numbers ending in "A" (e.g. ATtiny13A) are newer revisions.  I tend to favour the newer revisions because they have fewer errata (and, ironically, are often less expensive).
Logged

0
Offline Offline
Full Member
***
Karma: 2
Posts: 125
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I like the ATtiny85s because they have the most memory for their device class (ATtiny25/45/85). They cost $1.30 each for DIPs in quantity of 1.  The ATtiny25s cost $1.05. Considering you are buying non-volume DIPs, I would say just pay the 25 cents more considering you get four times as much flash and RAM.

If I were you I would skip the Arduino as ISP and just buy this: http://allgaiershops.com/product_info.php?cPath=22&products_id=33 and a cheap programmer such as a USBtinyISP or the "official" AVR ISP mkII. Why? Putting in those wires manually all the time is annoying and can often add half an hour to your debug session. I had to buy an ISP for class, which is why I lean toward this decision.

There is one more option. You don't really learn anything but it's the absolute easiest: buy the chips and program with the Arduino IDE: http://hlt.media.mit.edu/?p=1229
Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2741
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Right now at mouser for through hole the attiny85 and attiny45 are cheaper than the attiny13.
For quantity 1:
attiny45 is $0.81
attiny85 is $0.92 (last week the attiny85 was $0.72)
The tiny13A is $0.94
The tiny25 is $0.75

With the 13s the ram is quite limited at 64 bytes RAM/1k code
where the tiny45 has 4k code/256 of RAM.
tiny85 has 8k code/512 RAM.
tiny25 has 2k code/128 RAM

The costs are so close now that I'd just get some tiny85s to play with until there was need
for cost optimization.


--- bill
Logged

0
Offline Offline
Sr. Member
****
Karma: 7
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks all, thats helped me decide, I'll probably start with the 13 chip and maybe get one of the higher spec chips to start off with, memory & speed isn't important right now
Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2741
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

While memory and speed may not be important for your code, development environment and tools might.
With the limited RAM on the Attiny13, I'm not sure if you will be able to use Arduino for your programming
environment and development tools for that part.

If you want to use Arduino then you will want to stick to the ones that have 3rd party Arduino add-on support
for the chip you select. (Arduino as shipped, does not natively support they tiny parts)
Here are couple of links for such 3rd party add-on packages:
http://code.google.com/p/arduino-tiny/
http://hlt.media.mit.edu/?p=1229

--- bill



Logged

0
Offline Offline
Sr. Member
****
Karma: 7
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Bill
I will check those links, In reality i would drop atmel in favour of microchip as BSF PORTB,0 is more native to me than digitalWrite(8, HIGH); but I want to explore atmels beyond 328's, I'll check those links now
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 210
Posts: 13039
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


One to add to the list in case the temptation to use an ATtiny13 is too much to resist...
http://arduino.cc/forum/index.php/topic,89781.0.html
Logged

Anchorage, AK
Offline Offline
Edison Member
*
Karma: 42
Posts: 1176
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Don't confuse Arduino for Atmel / AVR / ATtiny.

digitalWrite() is an Arduino library call.

PORTB = 0x01

.. is an AVR C thing, which is closer to what you're used to.
Logged

Dubuque, Iowa, USA
Offline Offline
Faraday Member
**
Karma: 49
Posts: 2544
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The ATtinyX5s are only different in the amount of memory; in all other respects they are identical.

There's an ATTiny85 and an ATTiny85V that might be causing OP's confusion. The latter will operate down to 1.8V.

To OP, assuming you're looking for only the PDIP format there's just the ATTiny85-20PU and ATTiny85V-10PU. The former is the less expensive/faster part and probably what you want.


Moderator edit: quoting corrected.
« Last Edit: May 01, 2012, 04:48:58 pm by Coding Badly » Logged

0
Offline Offline
Sr. Member
****
Karma: 7
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for all the responces It's really apreaciated

OK, so for the application then, take one scale model of a construction site, scale is not important here but it will be aimed at 1/76th or 1/87 scale,
one plastic figure of a worker arc welding,
the chip of choice need only generate random off times, on time will be constant, or random brightness of a blue led, the light from which will be fed down thin fibre optic light guide to his welding handle, later I might add a green led to get a more realistic arc welder flash and the chip will only perform this one task.
Logged

Anchorage, AK
Offline Offline
Edison Member
*
Karma: 42
Posts: 1176
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Then I'm sure it doesn't matter which you pick.  But, if you're going to the trouble of illuminating fake sparks, isn't there something else you could do?  Spin a cement mixer, e.g.?

Then again, if it's a union shop, one person working is probably realistic.  ;-)  (I keed, I keed.)
Logged

0
Offline Offline
Sr. Member
****
Karma: 7
Posts: 476
what?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Then again, if it's a union shop, one person working is probably realistic
heh
« Last Edit: May 02, 2012, 04:17:47 am by P18F4550 » Logged

Pages: [1]   Go Up
Jump to: