Programming an ATtiny13

Discussion in 'Computer Games and General Discussion' started by mocalacace, Jan 10, 2011.

Jan 10, 2011

Programming an ATtiny13 by mocalacace at 1:47 AM (1,797 Views / 0 Likes) 6 replies

  1. mocalacace
    OP

    Member mocalacace GBAtemp Fan

    Joined:
    Sep 28, 2008
    Messages:
    322
    Location:
    127.0.0.1
    Country:
    United States
    I need to program an ATtiny13. I have never programmed a microchip in my life so I have no idea what hardware I need to program it. I have looked online and seen many schematics to program it with my parallel port and dont know which one actually works. And I'm not ready to throw down $25 to buy a USB programmer for it, as I will only need to program it once.

    This is what I am trying to build and why I need it programmed http://www.instructables.com/id/The-Lucid-Dream-Machine/
     
  2. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,743
    Country:
    United Kingdom
    I am not overly familiar with AVR kit these days but in general you have something of a chicken and egg problem (you can probably reprogram a preprogrammed* device without anything special, you can not program a new device without hardware) - in your case you will need a programmer of some form. The AVR kit does allow a measure of wire it up and press program stuff though using either a serial port (ISP) or a parallel port but this is where I might come unstuck or at least unable to properly vet the designs.

    *some devices have their own bootloader to allow you to flash code into the remaining space using the onboard stuff (pretty much by attaching wires and having it go) but chances are you got yours totally blank. Some even newer devices allow simple USB programming too.

    I appreciate the efforts of the homebrew builders but for a first chip I am not sure- they work but should they go wrong you are going to be learning far more about such chips and parallel/serial ports than you might care to for a basic project/first go around with such things (we have probably both seen this countless times in flash cart world- someone buys an R4 and while you can beat them into working shape it would have been so much easier to just buy a good card from the outset).
    Still if you are sticking with homebrew esque things then http://www.ladyada.net/make/usbtinyisp/ (they have a kit as well) if you do want to splash out.

    If it is is get it done without so much as a bit of stripboard
    http://www.instructables.com/id/Ghetto-Pro...with-AVR-micro/ is truly basic and I have seen it work once or twice (the guy who built the programmer was a top flight electrical type though).
    The trouble with some of these is the lack for high voltage programming (a kind of complete reset option)- you probably will not need it but if you manage to mangle something it is worth being able to pull it off.

    Lastly from that link-
    "About 4 hours into your sleep the AVR microcontroller pulse LEDs that shine through your eyelids"

    You can knock this out with a basic timer circuit (a capacitor, resistor and transistor- you might need a relatively big capacitor or a big resistor to pump charge time up into the hours range) and a simple pulse circuit (555 timer- http://www.electronics-tutorials.ws/wavefo...oscillator.html )- indeed depending on how crude you want to get you can probably do it with something like http://www.cappels.org/dproj/simplest_LED_...er_Circuit.html
     
  3. mocalacace
    OP

    Member mocalacace GBAtemp Fan

    Joined:
    Sep 28, 2008
    Messages:
    322
    Location:
    127.0.0.1
    Country:
    United States
    Well I have a dev board with the 5x2 pin thing for programming an AVR device with, I just need to thing to hook it up to the PC. But if I could build a simple parallel port flasher for it (like the xbox nand dumper--just wires and resistors) that would be great.

    I probably sound really dumb, but I have never programmed a chip in my life and it is completely foreign to me.
     
  4. mocalacace
    OP

    Member mocalacace GBAtemp Fan

    Joined:
    Sep 28, 2008
    Messages:
    322
    Location:
    127.0.0.1
    Country:
    United States
    So is there a simple parallel port schematic I can use-like the 360 nand flasher one
     
  5. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,743
    Country:
    United Kingdom
  6. mocalacace
    OP

    Member mocalacace GBAtemp Fan

    Joined:
    Sep 28, 2008
    Messages:
    322
    Location:
    127.0.0.1
    Country:
    United States
    It says The target microcontroller must provide it's own power. So what voltage would I need and what would I use
     
  7. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,743
    Country:
    United Kingdom
    It seems to be able to vary http://www.atmel.com/dyn/products/Product_...sp?part_id=3175 has it down as 1.8 - 5.5V (presumably to line up with various common electronics "standards"), no mention is made of a minimum programming voltage which is nice (I guess for in circuit programming purposes).

    Likewise most guides I read scanning through said 5V for the chip which is nice as that is easily done with a PC power supply- http://pinouts.ru/Power/BigPower_pinout.shtml (red and black for 5V and 0v respectively) for pinouts or indeed USB ( http://pinouts.ru/Slots/USB_pinout.shtml - again red and black for the same voltages).
    Myself (granted only for 12V at this time) I have an old extension/adapter I ripped apart and poked a couple of the wires through an air hole- http://www.amazon.com/Monoprice-Molex-Fema...n/dp/B003L18WTQ
     

Share This Page