Minimal parallel programmer and bare ATMega168

Hello,

I would like to burn the boot-loader into a very new ATMega168. I read about the parallel programmer [1] - it ends with this ICSP connector but I don't have Arduino so I would like to check here how to connect it to bare ATMega.

  • pin 11 of parallel port socket goes through 220 ohm resitor to pin 18 of ATmega
  • pin 2 - 470 ohm - pin 17
  • pin 1 - 470 ohm - pin 19
  • pin 16 - pin 1
  • pin 18 - GND

There are several things I don't understand. Please: - I'm very new to all this, all I have is parallel port socket, ATMega and these three resistors. What is GND? Where should I connet pin 18 of the socket? - Is this the complete circuit? Because I saw [2] which has a few more resitors and cables and so on but I don't really understand it

To summarize, I would like to build parallel port programmer which connects directly to ATMega - how does one build it?

[1] http://www.arduino.cc/en/Hacking/ParallelProgrammer [2] http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1257973229/8#8

Did you see this article? http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html

Thanks for the link but it needs Diecimila or at least FT232RL which I don't have. I just would like to know how to wire up parallel port to ATmega.

Well, you're going to need a 16mhz Crystal and some capacitors, and a pull-up resistor for the reset.

But, I highly suggest starting with an actual board, then move onto creating your own programmers and such later, this way you get a feel for things without getting the hassles early on.

But, you need to research which pins the ISCP header uses, it's pin13, pin12, and pin11, but I'm not sure which is connected to which pin on the ISCP. (pins are DIGITAL pins, not the actual pin number)

Well, you're going to need a 16mhz Crystal and some capacitors, and a pull-up resistor for the reset.

Oh, my... Isn't it somehow possible to do it with even less parts? Or is this the absolute minimum? Because I just found a schematics here: http://www.speedy-bl.com/avr-prog-e.htm Wouldn't it work as well?

But, I highly suggest starting with an actual board, then move onto creating your own programmers and such later, this way you get a feel for things without getting the hassles early on.

The idea was that I would try to build uDuino (very few parts) and since I don't have a pre-programmed ATmega I thought I would build a parallel programmer, too.

But, you need to research which pins the ISCP header uses, it's pin13, pin12, and pin11, but I'm not sure which is connected to which pin on the ISCP. (pins are DIGITAL pins, not the actual pin number)

The pin-(resistor)-pin pairs above I got from combining these two schematics: http://arduino.cc/en/uploads/Main/Arduino-Diecimila-schematic.pdf http://arduino.cc/en/uploads/Hacking/programmer_schematic.jpg

Ad http://www.speedy-bl.com/connect.gif

Where should I wire those +5V and GND? I'm sorry for such a totally newbie question but doesn't a parallel port provide +5V and GND? Why isn't it then drawn on the picture? Or if the parallel port doesn't have it where can I get them? USB? http://en.wikipedia.org/wiki/Usb#Cables

I haven't tried.. but I really don't think you'll be able to burn the bootloader without the resonator (or crystal), I've always put my chips on my board and used the ICSP headers to burn mine.

But either way, to use most of the functions of the Arduino IDE (successfully) you'll need to get a 16MHz crystal. You can make it work with other crystals, but requires alot of extra setup and need to edit code to get it to work the same.

Also, with this setup, you won't be able to use the Serial Monitor, which is a HUGE help when debugging projects.

Somebody with more experience bootloading chips will come along soon and tell you if you can use it without a crystal or not. (I'm leaning towards no still:P)

Also, you need to connect the ground of the Microcontroller to the Ground of the Parallel port.

And no, I don't believe it does have 5v output, I know that Serial ports don't. (which is a bummer)

USB would be a good choice for power, since it's regulated at 5v, you can feed it directly to the chip without worrying about the 5v regulator. But you also need to connect that ground of the USB to the chip as well.

Ok. What about building uDuino according to: http://www.instructables.com/id/S0DIQESFB7FYOJB/

Then, wire it ip to parallel port like I mention above and connect +5V and GND to USB. (My computer has both USB and parallel port.)

Could this possibly work?

In the second link of the OP, The schematic IS the Arduino. It was used to question the mininmum componants needed to be connected to get the chip to work, however a whole lot of messing around with the code and setting the fuses on the ATmega would be needed to get this actually running. The reason the question was asked was the chip was to be used in a embedded system that would not need to be changed/monitored once in place, i.e. not a development board like the Arduino. If you want a board to develop projects on I suggest either buying a Arduino or making a breadboard type clone from a pre-bootloaded chip. If you want to go the parrallel programer route, check out http://metku.net/index.html?path=articles/microcontroller-part-1/index_eng for examples of parrallel programers (test circuit is with a ATtiny chip I think) And GND is ground on the chip (pin 8), but somebody please correct me if I am wrong

I've used this instructable to make a bare arduino clone:

http://www.instructables.com/id/uDuino-Very-Low-Cost-Arduino-Compatible-Developme

Look at step 5 for infomation for info on using internal resonator.

I have burned the lilypad bootloader to a 168 dip version.

Works verry wel.

Basicly you need one or two capacators and a 5 volt power source. I added a max232 circuit for serial download. Everything is on a verry slim stripboard fo easy use on a breadboard.

I have burned the lilypad bootloader to a 168 dip version.

What device did you use for the burning? Parallel programmer? If so, did you wired up the ICSP from the prgrammer to uDuino as if it was real Arduino? (I mean those pin-pairs from above of the thread)

I added a max232 circuit for serial download

This sound interesting - please, don't you have a pointer, schematic, picture, ...?

Its sounds like what you're after isn't really an Arduino at all . Once you start looking at internal oscillators and burning your own bootloaders without an arduino board , you might be better off at http://www.avrfreaks.net/ who deal with the raw AVR microcontrollers.

I think the main benifit of the Arduino is the IDE and the user(newbie) freindly coding. All the examples I have seen on AVR freaks use bit twiddling for outputs and directly control the ports instead of the Arduino way of assigning pins to be outputs and then asigning them to be high or low individually. Much easier for a beginner to understand what is going on!

Well the bootloader is nice and also the IDE with the libraries is handy. I own a mega but also have a couple of chips with a boot loader.

The idea for the max232 serial connection I got from this place: http://spiffie.org/electronics/archives/microcontrollers/Build%20a%20MaxSerial%20Freeduino.html

But I found this schematic a bit easier to follow:

http://sodoityourself.com/max232-serial-level-converter/ Although I've added the auto reset circuit with the DTR pin.

To see what pins you need for programming this image is handy: http://arduino.cc/en/Hacking/PinMapping168

You need the miso, mosi, sck, reset and ground pin for programming.

Pictures: http://img509.imageshack.us/img509/6139/stripduinotop.jpg http://img515.imageshack.us/img515/6139/stripduinotop.jpg

Please note that the chips are not orientated different from each other.

Thanks, very interesting!