Thinking of starting programming simple micro controllers. ( ATtiny ) - Page 1
Forum section: electronics / beginners

author: Refrigerator
author_rank: Super Contributor
timestamp: February 16, 2014, 03:48:02 pm
content: While watching The Ben Heck show i noticed he uses alot of these microcontrollers called "attiny"so i googled it and a whole new world of electronics opened to my eyes.Before i thought that programming and using micro controllers is super complicated and requires years of knowledge and tons of money, but after searching through the net it got simpler and simpler.Now i want to try programming too.I looked some ATtinys up and found this ATtiny13 and ATtiny45 and found this kind of USB programmer.http://www.ebay.com/itm/New-1pc-USB-ISP-Programmer-For-ATMEL-AVR-ATMega-ATTiny-51-Development-Board/400596661681?_trksid=p2045573.c100033.m2042&_trkparms=aid%3D111000%26algo%3DREC.RVI%26ao%3D1%26asc%3D20131017132637%26meid%3D4878500599511635731%26pid%3D100033%26prg%3D20131017132637%26rk%3D0%26rkt%3D4%26sd%3D400596661681I'm thinking of making a simple development board with a DIP socket to go with it.http://www.robotroom.com/Atmel-STK500-DIY-Adapter-Boards.htmlFound this site and if i'm right i just have to connect programmer connections with the appropriate micro controller contacts and that's it ?So, would this work?Do i have to adjust the Vcc current so that the microcontroller doen't burn out?Is there any places where i can learn to program a microcontroller? ( the code and such )Maybe there are some better micro controllers to start from?I'm on a very tight budget right now and i don't want to buy anything "expensive".Thanks in advance.

author: mariush
author_rank: Super Contributor
timestamp: February 16, 2014, 04:15:35 pm
content: See these videos here:https://www.youtube.com/playlist?list=PLE72E4CFE73BD1DE1It goes from microcontroller on breadboard, programming with cheap programmers (15$ on sparkfun, adafruit, whatever) to more complex stuff.attiny chips have small memory for programs, can't do much with them. I'd just go straight to atmega to learn.

author: psycho0815
author_rank: Regular Contributor
timestamp: February 17, 2014, 10:37:43 am
content: Quote from: mariush on February 16, 2014, 04:15:35 pmcool tutorial didn't know about that, seems very useful.As for the attiny usefulness, i strongly disagree. the attiny X4/X5 series come with 2K/4K/8K program-memory respectively which is plenty for lots of things and as much as some of the atmegas, if you don't need all the peripherals of an atmega, they are very useful for lots of things. Those usbasp-programmers usually use an attiny2313 for example.And codingwise they are pretty much the same as any other avr, so it doesn't really matter where you start.As for learning how to program them: just google avr-gcc tutorial or use the above videos to get started. After that you shouldn't have much trouble reading the datasheets. They are very comprehensive and have lots of examples both in C and Assembler, though some of the real tiny attinys, like the attiny13 may only have examples for assembler.

author: eneuro
author_rank: Super Contributor
timestamp: February 17, 2014, 11:16:41 am
content: This is my first AVR ISP programmer made myself when started learn about programming Atmel microcontrollers.It uses LPT port of my old Dell laptop and it is easy using AVRdude DAPA mode to program this 8kB ATTiny85 flash program memory simply soldering DIP8 (or bigger for other AVRs) socket to ethernet cat 5 cable pins or connectorsI decided make this programmer myself, while you have to learn some stuff needed to make it usable, so this expierience and background understanding what is going on during programming such device later allows you diagnose problems with in circuit programming better, while I have full documented this simple programmer and I know exactly what voltage level I can expect on ATTiny ISP pins.As you can see it costs a few resistors with optional jumpers to make it more configurable for not standard programming, but there is no optical isolation, so I've made later optoisolated one.Good luck

author: Psi
author_rank: Super Contributor
timestamp: February 17, 2014, 01:05:57 pm
content: ATtiny45, ATtiny44 and ATtiny2313 are all very useful and good for someone starting out. (i usually grab a ATtiny44 for analog inputs and ATtiny2313 for serial coms when i need a simple MCU)However the ATtiny13 is a bad choice. With only 1KB of flash you quickly run out when adding even small librarys.Another problem with the ATtiny13 is the SRAM which is only 64 bytes. This makes things very limiting if you want to program the micro in C.1K Flash and 64bytes sram is still usable but you always have to think about memory/flash usage when using a mcu that small. For someone starting out its a bit complicated. There is also the ATtiny12 which has NO sram so you cant program that in C at all.For programming you cant really beat the cheap/simplicity of wiring the chip pins directly to an old LPT port, assuming you have an old PC with one. You don't really need any resistors or anything, the ATTiny can be connected directly to the LPT port (but if you short something you may damage the PC).If you can afford a proper programmer it's a good idea to get one that also supports high voltage programming. This means when you accidentally brick the attiny's fuse bits (everyone does) you can recover it.

author: cellularmitosis
author_rank: Unknown
timestamp: February 17, 2014, 03:18:32 pm
content: Have you heard of the Arduino platform? It turns out that's really just an ATMEGA328P.Not only that, but it also turns out that you can now use the Arduino software environment to program ATTINYs as well!There are a whole slew of different Atmel chips available. As with any sort of ICs, it helps to pick a small subset of chips to "standardize" on, so that you can keep a small stock of chips on hand which are universal enough that you can make a rough proof of concept immediately, and then shop for higher performance exotic chips to improve the design after you get the prototype working.Personally, I have standardized on 3 Atmel chips: their best 28 pin DIP, their best 14 pin DIP, and their best 8 pin DIP (the ATMEGA328P-PU, ATTINY84A-PU, and ATTINY85-20PU).

author: zapta
author_rank: Super Contributor
timestamp: February 17, 2014, 03:39:08 pm
content: For learning attiny programming check Digispark, for $10 you get everything you need, no programmer needed and it works with the arduino IDE.

author: JoeO
author_rank: Frequent Contributor
timestamp: February 17, 2014, 03:44:12 pm
content: Here is the link for the Digispark:http://digistump.com/products/1

author: eneuro
author_rank: Super Contributor
timestamp: February 17, 2014, 08:25:12 pm
content: Quote from: Psi on February 17, 2014, 01:05:57 pmIt depends what are project requirements.It is cool put DIP8 ATTiny85 withput any external clock just setting 8Mhz internal clock or 16Mhz with PLL and its three 10 bit ADC can do many usefull things-it has built in i2C hardware support, this means you can create quite complex system with I2C bus and it does not matter if you are starting out or you are expierienced programmer if this small chip can make your job done

author: imjosh
author_rank: Contributor
timestamp: February 20, 2014, 02:44:39 am
content: You at least need a programmer and a breadboard. I just found this, but it looks like exactly what I'd want to get started. It's a programmer and an adapter board that has all the major Attiny pinouts switch selectable and a ZIF socket:http://www.ebay.com/itm/MRA01-USB-AVR-Programmer-Set-ISP-Adapter-for-AT-mega-tiny-90-/171236639776?pt=LH_DefaultDomain_0&hash=item27de7fc420Here are some of the instructions:https://onedrive.live.com/view.aspx?cid=712BEE2B245468EC&resid=712BEE2B245468EC%21133&app=WordPdf&wdo=1I like using the Attiny84 (14-pin) and Attiny85 (8-pin)

author: imjosh
author_rank: Contributor
timestamp: February 20, 2014, 02:50:30 am
content: If you want to go really cheap, $14 delivered (at least to the U.S.)http://www.ebay.com/itm/10-Pin-Convert-Standard-6-Pin-Adapter-Board-USBASP-USBISP-AVR-Programmer-USB-/310730828729?pt=LH_DefaultDomain_0&hash=item4859002bb9http://www.ebay.com/itm/830-Tie-Points-Solderless-PCB-Breadboard-MB102-65Pcs-Jumper-cable-wires-Arduino-/400366982418?pt=LH_DefaultDomain_0&hash=item5d37bb5512http://www.ebay.com/itm/MB102-Breadboard-Power-Supply-Module-3-3V-5V-For-Arduino-Solderless-Breadboard-/170886733144?pt=LH_DefaultDomain_0&hash=item27c9a49d58

author: Psi
author_rank: Super Contributor
timestamp: February 20, 2014, 05:30:21 am
content: The ATTiny peripherals are simpler so the datasheet is shorter and easier to understand for someone starting out.

author: zapta
author_rank: Super Contributor
timestamp: February 20, 2014, 04:09:51 pm
content: Quote from: imjosh on February 20, 2014, 02:44:39 amOr get a Digispark, stick it in the USB port of your computer and enjoy programming all day (Arduino IDE compatible).This is how I started with Arduino programming. It ended up that my first project did not require any additional hardware and my car has now a Digispark embedded in it ;-)

author: superUnknown
author_rank: Regular Contributor
timestamp: February 20, 2014, 06:06:51 pm
content: Look at the MSP430G launchpad from Texas instruments. It's 10 bucks, uses a simple IDE (energia) and has a bootloader installed from factory.Simplest beginer platform. Cheap. Uses all the existing Arduino sketches, but none of the hassle of external clocks and chips without bootloaders (Attiny ATmega).Atmel fanboys please don't blast me, JMHO.