Codevision fused all bits of ATmega8

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

I was trying to get my LCD working, a while ago. For the LCD I tried codevision, because I wanted to know the code code of codevision was working with my ATmega8. I programmed it with Codevision, but the program fused all bits, except SPIEN to '1' (unprogrammed) I have 3 fused ATmega8's with codevision, how I can fuse them back?
PonyProg cannot find my devices.

My idea: I used an Calculator to find out all settings that have been made by Codevision. The things I found
- External Crystal/Resonator High Freq.; Start-up time 16k + 64ms
- Boot Flash section size=128 words Boot start address=$0F80; [BOOTSZ=11]
What to do? I've tried a 4mhz crystal, not working(checking my circuit!) Any other tips?

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

You simply need to connect an external clock to the XTAL1 pin of your device. Something like a wave generator or crystal oscillator or a 555 timer running in the range of 500kHz to 16MHz.

To find out the correct fuse settings the avr fuse calculator is very helpfull.

Regards
Sebastian

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

If your ISP programmer is failing to enter programming mode, then it's impossible to know for sure what the fuse bits really are. So you can quite safely ignore all the '1's you appear to be reading; they're meaningless.

I'm assuming you're using CodeVision as a programming platform. It's most likely that the AVR's fuses haven't changed at all, but that the ISP bitrate has been increased to a rate faster than 1/4 the CPU rate, thus breaking ISP communication.

In CodeVision, the ISP clock is automatically adjusted based on the active project's configured CPU clock. I suggest you should start by figuring out how to force your programmer to slow its bitrate down to 250 kHz or slower.

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

I don't think that is the problem. My idea is, the fuse bits are set. Before I discovered that settings, it was to late.

The Codevision settings are:

Attachment(s): 

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

OK, before I ask a question again, I have to try first. Used an external Crystal and it works!

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

Don't blame Codevision - YOU are responsible for setting the fuses to be programmed!

Randy

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

Quote:

YOU are responsible for setting the fuses to be programmed

[Almost] Exactly--the shown picture shows all fuses as "unprogrammed", which in fuse-land is a "1" value.

Whatever dev. environment or programming system one uses, you must be aware of what you told the programmer to do. As a normal full sequence will involve the signature check, erase, program & verify for EEPROM, flash, fuse, & lock bits then on AVRs one must be very careful on a new project to either skip the fuse part or ensure that they have a usable combination displayed. One way with CV is to do a "Read Fuses" and then copy the current to the project settings.

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.

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

Indeed, I know it is also my fault, but why the settings of codevision are 'No protection' and 'Program Fuse bit(s)' when you start a new project . I think beginners, like me, do not see it and only see it, when all bits are already set to '1'.
My opinion is, program the fuse bit, when the 'developer' wants to do it. And not set it to 'No protection' as standard setting.

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

Quote:

why the settings of codevision are ...

... because [IMO] the "full" sequence is the proper approach to ISP programming.

You need to check and adjust all of the default project settings when starting a project. Include "After Make" in this task.

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.