1

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.

Vishal Subramanyam
  • 111
  • 1
  • 1
  • 2

3 Answers3

1

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.

0

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

ilkhd
  • 441
  • 2
  • 7
0

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

Oka
  • 961
  • 4
  • 10