0
\$\begingroup\$

I am currently learning electronics. I recently bought an ATMega328 and an USBasp programmer to begin my learning. But I couldn't use the USBasp to program my chip. So I researched on other ways to program a AVR and I stumbled upon the idea of using a serial port to program it. I have a RS-232 port on my old desktop. I figured I could use it to program. But I couldn't figure how to do it. I have searched through the Internet. Some advise me to use a Max232 chip. I couldn't understand all of them. Below is a list of sites I have researched on this question:
Programming Atmega with serial port
http://www.hobbytronics.co.uk/arduino-atmega328-hardcore
I want to know how to program the chip. Answers are appreciated.

\$\endgroup\$
1
\$\begingroup\$

If you can afford buying an Arduino UNO board (about 20EUR, original, but you may find compatible ones which are cheaper), you can use it to program another Atmel MCU, in particular an ATMega328. See this article on Arduino as ICSP and this one (programming breadboarded MCUs with an Arduino).

I've personally done that and it is seamless (Arduino UNO programming a breadboarded ATMega328P, exactly as shown in that article). BTW, I was also able to burn a bootloader on that chip, since I bought some ATMega328 chips with no preprogrammed bootloader.

\$\endgroup\$
0
\$\begingroup\$

If your old computer has an LPT port, then all you need is literally 5 wires and the program called AVReal:

http://real.kiev.ua/avreal/langswitch_lang/en/; http://real.kiev.ua/old/avreal/en/adapters.html#FBPRG

\$\endgroup\$
  • \$\begingroup\$ If you don't have a parallel port, there are lots of USB to parallel port cables on Amazon, starting at $5 or so. \$\endgroup\$ – tcrosley Aug 19 '15 at 9:59
  • \$\begingroup\$ @tcrosley that program requires a "real" LPT port \$\endgroup\$ – ilkhd Aug 19 '15 at 18:32
  • \$\begingroup\$ I wasn't sure, since the you had mentioned it needed only five wires. \$\endgroup\$ – tcrosley Aug 19 '15 at 20:23
0
\$\begingroup\$

You may use AVR910 programmer. It uses serial port on PC side and ISP port on microcontroller side. For compiler, you may use any compiler that support Atmel AVRProg (AVR910) programmer, for example CodeVisionAVR.

How to program: write code, compile, and program the chip. Make sure AVR910 selected in programmer setting.

enter image description here

\$\endgroup\$
  • 1
    \$\begingroup\$ The USBASP uses SPI, through a serial/USB interface on the PC. no difference here. \$\endgroup\$ – KyranF Oct 19 '15 at 2:06

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.