Welcome! Log In Create A New Profile

Advanced

Supplier of pre-programmed ATMega644P

Posted by awmt102 
Supplier of pre-programmed ATMega644P
April 29, 2011 10:21AM
Hi all,

I have just started looking into building a Mendel. Looking at the electronics parts for Gen 7 I see it uses an ATMega644(p) at its heart. I have never used any atmel chips (I use PICs) and have no idea how they are programmed. I would assume that it is the same idea as with PICs - you need a hardware programmer which can be used to load a bootloader, then you can use the atmel IDE to program directly onto the chip via a serial connection so you no longer need to the hardware programmer.

If I am correct in this assumption then the problem I face is that I do not want to buy a programmer for the sake of programming one chip. So I was wondering if there is anyone out there in the UK who would be able to sell me an ATMega644p pre-programmed with a bootloader? Or whether there is someone I could send an ATMega644p to who could load it with a bootloader?

Another option would be to build a cheap programmer. There seem to be a few designs out there but I don't know which would be best. Any suggestions?

Cheers

Andy
Re: Supplier of pre-programmed ATMega644P
April 29, 2011 11:23AM
Andy,

Luckily you can program the ATMega directly from a Parallel port using a cheaply made cable. I had a cable lying around from previous projects and used it to successfully set the fuses and load the bootloader into my Gen7 644.

Here is the schematic for the cable:

Cable Schematic

The best part is, avrdude actually knows about this cable/method.

When I loaded my 644 I used the following commands: (These are for a 644 with 20MHz crystal you would need to adjust for your 644p and crystal speed)

### For the ATmega644:
# write fuses
./avrdude -C ./avrdude.conf -c bascom -p atmega644 -P /dev/parport0 -B 5 -U lfuse:w:0xF7:m -U hfuse:w:0xDC:m -U efuse:w:0xFF:m

# upload bootloader
./avrdude -C ./avrdude.conf -c bascom -p atmega644 -P /dev/parport0 -B 1 -U flash:w:../Gen7/bootloaders/Gen7/bootloader-644-20MHz.hex

If you are on Linux, make sure you have permissions to write to /dev/parport0

Let me know if you have any questions. Happy to help.
Re: Supplier of pre-programmed ATMega644P
April 29, 2011 11:49AM
Thought I would supply a picture of the mapping for the cable connector to the Gen7 board. The sixth pin is not needed for this programmer.
Attachments:
open | download - gen7_programmer.JPG (85.2 KB)
Re: Supplier of pre-programmed ATMega644P
May 01, 2011 03:55PM
Traumflug's Gen7 kits probably include a pre-programmed 644P, but you'd need to ask him to be sure.

Do you have a local Hackspace? They may well have a programmer.

If you would prefer a PIC-based design, try Repic, but be aware it is still experimental.

As for building your own programmer, essentially anything with a few general purpose I/O pins can become a programmer with appropriate software, including parallel ports (as above, or Arduino's design), microcontrollers (which however first need to be programmed themselves, and while there is no fundamental reason for the chip in the programmer to be the same brand as the target chip, this is the case in all the open source designs I know of), and at least one common type of USB-serial converter (unfortunately I've forgotten where I saw the instructions for this).
Sorry, only registered users may post in this forum.

Click here to login