go away spammer

Author Topic: ISP Mode Error  (Read 10147 times)

0 Members and 1 Guest are viewing this topic.

Offline pomprockerTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,431
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
    • Nerdcore - Programming, Electronics, Mechanics
ISP Mode Error
« on: December 13, 2008, 02:24:15 AM »
Whoops!

I was playing around with an ATMega8 on a breadboard. I hooked up a 16MHz external crystal properly to xtal1 and xtal2. I then changed the fuse in AVR Studio to Ext Clock Start-up time: 6CK + 0ms.

Now I get an ISP Mode Error when trying to get my AVRISP mkII to connect.

I've disconnected the crystal.

I've searched the forum, and tried changed frequencies of the programmer, with no luck.

Please help!

Offline pomprockerTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,431
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
    • Nerdcore - Programming, Electronics, Mechanics
Re: ISP Mode Error
« Reply #1 on: December 13, 2008, 03:22:22 PM »
I either changed it to that above or:
Ext. Low-Freq Crystal.....

I don't remember, but either way...with those two and CKOPT programmed, what is it expecting on the xtal lines?


I heard if I can give it the "tempo" it needs I can get it to walk again...

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: ISP Mode Error
« Reply #2 on: December 13, 2008, 04:28:37 PM »
If you are using a breadboard with a stickered back the terminals might be pushing out from the back - double check to make sure they are not bulging out of the back
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline pomprockerTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,431
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
    • Nerdcore - Programming, Electronics, Mechanics
Re: ISP Mode Error
« Reply #3 on: December 13, 2008, 04:42:27 PM »
I saw this on sparkfun:
Just put a 1nF cap from OSC1 to ground, and a 370 ohm resistor from OSC1 to Vcc
(this will create a 1MHz tempo?)


And then I found this

Quote
First, I removed the external crystal and the two capacitors. Then I connected one of the output pins of a second microcontroller to the XTAL1 pin of the “broken” atmega8. Nothing should be connected to XTAL2. Both of the microcontrollers have to be connected with their GND pin to the same ground, and to a power source of course. The working microcontroller should be programmed to send pulses with regular intervals on its output pin. The program shown below is fine:

Code: [Select]
#include <avr/io.h>           //Required to use assembler commands
#define F_CPU 1000000UL  // set the internal clock speed of 1 MHz
#include <util/delay.h>
 
int main()
{
 
    DDRC = 0xFF;            //Make Port C output values
    PORTC = 0x00;           //Turn all output pins on port c off
 
    while(1) {
        PORTC = 0x01;
        _delay_ms(5);     //This delay is probably not necessary
        PORTC = 0x00;
        _delay_ms(5);     //This delay is probably not necessary either
    }
 
}
With this setup, the Atmega8 with the wrong fuse bits may be programmed as usual, because the other AVR now serves as external clock source.

Offline pomprockerTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,431
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
    • Nerdcore - Programming, Electronics, Mechanics
Re: ISP Mode Error
« Reply #4 on: December 13, 2008, 05:45:21 PM »
Well, using a second AVR as a clock source doesn't seem to work. I don't have the tools to measure what frequency I'm creating and I'm not sure what frequency it wants.

The second choice is a high voltage programmer

I found this:
http://mightyohm.com/blog/2008/09/arduino-based-avr-high-voltage-programmer/

I'm going to try to implement it when I can get a few 1k resistors.

(I always wish I had a good assortment of resistors and caps laying around)



Offline pomprockerTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,431
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
    • Nerdcore - Programming, Electronics, Mechanics
Re: ISP Mode Error
« Reply #5 on: December 15, 2008, 12:24:19 AM »
I built the high voltage programmer out of a breadboard.

It works as advertised on the link above, except that it doesn't work in unlocking my atmega8 (yes, i remembered to change the high and low fuse definitions in the code :P)

I found a 15vdc 3a laptop power supply, and ran it through a 12v regulator, but when I push the button it is suppose to feed 12v to the reset pin, but it is only getting 7.66v.

I posted a comment on the website, but if you guys can figure this out that would be cool


Sorry about the crappy picture.
« Last Edit: December 15, 2008, 12:42:23 AM by pomprocker »

Offline pomprockerTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,431
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
    • Nerdcore - Programming, Electronics, Mechanics
Re: ISP Mode Error
« Reply #6 on: December 17, 2008, 02:47:53 AM »
Can somebody try this:
http://www.evilmadscientist.com/article.php/avrclockbits


I've had no luck with avrdude tonight because I run windows XP under parallels desktop for mac on my macbook pro mac os x 10.4.x the ports are all complicated with my setup

Offline pomprockerTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,431
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
    • Nerdcore - Programming, Electronics, Mechanics
Re: ISP Mode Error
« Reply #7 on: February 25, 2009, 07:14:00 PM »
Just an update on this, I was able to unlock my AVR with the tutorial from Mightyohm posted above. There was just an error in his schematic that he corrected and it now works.

I even made somewhat of a tutorial:

http://www.societyofrobots.com/member_tutorials/node/239
« Last Edit: February 25, 2009, 07:15:14 PM by pomprocker »

 


Get Your Ad Here