new to microcontrollers, help needed.

Discussion in 'Embedded Systems and Microcontrollers' started by kibodwin, Feb 24, 2011.

  1. kibodwin

    Thread Starter New Member

    Sep 13, 2010
    13
    0
    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.
     
  2. kibodwin

    Thread Starter New Member

    Sep 13, 2010
    13
    0
    a little more googleing and I found this.
    http://tinkerlog.com/howto/tiny2313-header/
    I will give it a go tonight but I am still unsure as to how to program it.
    I can have access to a FTDI cable so my next question is how
    (or is it even possible) to use a FTDI cable to program a atiny2313
    chip?
    K.
     
  3. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    You need a programmer, the author describes his in the article.
     
  4. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    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.
     
  5. kibodwin

    Thread Starter New Member

    Sep 13, 2010
    13
    0
    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.
     
  6. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    Why not just get an Arduino?
     
  7. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    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
     
  8. aegistalons

    Member

    Feb 12, 2011
    32
    2
    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.
     
  9. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    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.
     
  10. kibodwin

    Thread Starter New Member

    Sep 13, 2010
    13
    0
    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.
     
Loading...