Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 07, 2016, 03:18:15 15:18


Login with username, password and session length


Pages: [1]
Print
Author Topic: build stk500+jtag ice  (Read 6167 times)
0 Members and 1 Guest are viewing this topic.
ali_asadzadeh
Junior Member
**
Offline Offline

Posts: 82

Thank You
-Given: 5
-Receive: 12


« on: January 09, 2009, 11:08:21 11:08 »

dear dudes!
this is my first post
so i want to show you how you can build this staff


1-first of all we will use the same schematic of jtag ice.

2-we will use jtag boot to upgrade our Atmega16.

3-program your Atmega16 with boot.hex then start avr studio and from tools menu choose avr prog then find the upgrade.ebn in jtag ice folder of your avr studio.
for example C:\Program Files\Atmel\AVR Tools\JTAGICE.

4-we will read back Atmega16 flash with another programmer and confirm the last code address in this example the address is 0x2d2d
then open the hex file with notepad and delete the line that start with

:103800000C942A1C0C94471C0C94471C0C94471CC9
and delete following lines till :00000001FF do not delete :00000001FF line and save the file.

5-once again program your chip first erase it and program it with new file.

6-we will set the start address of our stk500 firmware that i was written once
jtag last byte + some words
change the following line in makefile

LDSECTION = --section-start=.text=0x2da0

7-then compile the stk500 code and program the chip without erasing it!

8-then we will use the following code in assembler(in asm folder) and set the fuse byte to SMALLBOOTSTART.
in this code we will decide to choose between stk500 or jtag ice respect to pinc.6
if pin==0 then start stk500
else start jtag ice.

9-again we will program the chip without erasing it and using asm.hex.

10-in stk500 you can add a led to PORTB.2 for showing communications and stk500 pins is as follow
sck sck pin of Atmega16
miso miso pin of Atmega16
mosi mosi pin of Atmega16
reset portb.1 of Atmega16
led portb.2 of Atmega16
now you have a cool tool to use.

and do not forget that the crystal is 7.3728MHz

and here is the complete code and schematic.
http://www.avrfreaks.net/index.php?module=Freaks%20Academy&func=viewItem&item_id=1075&item_type=project
i have made this and posted it in www.avrfreaks.net you can follow this link to donwload it.(you must be loged in and it's free to register).

by the way what is the meaning of sonsivri.

Logged
wellnerson1
Active Member
***
Offline Offline

Posts: 101

Thank You
-Given: 23
-Receive: 94



« Reply #1 on: February 06, 2009, 10:18:53 10:18 »

Hai friend ali_asadzadeh,
Your hex code is OK, jtag communication is OK, but when stk500 communication is sought for atmel avr asks for upgrade as the code you have supplied is of old version and also gives some tips to upgrade, but i am unable to succeed in the process. Will you tell the forum members how to upgrade stk500. This upgrade is in relation with atmel avr studio 4.15 version.
Thanks in advance.
Logged
ali_asadzadeh
Junior Member
**
Offline Offline

Posts: 82

Thank You
-Given: 5
-Receive: 12


« Reply #2 on: February 07, 2009, 09:50:35 09:50 »

you can actualy change the version in the include file that i send for stk500.just change the #define SOFTWARE_MINOR in the main.c and programm your chip with the instructions that i said.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC