Trying to program tiny13A and Mega8 with CVAVR

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

Hello,

 

I have a USB AVRISP, just connected to codevision. The ISP looks happy, both greens lights on, when I hit program from inside CVAVR the green light flickers, so it looks like they are talking.  I get the error :can not establish connection to device check, hardware, security bit, clock...

 

It all looks good. Tried all the SCK settings. What am I missing? I tried with both tiny13 and mega8.

 

Thanks,

 

Alan

This topic has a solution.
Last Edited: Mon. Jun 20, 2022 - 07:15 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Welcome back after 18 years. 

 

Double check wiring?

 

Try another USB cable?

 

Use different software to test. Try this one.

 

https://blog.zakkemble.net/avrdudess-a-gui-for-avrdude/

 

With the following settings hit detect and see if it can detect your ATmega8.

 

 

Getting the same error? Or different?

 

“Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?” - Brian W. Kernighan
“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” - Antoine de Saint-Exupery

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

Also make sure you don't have any components (LED, push button with pull-up resistor, capacitors to ground) connected to any of the programming pins. 

These components may present too much of a load to your programmer.

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

Thank you for the suggestion.  I get a very similar error from avrdudess 2.14, so I know it is not a setting in CVAVR that is causing the issue. Tried several chips , so not a bad chip issue. Must be either my wiring or ISP. This was very useful.

 

Wow 18 years! seems like yesterday!

 

Alan

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

Thanks, nothing connected to any pins , except wires for programmer.

 

Alan

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

ajmartin wrote:

Must be either my wiring or ISP. This was very useful.

 

Have a look at #1 in my signature below. Yes it's for a '328 but it'll give you an idea what you should be looking out for.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

Last Edited: Mon. Jun 20, 2022 - 04:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ajmartin wrote:
I have a USB AVRISP,
If an Atmel AVRISP mkII then a treasured tool; there's one clone, several near clones, and the function-like (LUFA)

ajmartin wrote:
What am I missing?

  • Electrical power (stable and reasonable noise; stable means in SOA)
  • Clock

 


AVRISP mkII

 

Serial Programming Pin Mapping | ATmega8A Data Sheet

libsigrokdecode/decoders/avr_isp at master · sigrokproject/libsigrokdecode · GitHub

 

"Dare to be naïve." - Buckminster Fuller

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

ajmartin wrote:
or ISP.
If you have an STK500 then try it; else, there are ISP with the STK500v2 protocol.

 

AVR STK500 User Guide

[page 51]

Section 6

In-System Programming of an External Target System

Pololu - 5.10. Using the clock output to revive AVRs

 

"Dare to be naïve." - Buckminster Fuller

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

ajmartin wrote:

I have a USB AVRISP, just connected to codevision. The ISP looks happy, both greens lights on, when I hit program from inside CVAVR the green light flickers, so it looks like they are talking.  I get the error :can not establish connection to device check, hardware, security bit, clock...

 

It all looks good. Tried all the SCK settings. What am I missing? I tried with both tiny13 and mega8.

 

Please post a link to the actual device that you have bought.   "AVRISP" might mean anything.  e.g. Atmel genuine AVRISP-2 or some Chinese STK500 clone.

A photo of the pcb if you can't find the original purchase link.

 

If you have a Chinese USBASP you just connect all the wires and everything should work.

Likewise any other "known" programmer should work with Codevision.

 

The "usual" problem is that someone has altered the clock fuses.

Since you have a Tiny13 I guess that you only want to use 8MHz RC.

Supply an external clock to XTAL1 to recover fuses.

 

David.

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

It was indeed a wiring issue, really a transcription error. I had the pinouts of the ISP, the pinouts of the IC and the pinouts of the proto board with a 6 pin SIP that was wire wrapped to the IC programming pins and needed to be wired to the ISP dual in line connector.  Somewhere along the lines I reversed pins 1 through 6 on one of the drawings, so every thing was backass ackward.

 

Thank you every one for the quick input.

 

Alan

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

Is your programmer a genuine Atmel AVRISP-2 ?

Or a Chinese USB version that appears as a COM port and uses STK500 UART sequences ?

 

They should all "work".  You just have to specify the "programmer type".

 

David.