Another STK500 Question

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

I have been experimenting with an AVR MCU (ATMega8) for a few weeks now, using a breadboard and an AVRISP MKII. I just ordered an SKT500. I note that you program a chip on an STK500 via a serial port. I'd rather not mess with a serial port, so if I get a USB/RS-232 converter, can I use that to program a chip on an STK500? Some materials I read on the internet suggest the answer is "no" - that the USB/RS-232 converter could be used with the STK500 for communication purposes only (USART), is that correct? Alternatively, is there a way I can use my AVRISP MKII to program the target chip on the STK500?

Thanks for any input.

Russ

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

Buy two USB->RS232 cables. Use one for the STK500 control. And the other one for your AVR projects.

Yes. Even the cheapest and nastiest ones should work fine for both jobs.

There is no need for the AVRISP, so you can put it away in a drawer.

If you are really mean, and only have one USB->RS232 cable, you swap between the STK500 CTRL and SPARE socket. You disconnect the STK500 programmer header and use the AVRISP-2.

In practice, you change the Vtarget voltage, AVcc or the STK500 clock infrequently. But life is much easier without the swapping.

David.

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

Thanks, David.

david.prentice wrote:
Buy two USB->RS232 cables. Use one for the STK500 control. And the other one for your AVR projects.

Yes. Even the cheapest and nastiest ones should work fine for both jobs.


So, I can use the converter to programming? I had hoped that was the case.

This link suggested that the converter could not be used for programming:

Quote:
There are two main functions we need here. We need RS232 as a quick and dirty serial prototcol; the terminal communications with the AVR are just too useful to do without. Fortunately there are good USB RS232 adapters available very cheaply. I have used several of them these last years and they seem fine for general communications. However they are not full RS232 ports and they won't help you program the AVR.

I suppose that the above could be dated, or just incorrect?
david.prentice wrote:
If you are really mean, and only have one USB->RS232 cable, you swap between the STK500 CTRL and SPARE socket. You disconnect the STK500 programmer header and use the AVRISP-2.

In practice, you change the Vtarget voltage, AVcc or the STK500 clock infrequently. But life is much easier without the swapping.


I am sorry to appear obtuse, but I don't follow the above. Can you elaborate?

I really do appreciate you time in reading and responding to my questions...any you patience :)

Russ

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

Quote:

So, I can use the converter to programming? I had hoped that was the case.

Are you SURE you understand? It's not the converter but the STK500 that does the programming. You connect a USB plug to your PC the RS232 end of that connects to the "Control" port of the STK500, the (main) micro on the STK500 receives commands (from AVR Studio) via this control port. It then outputs ISP proramming signals to a pair of headers called ISP6PIN and ISP10PIN on the STK500 board. You then connect a cable from one of these headers either to one of the connectors on the STK500 itself if the AVR to be programmed is in one of the DIP sockets or you connect this cable across to your own PCB design where you have included the 6/10 pin header with connections to the ISP pins on your AVR.

If you have an AVR in one of the sockets on the STK500 board and you connect the pins where its TXD and RXD UART lines to the TXD/RXD connector on the STK500 this then runs through a level converting chip and appears on the "SPARE" RS232 header. You attach this to your PC (via a USB-RS232 converter) and then you can send/receive data to the AVR program using a terminal program on the PC that is connected to the virtual comm port that the USB-RS232 adapter makes available.

David's point was that if you only have ONE USB-RS232 then half the time you will find yourself using it to connect AVR Studio to the CONTROL port on the STK500 for programming and changing other functions on the STK500 and the other half the time you will unplug it from CONTROL, plug it onto SPARE and use it for your own AVR programs to "talk" to a PC terminal program. It gets tedious if you keep having to switch the one USB-RS23 between the two uses (I've been caught by this puzzling why the terminal "isn't working" only to finally realise I left the converter plugged onto the wrong port!). The "luxury solution" is to buy TWO of the converters so you can permanently leave one on CONTROL and one on SPARE.

PS A

"PC->USB-RS232->CONTROL->STK500 main micro->ISP6PIN->your AVR"

does the same job as

"PC->AVRISPmkII->your AVR"

which is why you can now leave the AVRISPmkII in a drawer (or sell it on ebay)

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

clawson wrote:

Are you SURE you understand? It's not the converter but the STK500 that does the programming.

I can safely say that I am not sure that I understand anything...:)

What I want to do is use the STK500 for programming a target chip. I understand (I think) that when I program a target chip thru an STK500, AVR Studio, by default, "talks" to the STK500 thru my PC's serial port. I would prefer to a USB port - as I am currently doing with my AVRISP MKII.

I think that you and David are saying that is possible? Are there any special configurations I need to implement other than merely using a USB-RS232 cable to connect the PC and the "Control" port of the STK500?

The info in the link I had posted above confused me.

Thanks for you help.

Russ

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

Quote:

I would prefer to a USB port - as I am currently doing with my AVRISP MKII.

And that's exactly what a USB-RS232 will allow. To use an STK500 it's either:

PC(RS232)->STK500->ISP6PIN->AVR
or
PC(USB)->USB-RS232->STK500->ISP6PIN->AVR

David's point though was "buy two" (they are only $10 each) as you often want to make TWO serial (or USB) connections to an STK500 at almost the same time.

It may seem like "going backwards in time" moving form AVRISPmkII (modern, USB) to STK500 (old, RS232) but the STK500 brings lots of great benefits that makes this worthwhile.

(of course there is the STK600 ;-))

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

Nope. You just plug in the cable to the STK500 CTRL socket and the other end into a PC USB socket, and away you go. The PC recognises a cable as if it is a regular COM port. Studio finds the STK500 and handles all the functions like changing Vtarget or programming an AVR.

Do not believe all the stories about cables not working. They apply to bit-bashing programs like PonyProg. Not to regular Atmel programmers like STK500.

Even then, I suspect that PonyProg will work fine too (if you solder a proper adapter and do not rely on clothes pegs to hold a circuit together.)

There are many queries about cheap home-made LPT or COM port programmers. When you see the photos you will understand the scepticism.

I know. I used home-made programmers. When I bought my STK500 it was the best money ever spent.

David.

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

Thanks!

This has been helpful, and I appreciate your time and patience.

I will certainly get 2 usb/RS232 cables.

clawson wrote:
It may seem like "going backwards in time" moving form AVRISPmkII (modern, USB) to STK500 (old, RS232) but the STK500 brings lots of great benefits that makes this worthwhile.

I guess it is not so bad since you can return "forward in time" buy utilizing the USB/RS232 converter. Essentially, it adds $20 to the cost of the STK500.
clawson wrote:
(of course there is the STK600 ;-))

An extra $20 I can handle...I don't think my budget could tolerate the STK600 :(

Another question on the STK500. It doesn't look like it comes with a PS.. I was thinking of using this. Any problem or better solution? I don't have a bench top PS - although I probably should think about picking one up someday.

Russ

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

Quote:

Do not believe all the stories about cables not working.

Dare I even admit this :oops: but on the occasion I couldn't get an STK500 cable working it was because I was using the wrong sex of cable (can't remember which way round it is but either it needs straight and I used NMC or vicky verky)

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

When you open the drawer to store your AVRISP-2 for a rainy day, take out one of the wallwarts that you stored earlier when your answerphone, radio, torch, etc gave up.

Select one that says 9V DC to 15V DC and matches the socket.

If you do want to buy a new wallwart, choose 9V DC.

David.

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

david.prentice wrote:
If you do want to buy a new wallwart, choose 9V DC.

The user guide for the STK500 indicates 10-15 volt DC, 500mA?

Russ

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

I was given a couple of STK500's by Atmel and they gave PSUs with them - the ones they supplied were 12V 1A in fact. Whether this constitutes their "PSU of choice" or just happened to be what the FAE had lying around in his office I cannot say.

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

Do not believe it. 9V will be fine. And an unregulated 9VDC wallwart will be over 9VDC on no-load.

The first thing that the STK500 does is to reduce the supply to 5V (or less).

A 15V supply will make the STK500 regulator chip very hot at 500mA. (5W dissipation). A 9VDC will be 2W at 500mA.

Yes. You will end up using 500mA for things like Graphics display backlights or LED displays.

To get started, you will probably only be using a few mA. So look deeper in that drawer.

David.

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

Ok...thank you.

Russ

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

david.prentice wrote:
A 9VDC will be 2W at 500mA.

Yes. You will end up using 500mA for things like Graphics display backlights or LED displays.

To get started, you will probably only be using a few mA. So look deeper in that drawer.

David.


I have a 9V 120mA...I suppose that is enough to "...to get started..."?

Russ

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

Win7 warning...

I've used a USB-to-RS-232 converter with an STK500 and Win XP for programming with no difficulties.

I recently switched to Win7 and there is no driver for my USB-to-RS-232 converter available!

Just be aware of this before you purchase a new one, if you anticipate using Win7.

JC

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

I would guess that most of these cables use FTDI, Silicon Labs or Prolific chips.

Any new cable that you buy will be relatively recently manufactured. And if the device driver is not available now, it will be very shortly.

I can see that a very old legacy cable may not get supported. I just think it unlikely. The chip manufacturers will not find it is in their interest to upset punters.

Even if the OEM has chosen to obfuscate the driver to conceal to the punter that he is using a FTDI chip, the FTDI utilities should be able to identify FTDI chips.

Edit.

Jim,

What does Windoze XP report for your cable?
What does Win7 report?

You can get basic info via UsbView.
Or more info via Device Manager.

David.

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

DocJC wrote:
I recently switched to Win7 and there is no driver for my USB-to-RS-232 converter available!

Just be aware of this before you purchase a new one, if you anticipate using Win7.

JC


That's interesting...I imagine that updated drivers would be available at some point...?

Russ

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

Not at home now to check it.
eMailed the manufacturer, with a bunch of details, got back an eMail asking me for all the details I already told them in the original inquiry...

Device is/was a Keyspan USA-19 (IIRC).

As David noted, hopefully a driver will be available "any day now..."

JC

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

I guess this is possible in Windows (I don't know now) but if you have access to a Linux system just insert the device and use lsusb -v to get device info - with the VID/PID you should be able to identify the chipset at the core (bet it's Prolific!). Then see if you can get their Win7 drivers.

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

Resurrecting a dead thread...

My Keyspan USA-19 USB to Serial converter, parent company Tripp Lite, now has a Win7 driver.

I'm not sure how long it has been out, but it is clearly available now.

JC