programming with stk500

MiniPOV4 and previous versions

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
peterman921
 
Posts: 5
Joined: Sun Apr 02, 2006 11:56 pm

programming with stk500

Post by peterman921 »

Today I built my minipov v2.1 that I ordered a few months ago, everything worked until I tried programming (I know next to nothing about this).
I have been trying to learn assembly using the stk500 but that doesnt
seem to help with c

I dont know what a command window is or cd to the directory is,
I used programmers notepad to compile (I think) the minipov file and I dont know where to find the dir to locate the hex file, I did however download the hex file off the website. (can anyone help with these problems?)

1st I dont seem to have the right cable ( my laserjet has a funky end not a female 25 pin and the only other cables I could find were male ) so I tried loading the hex file using the stk500 via serial and managed to erase the chip and failed to load the hex file.

I'm running win98 and latest version of winavr, AVR studio, and programmers notepad

sorry this is all disjointed just typing as things come to me

has anyone used the stk to program their pov's? and what did you do?

Thanks

Jon

peterman921
 
Posts: 5
Joined: Sun Apr 02, 2006 11:56 pm

answers to my own questions

Post by peterman921 »

Found this post and followed the instructions

Posted: Mon Oct 10, 2005 12:28 am Post subject: Programing Problems

and everything worked up until
it says avr device not responding (no Cable) so now the search is on for a male to female 25 pin cable.

I would still like to know why the hex file cannot be loaded via the stk500.

Jon

peterman921
 
Posts: 5
Joined: Sun Apr 02, 2006 11:56 pm

history window stk 500

Post by peterman921 »

Possibly the next to last line is the clue? how do I include source code or is that not possible?


Loaded plugin STK500
Loaded file: C:\Program Files\Atmel\AVR Tools\AvrAssembler\Jons Projects\pov1\pov1.asm
Loaded partfile: C:\Program Files\Atmel\AVR Tools\PartDescriptionFiles\AT90S2313
Flash memory 2048
Eeprom memory 128
I/O start 00
I/O stop 3F
SRAM size 128
SRAM start 60
SRAM size 0
SRAM start NA
Loaded partfile: C:\Program Files\Atmel\AVR Tools\PartDescriptionFiles\AT90S2313
Flash memory 2048
Eeprom memory 128
I/O start 00
I/O stop 3F
SRAM size 128
SRAM start 60
SRAM size 0
SRAM start NA
AVR Simulator Please wait while configuring simulator...
AVR Simulator IO Module: PORTB created !
AVR Simulator IO Module: PORTD created !
AVR Simulator IO Module: EXTINT0 created !
AVR Simulator IO Module: EXTINT1 created !
AVR Simulator IO Module: TIMER0 created !
AVR Simulator IO Module: TIMER1 created !
AVR Simulator IO Module: UART created !
AVR Simulator IO Module: ANALOGCOMPARATOR missing ID in XML file!
AVR Simulator AT90S2313 Configured OK
Flash memory 2048
Eeprom memory 128
I/O start 00
I/O stop 3F
SRAM size 128
SRAM start 60
SRAM size 0
SRAM start NA


Coordinator The object file does not contain source code information.


Loaded objectfile: D:\a1jpgraphics\A1robotics\atmel\POV\minipov.hex


Jon

peterman921
 
Posts: 5
Joined: Sun Apr 02, 2006 11:56 pm

stk

Post by peterman921 »

using the avrdude gui I changed programmer to stk500 and port to com2
but when I execute I get

avrdude: ser_open(): can't set buffers for "com2"

any way to change this?

Jon

trialex
 
Posts: 189
Joined: Mon Apr 03, 2006 6:25 pm

Re: programming with stk500

Post by trialex »

OK you've got a lot going on here, but taking small chunks of it...
peterman921 wrote:
I dont know what a command window is or cd to the directory is,
I used programmers notepad to compile (I think) the minipov file and I dont know where to find the dir to locate the hex file, I did however download the hex file off the website. (can anyone help with these problems?)
It's been a while since I've used Win98, but I'm pretty sure it was built on a dos basis, so I think you can get into what is called a command prompt throught start->programs->accessories->command prompt.

Otherwise try (as is the easiest way in win2000/XP) clicking the start button->run then type "cmd.exe" (no quotes)

to get into the directory to load the hex file, first use whatever file manager you are comfortable with (eg windows file manager) to put the hex file in a simple, easy to remember, short-name directory, which you'll create for the purpose. try c:\minipov2 or something. so once you have put the file in the directory go back to / start up a command prompt. type in "cd.." (the letters cd, followed by two full stops, again without quotes) and hit enter. repeat this as many times as necessary until all you are left with on the left hand side is "C:\>". This is the command prompt, and you are at the root of the drive. Now you can use the cd function (think of it as short for change directory) to move into the directory where you put the hex file. Assuming you followed the above naming suggestion, type "cd minipov2", or substitute whatever you named the directory in place of the minipov2 bit.

OK so thats part of you answer, hopefully this has given you a kick start to get you on your way

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Post by adafruit »

you can use stk500 with the Makefile and avrdude, as given in the minipov2 website. just change the programmer to "stk500" instead of "dt006" and change the port to be whichever you're using, like COM2

peterman921
 
Posts: 5
Joined: Sun Apr 02, 2006 11:56 pm

stk

Post by peterman921 »

Well I did all that the first night and nothing ever happened. I also removed the chip and tried that in the stk, but nothing. So I tried the following day again the chip in the stk and everything works now so rebooting my computer must have fixed something. I have since modified the mypov file compiled it and used the hex file through the stk and all is fine.

all I can say at this point is c bites, too much running around with librarys and makefile and all so I'm back to learning assembly, clean and staightforward.

Locked
Please be positive and constructive with your questions and comments.

Return to “MiniPOV”