new to microcontrollers, help needed.

Thread Starter

kibodwin

Joined Sep 13, 2010
13
Hello,
I am new to microcontrollers and am trying to wire up a ATtiny2313-20PU microcontroller and a 20 Mhz crystal of type XT49S, a 0.1uF ceramic power filtering capacitor and a power LED. I am unsure as to how put it all together
and how to hook up to it.
Does anyone have a plan of how this goes together? I have looked at the data sheet (thinking this is how it is done) but I am a bit lost.
Also, how do I program it? I am reading about AVRdude but I am not sure that this is the correct way to proceed.
Any help / guidance is appreciated.
K.
 
You need a programmer, the author describes his in the article.
Next connect your ISP programmer to the header. There is a small 1 next to the ISP header to show you which pin is the one. The controller is powered by my programmer (USBtinyISP).
 

t06afre

Joined May 11, 2009
5,934
Just so you know it. Before you can use that "Tiny2313 Header" The onboard MCU need to be programmed. The chicken or the egg causality dilemma ;). If you order it you will get a pre-programmed chip( I think but I am not sure). But you can not just build it and then hope it will work.
 

Thread Starter

kibodwin

Joined Sep 13, 2010
13
I will speed things up and order an AVR programmer from ladyada.
If I plan to continue with this I think it is a worthwhile investment.
Once I have the programmer I will see if the data sheet is enough
to start setting it all up. I presume I need some software to connect
to the tiny2313 and then flash it? Any idea on which software is suitable
for a beginner? Also, do I not need some sort of image file to flash onto
the chip?
thanks for the replies, it is appreciated.
K.
 

hgmjr

Joined Jan 28, 2005
9,027
I second blueroomelectronics' suggestion. No muss, no fuss. With an Arduino DUEMILANOVE or its latest incarnation the UNO, you have a turn-key development system. It makes a great introduction tool into the world of microcontrollers.

With the bootloader that is programmed into the atmega328 on the board, you will not need to invest in a programmer. The development software is free from www.arduino.cc.

hgmjr
 

aegistalons

Joined Feb 12, 2011
32
You have a few options. Typically you build your own board with an AVR when you need a custom board. Arduino is very good for getting up and going if you don't need anything really custom. By custom, I mean something like a very small board because of packaging. The Arduino has a good IDE based on Java.

If you want to build the board in the link you provided, you will first need to program it using a programmer, before you can use the FTDI cable (I'm assuming that is what t06afre is referring to the "Tiny2313 Header"). I personally have a AVRISP MKII ( http://www.atmel.asia/dyn/products/tools_card.asp?tool_id=3808 ), and this connects directly to the ISP connector on the board. The programmer connects to the computer via USB. The IDE you can use for programming via the AVRISP MKII is AVR Studio 4, Eclipse with the AVR plugin and maybe the GCC plugin, or WinAVR.

So in the end, it all depends on what you are goals are. I personally go with building and design custom boards because I don't want to dedicate an Arduino board for 1 small project.

So from AVR Studio/WinAVR you connect your programmer to your board. You write your program in C or Assembly. The IDE will then convert your code to something that the AVR can understand, this is then uploaded to your microcontroller. Does that make sense?

If you still have any questions or confused about things, please let us know.
 

eblc1388

Joined Nov 28, 2008
1,542
Hello,
I am new to microcontrollers and am trying to wire up a ATtiny2313-20PU microcontroller and a 20 Mhz crystal of type XT49S
Whatever you would try, do not touch or change the RSTDISBL fuse in the AVR Tiny2313 fuse configuration map.

Changing it would remove the reset circuit connection inside the Tiny2313 from the chip external reset pin and you will not be able to program it again, unless you wish to setup a high voltage programming session with some 20 wiring connections.
 

Thread Starter

kibodwin

Joined Sep 13, 2010
13
Thanks for all the advice. I have a friend who has an arduino so I might
borrow it from him and see if I cannot program the 2313 with it. If not then
I will just get a avr programmer from ladyada.
I will give the arduino route a go this week so I might be back with more
questions...
thanks again for the help.
K.
 
Top