1
\$\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.

asked May 25, 2015 at 9:25
\$\endgroup\$
3
  • \$\begingroup\$ What was the problem with the USBasp? \$\endgroup\$ Commented May 25, 2015 at 9:30
  • 1
    \$\begingroup\$ The same error as this guy: electronics.stackexchange.com/questions/117384/… \$\endgroup\$ Commented May 25, 2015 at 9:31
  • 1
    \$\begingroup\$ i dont think programming using UART will be a better idea. what errors you are facing in USBasp. which software you are using for USBasp? \$\endgroup\$ Commented Aug 19, 2015 at 6:47

3 Answers 3

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.

answered May 25, 2015 at 11:32
\$\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

answered May 25, 2015 at 12:23
\$\endgroup\$
3
  • \$\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\$ Commented Aug 19, 2015 at 9:59
  • \$\begingroup\$ @tcrosley that program requires a "real" LPT port \$\endgroup\$ Commented Aug 19, 2015 at 18:32
  • \$\begingroup\$ I wasn't sure, since the you had mentioned it needed only five wires. \$\endgroup\$ Commented Aug 19, 2015 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

answered Aug 19, 2015 at 6:43
\$\endgroup\$
1
  • 1
    \$\begingroup\$ The USBASP uses SPI, through a serial/USB interface on the PC. no difference here. \$\endgroup\$ Commented Oct 19, 2015 at 2:06

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.