How use STK500.exe from Command Line

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear Friends

I'm developing an application that need to know fuse and lock bit setting.

Now I can retrive this information by command line using STK500 sending: STK500.exe -dATmega16 -cCOM1 -y

But....
Where is the reply??
How I can get it?

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Uh? The reply comes to the same command window where you issued the command. Heres what it looks like on my setup:

C:\Program Files\Atmel\AVR Tools\STK500>STK500 -dATmega88 -cCOM8 -y
STK500 command line programmer, v 2.2 Atmel Corp (C) 2004-2005.

Connected to STK500 V2 on port COM8
Device parameters loaded
Programming mode entered
Reading lock bits... Lock bits read (0xFF)
Programming mode left
Connection to STK500 V2 closed

But this is so straight-forward I jhave a feeling that it is something else you are actually asking...

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear Johan

thanks for reply

I'm developing an application in VB6 that program atmega calling stk500 directly, only this.

My trouble was how to retrive information after a query, but seem that I must read it by dos.....

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh, from VB6. Nothing was said about this in the original post....

I have no knowledge of VB6 specifically, but generally speaking it is possible for a program that runs on the WIN32 API to execute a command line program and capture the result (in a file or some similar technique).

One alternative for you might be to redirect the output from the STK500 command to a file, eg.

STK500 -dATmega88 -cCOM8 -y > reply.txt

and then open the file in the VB6 app and parse it. Not sure of this, and I have no time to test it right now, but it might be worth a try...

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmmm--I did that last year. I'll check tomorrow on how I did it. IIRC I routed all the output to a file, and then scanned for certain strings indicating success or failure.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.