[ATMEGA128]IDE: Atmel Studio 7.0

Software Envirement

OS: Windows 10 Pro 64Bit (1607 Build 14393.447)
IDE: Atmel Studio 7.0 (build 1188, Official Direct Download Link, additional Infomation)
Tool Chain Contained 'AVR 8-bit GCC Toolchain 3.5.4'

Hardware

Target Board: NEWTC AM-M128-B(16Mhz Clock)
ISP: NEWTC AD-USBISP V3.6

New Project


New Project

'C/C++' Tab, 'GCC C++ Excutable Project'

Board Selection, ATMEGA128

Connect Device


Tools -> Add target -> JTAG/ISP -> Com Port
(If you unsure which com port, hit 'Device Manager')

Build Test

#define F_CPU 16000000
#include <avr/io.h>
#include <util/delay.h>

int main()
{
    DDRG |= 0x03; //Connect onboard LED
    PORTG = 0x00; 

    while (1)
    {
        PORTG = 0x01;
        _delay_ms(500);
        PORTG = 0x02;
        _delay_ms(500);
    }
}
//This Test Code means be Blinking every 500ms

Build Tab -> Build solution[Shoutcut 'F7']

Upload to Target


Tools Tab -> Device Programming -> Tool: STK500, Device: ATmega128, Interface: ISP -> Apply


Memories Tab -> Flash -> Program

Recommending way

Project pre-setting

'Project' Tab -> 'Hello_AVR' properties -> Tool -> Selected debugger/programmer -> STK 500, Interface ISP

go to 'Debuge' Tab -> Start without Debugging[Or Shortcut 'Crtl + Alt + F5']

results matching ""

    No results matching ""