AVRprog ?

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

Hello All,

I have just joined and have a tech problem with the AVRprog.

When I run AVRprog or use AVRstudio 4 I get :

"No supported baord found! AVRprog version 1.40"

It is connected on COM1 via a full straight serial cable. It is correctly powered up and it works perfectly when using an inhouse custom program.

I am an experenced engineer, so it is not some daft problem like I have left the COM port open.

I have tried a couple of AVRprogrammers and they all do the same thing.

Any suggestions ?

Thanks for your help

Dren

<º))))><

I am only one lab accident away from becoming a super villain.

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

But what actual programmer electronics have you got on the other end of the serial cable from the PC? Is it something that claims to be AVR109/910 compatible?

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

WOW - now that's what I call service !

Thanks for the mega fast reply.

It's an :

ATAVRISP:PROGRAMMER-AVR MCU ISP DN9839086

Farnell part number : 388-4405

I can't see any other ID, but I can open it if you need a number from the PCB

Cheers

Dren

<º))))><

I am only one lab accident away from becoming a super villain.

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

Curious, a search at uk.farnell.com finds neither "388-4405" nor "DN9839086". Can you confirm that it looks like this: (below)

If it does then it's not AVRProg that you want to use. Instead on that Tools menu locate "Program AVR" then select "Connect..." at the top of the sub-menu.

In the dialog that appears select the "STK500 or AVRISP" option at the top and proceed from there...

Attachment(s): 

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

Hi,

yes that looks to be the one. They have a number of them here but there are no further part numbers on them that I can see without openning one up.

Since posting I have managed to get it running via AVRstudio4 and program/verify an ATmega8515, however it is still behaving in exactly the same with the ATtiny13... with is a shame as that's the device I need to use :(

I am completely sure that the ATtiny13 is wired up correctly and powering the programmer as I've spent all afternoon checking + bleeping everything out; even knocking up my own little board with no effect.

I have tried 3 different ATtiny13, just incase. Would it give the same error message if they had already been programmed ? I know it's unlikely but I'm open to any ideas ?

Thanks a lot

Dren

<º))))><

I am only one lab accident away from becoming a super villain.

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

I'm confused. AVRProg is for using the bootloader via the UART. A ISP programmer requires the AVR Programmer (black bug icon on the tool bar). So which is it?

Smiley

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

I was about to ask "So could we see a schermatic on how the ATAVRISP is connected to the ATtiny13?", but then I re-read your post and found

Quote:
I am completely sure that the ATtiny13 is wired up correctly

so I guess that the connections are not to blame..

Serial programming requires that the AVR has a clock source (no, not the SCK line). IF the ATtiny13s have been programmed to use an external clock source (a clock signal on CLKI/PB3) and no such clock is available then the AVR can not be programmed with an ISP programmer. If the AVR has been programmed to use such a clock source, and if that clock source indeed is present, but this clock source is less that 4 times the programming clock frequency (on SCK) then the programming will probably fail.

This requirement of the AVR clock being at least 4 times the programming clock holds for whatever clock source the AVR runs from. Eg if the internal RC oscillator is tunning at (nominally) 4.8 MHz then the ISP programming frequency can not be more than 1.2 MHz.

If the ATtiny 13 is using the internal 128 KHz internal oscillator then youd have to turn the ISP frequency down to 32 KHz.

Quote:

Would it give the same error message if they had already been programmed ?

What error message? The message "No supported baord found! AVRprog version 1.40"? If it is this error message you are referring to then I am just as confused as Smiley. AVRprog is not to be used with an AVRISP programmer. (Yes the name "AVRprog" is an unfortunate accident just waiting for this kind of confusion to happend. It does not make things better that it is spelled "AVR Prog..." (with a space) in the Studio menu. Anyway, it is not what you think/want.)

In the Tools menu, select Program AVR and then Connect.... In the dialogue select the line STK500 or AVRISP to the left and hopefully Auto should work OK fort you on the right. Now Connect. No error? Good. Now the programmer is ready to use as described by Smiley above. (Although I never saw the little dark thing on the toolbar as a bug, but rahter a DIL package. Time for the optician for you too, Joe?)

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

Quote:
What error message? The message "No supported baord found! AVRprog version 1.40"? If it is this error message you are referring to then I am just as confused as Smiley. AVRprog is not to be used with an AVRISP programmer.

AVRProg does indeed work with an ISP programmer as well using the AVR910 protocol.

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

CirMicro wrote:
AVRProg does indeed work with an ISP programmer as well using the AVR910 protocol.
Well shiver me timbers! I've been using AVRProg for bootloading and the AVR Programmer with ISP since day one and did not realize that AVRProg would do ISP. Arrgh, learn sump'n new ever day.

Smiley

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

Hi,

I gave up with the AVRprog to program the ATtiny13. I was esp annoyed by it telling me that no board was found, whereas it should have at least found the header if then not be able to talk to the IC - grr !

Instead I used the STK500 dev board ISP. I just linked it to my PCB - bingo the PC found the ISP and then it worked first time. So all is well in the world*

Talking to other eng here the AVRprog are pretty hated, they are apparently intermittant at best. I suppose that is why I could find so many of them not being used. The consensus is that the Micro-ISP is the one to have, although I believe that it doesn't support that many devices ?

Anyway thanks for yuour suggestions and help, I've put the AVRprog back in the cupboard 'filed' with the other 'special' equipment and hope that I never have to use it again.

All the best

Dren

(*err... no)

<º))))><

I am only one lab accident away from becoming a super villain.

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

But you never told us what electronic interface it was that you were trying to use with AVRProg - enquiring minds need to know these things!

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

It was a standard 6 pin programming header <-> ATtiny24v

// ISP header connections
// ----------------------
// pin 1 = MISO pin 2 = VCC
// pin 3 = SCLK pin 4 = MOSI
// pin 5 = /RESET pin 6 = 0v

Anyway I spent more than enough time on it, and the STK500 connected first time and has subsequently worked beautifully .... yahay !

I still prefer PICs TBH, esp the (daft) way that writing to the tiny IO ports turns on/off the pull up resistors. Also AVR studio is a tad too keen on optimising out code, esp my debug code - grrr ! Otherwise it's a sweet dev system and everything appears to be working fine :)

<º))))><

I am only one lab accident away from becoming a super villain.

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

Quote:
Also AVR studio is a tad too keen on optimising out code, esp my debug code - grrr ! Otherwise it's a sweet dev system and everything appears to be working fine

AVR Studio does not have an optimiser (or even a compiler). I assume you added WInAVR to it. If you want to keep your debug code from being optimised just switch the optimiser off (in project config switch -Os to -O0)

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

Quote:

Also AVR studio is a tad too keen on optimising out code, esp my debug code - grrr !

If you can devise an algorithm that can discern between "core app code" that has been written in a non-optimised way (and thus should be optimized by the compiler), and debug code (that should be left untouched by the optimizer), then I'm sure that the gcc folks would consider adding it to the gcc code base and if it was accepted add the compiler switch -no-optimize-debug-code.

While we await that algorithm and switch we rely on eg -O0, declaring variables volatile, putting debug code in a separate file and compile that with -O0 etc..

Personally I like the compiler to optimize the hell out of my code as long as it's sematics are not altered. If I want un-optimized-code I can go for -O0 or just revert to assembler..

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

Quote:

If I want un-optimized-code I can ... just revert to assembler..

... as js and minions do on a regular basis. :twisted:

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.

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

How about any function that's to be left well alone starts with, say : DEBUG_xxxx, FULL_xxxx or VIRGIN_xxxx, hmm or even FECK_OFF_AVR_I_LIKE_IT_LIKE_THIS_xxxx.

Maybe it could just ask me if I really wanted a 'useless' FOR loop in the code and prompt if I wanted to leave it in as a delay ? It should be able to pick that up, then when it's running I can take out the "-no-optimize-debug-code" switch... everyone's happy.

Personally I like assembler, as you feel you 'know' what is really happening in the world.... OK it's a total delusion, but wouldn't you rather be happy than right ?

<º))))><

I am only one lab accident away from becoming a super villain.

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

If you have a single function you don't want optimised then put that into a separate .c file and build that one -O0 while you build the rest of the project with -Os

(AVR Studio is almost certainly not powerful enough in it's auto generated makefiles to allow this to be done in any other way but ticking "use external makefile" and providing your own makefile)

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

Dren wrote:
How about any function that's to be left well alone starts with, say : DEBUG_xxxx, FULL_xxxx or VIRGIN_xxxx, hmm or even FECK_OFF_AVR_I_LIKE_IT_LIKE_THIS_xxxx.
Yeah, and the next whining we would hear would be "Why do I have to write this? Why doesn't the compiler just know?"

Stealing Proteus doesn't make you an engineer.

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

Quote:

How about any function that's to be left well alone starts with

How about placing these functions in a separate source file (which would make sense even despite the "problem" we are discussing - think debug.c and debug.h to take with you between projects), name the function whatever you like, and use the -O0 option when compiling this file?

I've never seen a compiler that had those special provisions you are sketching. There are several solutions to the problems. Use one of them.

If your previous toolchains have not optimized out the stuff we're discussing then I consider that an indication on supreme quality of the (avr-)gcc compiler.

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

Quote:
I gave up with the AVRprog to program the ATtiny13.
That's because AVRProg WILL NOT WORK with the AVRISP. It will only work with older AVR910 type programmers or other tools like the STK500 to program it's firmware NOT THE TARGET firmware.
Quote:
Instead I used the STK500 dev board ISP.
Which is what you should have used all along. :-)

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

ArnoldB wrote:
Yeah, and the next whining we would hear would be "Why do I have to write this? Why doesn't the compiler just know?"

Was I whining ? Hey that's nothing you should of heard me when it WASN'T going !

Sadly I have to write this (and in C too) 'cos that's what they pay me for... I'd much rather they were paying me to do a bit of artistic painting, creative writing, compose music, or just to lounge in the sun by the pool having cold drinks brought to me by pale nubile young goths, who would only be too happy to suck my pores a the drop of a hat... but until the CV lands one of those jobs paying this salary it's back to the programming.

js wrote:
Instead I used the STK500 dev board ISP. Which is what you should have used all along.

Yep, hindsight is a wonderful gift, however, if I had it I'd have done the right lottery numbers last Sat and not be programming this week at all (see above).

Thanks for the telling me about -O0 optinon :) That actually is a useful tip - cheers !

<º))))><

I am only one lab accident away from becoming a super villain.

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

Quote:
hindsight is a wonderful gift,
So as a true professional you did NOT look at the STK500 manual? :shock:

It's right there in the Help menu of Studio.

But as no smoke came out of the board no need to read.... :lol:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

As a professional employed eng I have to do as I'm told to. We decided to go with the tiny13 and I was given the AVRprog (+ A90 complier), which are availaible inhouse and should have worked according to the manual. I've never used either of them before.

When it didn't talk to the tiny13 I managed to get a free dev system from the supplier (STK500) + download all required SW. That worked first time + I feel pretty pleased that I have a fully working solution.... fantastic all sorted :)

What else do would you have done given that I don't believe that you really are a clairvoyant ? Are you freelance or just an interested hobbyist and free to play around and do whatever you feel like ? Ahh luxury

<º))))><

I am only one lab accident away from becoming a super villain.

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

Quote:

As a professional employed eng I have to do as I'm told to.

I always thought that it meant that I was supposed to use my infinite wisdom to end up with the "best" solution. If I were a technician or other line person then generally yes, the "rewards" will come from doing as you are told.

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.

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

The 'best' solution is the one that makes the boss happiest, esp when salary reviews are coming along if you know what I mean :D Have you never worked in a large company ?

Anyway I don't know why most people on this forum are so snide and unfriendly. Why the need to be competative ? I had a problem, it's fixed, complete and fully working. As far as I can see the ideal soluton to what I was asked to do. We're all happy here... what's the beef ?

<º))))><

I am only one lab accident away from becoming a super villain.

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

Quote:
what's the beef ?
No beef. If you think we are unfriendly you should have seen the battles we have fought over the years, but we all still love each other...well mostly.. :lol:

I have been working for myself full time for about 18 years now, half of those years I have used AVRs.

If you were given AVRprog which programmer was it supposed to work with? Did they give you a programmer? If they handed you a STK500 and AVRProg then whoever gave it to you should be sacked.

And the boss can talk to me if he/she wants... :lol:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

LOL - thanks I'll bear that in mind.

The AVRprog does work as an ISP, as it works OK with the 8515.

I was given an STK500 from our suppliers, which I just tried as an experiment as I was a bit fed up with the AVRprog. As it worked first time and did everything I needed there seemed little point spending more time going back to get the AVRprog working as a second solution to the same solved problem.

It maybe there's a clocking issue, or voltage ? OK there's a whole stack of them in the lab, but they may have ALL been "cooked" at some point by someone. The fact that there are so many free and everyone seems to want the MicroISP header given a choice, tells me to leave them then all well alone.

On the plus side I'm very pleased with the current set up, and I've finished the first project !

I've moved on and now I'm using a ATtiny24V. It's pretty much done too, ('though I still have to crack why the complier copies the LUT into RAM as well as storing it in FLASH. Well I guess that's for speed, but I want it to stop doing it as it's wiping out all the RAM !) Still if everything worked first time where would be the fun ?

<º))))><

I am only one lab accident away from becoming a super villain.

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

Quote:
The AVRprog does work as an ISP
True but ONLY if you have an AVR910 type programmer. Never worked with the STK500.

It can also work if you have a bootloader already programmed into the chip in some cases.

Do I know what I'm talking about? See https://www.avrfreaks.net/index.p...

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly