Trying to copy the AVRISP (AT90S8535). Firmware question

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

I have a question about the programmer and also wonder if any of the more experienced users can give a guess at what the problem is.

My old (and formerly) trusty AVR ISP, the one that uses RS-232 and has an AT90S8535 inside, finally went toes up. I have all the parts necessary to make a new one, except the AT90S8535 is a DIP, not surface mount, and I am not sure of what code I should use to flash it.

I built a circuit according to that shown in Atmel's schematic of the ISP. Unfortunately, I could not find a hex file that I could identify as ISP code for the '8535. I have a very strong suspicion that the code is the same as that in the '8535 in the STK-500. If have a version of the STK-500 firmware that Colin O'Flynn posted a long time ago and it is identical to the code that I dumped from my working STK-500, so I am confident that I have good copies of the STK-500 code.

I have wired and checked out the board, and buzzed out all the connections, checked all the voltages against what I would expect. I flipped on the power on a target board and although something is happening, its doesn't look like an AVRISP. Both LEDs are on dimly, blinking for milliseconds at a time, at about 200 Hz. Code is clearly running because when I ground one of the pins that's pulled up (PD6) it waits until I let the pin go high again.

It is not recognized by the programming software in AVR Studio 4, even though the identical firmware in the STK-500 board is recognized.

I have checked and re-checked every aspect of the circuit that I can. The only fuse I could find on the AT90S8535 is the ISP enable fuse, and of course the ISP is working.

Here are my questions:

1) Does anybody who reads this have a good enough memory to know whether AVR ISP uses the same firmware as the STK-500?

2) From my description, both red and green LEDs blinking at about 200 Hz with a low duty cycle, does this symptom suggest to anybody what is missing?

For those who would ask "Why not go to Digikey and just get a new programmer?" -Its because Digikey is 8,000 miles away and I don't want to wait weeks to continue with my current project.

I want to copy the old ISP functionality so that I can continue to use programming software in AVR STudio 4 IDE.

Thank you in advance for any constructive advice.

--
"Why am I so soft in the middle when the rest of my life is so hard?"
-Paul Simon

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

Given that you can buy a USBAsp on ebay for $2..$3 is it really worth the effort?

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

AFIK, the STK500 firmware is just loaded via an encrypted bootloader. It will be different since the STK500 can do lots of other things.

There are many STK500 clone programs, I would use a mega16 or mega164 in the socket, and use different software. I would guess that it uses the regular SPI and USART pins, and the odd GPIO for LEDs. You just need the schematic or a multimeter to determine where the LEDs go.

Do you want stk500v1 or stk500v2 protocol ?

David.

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

The STK500 and the AVRISP return different signatures to Studio.
What does the header in the programming window say?

From memory there are some pins which are wired to gnd or v+ to differentiate the 2 hardware.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

The problem is that there is no programming window. Whenever I try to connect to the programmer, I get the window that asks me to select a programmer from a list on the left and the connections means (Auto, Com1, Com2, etc.) on the right. My programmer does not "answer" when trying to connect.

I know the hardware part of the RS-232 part works because I tested it with a 'Mega163 containing a different program.

I think you answered my question; if the two types of programmers return different signatures, then the firmware is not exactly the same, and there is a good chance that the problem is that the STK-500 firmware is looking for hardware that does not exist nor is faked in the AVR ISP. I guess the next step is to see how trouble it is going to be to figure out how to fake the STK-500 hardware.

Anybody have a copy of AVR ISP (8535)firmware laying around?

By the way, John, I appreciate and occasionally use your AVR910 ISP V 3.0 on occasion.

David Prentice wrote:
"Do you want stk500v1 or stk500v2 protocol ?"
My answer is yes, either one would be ok as long as it works :-)

--
"Why am I so soft in the middle when the rest of my life is so hard?"
-Paul Simon

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

Ah-ha, AS4 shows the AVRISP-1 manual.
It gives the schematic, so you can see exactly where problems might arise.

I note that it uses TQFP part. So is a pain to replace.

Since everything looks a little similar to the STK500, it is quite possible that the firmware is the same. The AVRISP-1 just reads different Hardware revision on PORTB 0..4.

Since I don't like soldering, I would buy a new programmer. If it was just swapping PDIP-40 chips, I would use clone software.

David.

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

Quote:
occasionally use your AVR910 ISP V 3.0 on occasion.
By using the same programmer and keeping the AVRIPS's 90S2313 in reset mode somehow, you should be able to program a 90S8535 with AVRProg using the STK500.ebn file into the chip.

I did fix my programmer a while ago this way IIRC.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I had used the AT90S1200 on the dead programmer and tried to reload the program from the .ebn file as you suggested and discovered that the AT908535 in the AVR ISP is read,write and verify protected. I suppose I could run wires from the pads on the PCB to a 40 pin socket...if I had the hands and eyesight of a 15 year old.

The schematic in AVRStudio 4 is the same one that I used to make the hand-built AVR ISP, but checking the schematic triggered a thought: I omitted the AT90S1200 thinking that it would be enough to program the AT90S8535 on a separate programmer, then I could skip wiring in the '1200. Maybe what's missing is some necessary interaction between the two controllers at startup.

As a backup, I ordered a Thai-branded USB programmer so I can get back to the things I want to be working on, but will continue to work on my illegitimate copy of the ISP because I prefer RS-232 for the 3+ meter run between the desk and the workbench.

--
"Why am I so soft in the middle when the rest of my life is so hard?"
-Paul Simon

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

Quote:
then I could skip wiring in the '1200.
Provided you have a working AVR910 programmer. :-)

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly