Arduino 1.0.1: serially upload using handmade board of ATmega328

If you build your own Arduino with ATmega328, when integrated with a serial upload utility, will fail as I did. But if you re-use the old version of the Arduino IDE such as 0023, certainly not a failure.
Surely you will be disappointed, because the Arduino IDE version 1.0.1 has certain advantages not possessed in the previous version.

In the release version of the Arduino started version 1.0.0, has advantages compilation faster because only compile files that experience a change in editing the source. Obviously this is very loved by the users, because the development process will be faster.

When you use the original Arduino board, such as nano board, a serial upload process does not fail. Due to the release version was added a upload facility via the programmer, as you do to fill the bootloader.  I never gave up, so use this facility and not use the serial. But using less programmer takes the number of pins: MISO, MOSI, SCK, but upload is only using pin serial RX / TX. I think the serial uploading  is more effective manner, does not reduce the use of pin and at the same time for data communication or debugger.

I find the problem why this happened, because I think the same principle and use the same chip.

Finally I managed to modify the configuration file so that the upload is successful series in the Arduino IDE version 1.0.1. using a homemade board of the ATmega328.

 

I also like to reset automatically when the upload program. For that you must connect the RTS pin of the USB-Serial to TTL module to the ATmega328 RESET pin (pin 1). This way you do not need to manually press the RESET button, every upload program. In addition also connect the RX / TX between ATmega328 (see 2.3) with a USB-Serial to TTL module. in pairs. Also do not forget to GND should be connected as well.

Boards.txt file modifications on the Arduino IDE ver. 1.0.1 using handmade ATmega328 Arduino Board

I found a way to change files in the folder of boards.txt \hardware\arduino\boards.txt.

Handmade Arduino board is configured as a Nano-328 board. You must change the configuration of the board.

 Further search for the following text in the file of boards.txt.

nano328.name=Arduino Nano w/ ATmega328

nano328.upload.protocol=arduino
nano328.upload.maximum_size=30720
nano328.upload.speed=57600
nano328.bootloader.low_fuses=0xFF
nano328.bootloader.high_fuses=0xDA
nano328.bootloader.extended_fuses=0x05
nano328.bootloader.path=atmega
nano328.bootloader.file=ATmegaBOOT_168_atmega328.hex
nano328.bootloader.unlock_bits=0x3F
nano328.bootloader.lock_bits=0x0F

nano328.build.mcu=atmega328p
nano328.build.f_cpu=16000000L
nano328.build.core=arduino
nano328.build.variant=eightanaloginputs

In the second line of text:

nano328.upload.protocol=arduino

change to:

 nano328.upload.protocol=stk500  

The completely configurations of boards.txt file will be:

nano328.name=Arduino Nano w/ ATmega328

### nano328.upload.protocol=arduino
nano328.upload.protocol=stk500
nano328.upload.maximum_size=30720
nano328.upload.speed=57600
nano328.bootloader.low_fuses=0xFF
nano328.bootloader.high_fuses=0xDA
nano328.bootloader.extended_fuses=0x05
nano328.bootloader.path=atmega
nano328.bootloader.file=ATmegaBOOT_168_atmega328.hex
nano328.bootloader.unlock_bits=0x3F
nano328.bootloader.lock_bits=0x0F

nano328.build.mcu=atmega328p
nano328.build.f_cpu=16000000L
nano328.build.core=arduino
nano328.build.variant=eightanaloginputs

That means using the STK500 protocol for serial usb-serial to ttl module, while the “arduino”, is the original Arduino board serial protocol. Finally, you must reboot the IDE arduino for new configuration. 

Last updated by at .

Avatar of Bambang Siswoyo

About Bambang Siswoyo

I am a college lecturer since 1988 at UB (University of Brawijaya) in the electronics department. My experience: Applications of Microprocessor system, Applications of Control System, Applications of Field Programmable Gate Array, Computer Programming in computer instrumentations. My hobby: Music especially playing the saxophone, hiking and exploring the countryside.
This entry was posted in Arduino and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA Image

*

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>