3
\$\begingroup\$

Update: The ATmega came bootloaded with the arduino software is that can simplify anything

I have this board:

hackduino schematic hackduino

I'm looking for a bone-simple way to upload sketches.

Ideally without buying additional components... Double points if you've got a http://fritzing.org/ diagram!

\$\endgroup\$
  • 2
    \$\begingroup\$ There's absolutely no way to do what you're trying. At least you'll need a serial transceiver and required capaitors (look up max 232 and derivatives, we have tons of questions about them) and a DB-9 socket for serial cable to allow communication with a computer. Then you'll need an AVR programmer. The simple ones can be made to work from a PC serial port. Look here or on Google for serial AVR programer and you'll find numerous good designs. With it you could upload the Arduino firmware on the ATmega 168 and then use the serial port to upload sketches. \$\endgroup\$ – AndrejaKo Apr 29 '12 at 20:03
  • 1
    \$\begingroup\$ Unfortunately with this approach you loose several Arduino benefits such as not having to have an AVR programmer, avoiding the need for a serial port and probably a few more I can't think of right now. \$\endgroup\$ – AndrejaKo Apr 29 '12 at 20:04
3
\$\begingroup\$

I'd recommend buying an AVRTinyISP from adafruit. This little kit has been very useful for me. It allows you to very easily program just about any AVR chip you'll run across and easily works from avrdude. I bought one and have used it for everything from attiny45s to atmega328s

\$\endgroup\$
3
\$\begingroup\$

As long as your chip has the Arduino bootloader you can use the Arduino board itself to program the chip.

enter image description here

If your chip does not have a bootloader then you can either burn the bootloader onto it or just program it like a regular old AVR chip with an ISP header.

Here is the pinout for an ISP header (both six and ten pin) enter image description here

And the corresponding pinout on the chip

enter image description here

For more info checkout:

http://www.evilmadscientist.com/article.php/avrtargetboards http://arduino.cc/en/Tutorial/ArduinoToBreadboard

\$\endgroup\$
  • \$\begingroup\$ OP specifically asked how to do ths without an arduino. \$\endgroup\$ – BeB00 Aug 20 '16 at 20:50
1
\$\begingroup\$

A USB to TTL-serial cable, such as this one, a bootloader in your chip, and AVR-dude (the uploader part of the Arduino IDE; if you're using the IDE, the cable's all you need). If your chip doesn't have a bootloader in it already you'll have to get it in there another way. The easiest way is to replace the with a pre-programmed one. The first one I found is the 168's pin-compatible big brother, the 328, at Adafruit Industries.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Driveby downvoters: would you care to say what might improve my post? \$\endgroup\$ – JRobert Apr 30 '12 at 18:06
1
\$\begingroup\$

Your board, in its current form, is not ready for that yet. If you want to deploy sketches directly from the Arduino IDE to your custom board, then it must have at a minimum:

  1. The arduino bootloader loaded on to the AVR
  2. Some kind of way to accept UART (serial) communications from the PC. (serial cable with max232 level shifter, or a usb to serial chip like the FT232)

The arduino bootloader is a program that is loaded on to the board from the factory. It is the one that is responsible for accepting new programs ("sketches") from the IDE over serial communication with the PC and writes the program to a particular location on the chip where it will then run that application.

So how did the bootloader get there in the first place? It's written there using a tool called an ISP programmer. There are plenty of them out there to choose from but they all do the same thing: they follow a protocol to put the chip into a programming mode and then writes directly to its flash memory. If you want to get the arduino bootloader on to your blank AVR then you'll have to do this and also get familiar with a command line tool called avr-dude. As others have pointed out, you can actually make your own ISP programmer from an existing arduino because all you need it to do is follow that programming protocol - which is well documented and can be implemented by writing your own sketch to do that.

Since you don't want to buy any more external hardware, perhaps the best way is to buy an AVR chip with the arduino bootloader already loaded on to it as another answer suggested. This still leaves point #2 - you'll need to find a way to hook up your PC to your board. There's no getting around the fact that you'll need some kind of cable or IC or combination of both to get that done.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.