go away spammer

Author Topic: $50 Robot Reading Failed (URGENT)  (Read 4363 times)

0 Members and 1 Guest are viewing this topic.

Offline HePETopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
$50 Robot Reading Failed (URGENT)
« on: January 10, 2009, 12:10:30 PM »
I have compiled all the necessary code and produced the hex file. I am using an AVRISP MKII , I am assuming that after producing the hex all I have to do is click on the avr ICON choose the right avr programmer and on the next widow I set it to: Device=atmega 8, Programming Mode= ISP, Input Hex File = C:\My_Robots\Photovore_v1\Photovore_v1.hex, then finally click on the "Program" button under FLASH. Doing these steps gives me this:

Reading FLASH input file.. OK
Setting mode and device parameters.. OK!
Entering programming mode.. OK!
Erasing device.. OK!
Programming FLASH ..      OK!
Reading FLASH ..      FAILED!
Leaving programming mode.. FAILED!

Have I missed some steps before hitting the program button? theres a lot of tweakable things in there (fuses,lockbits, etc)but I really am not certain about this things so I just left them to default. I have checked all my connections and I m at least 90% sure of it. Really new to this thing.... HELP!!!

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: $50 Robot Reading Failed (URGENT)
« Reply #1 on: January 10, 2009, 07:05:50 PM »
Your steps look ok.

When you plug in the programmer, with $50 powered on, what lights do you get on AVR programmer unit?

One green LED hopefully? If not then there is definitely a wiring problem.

Looks like a connection problem on the ISP header.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline HePETopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: $50 Robot Reading Failed (URGENT)
« Reply #2 on: January 12, 2009, 12:03:28 PM »
Your steps look ok.

When you plug in the programmer, with $50 powered on, what lights do you get on AVR programmer unit?
      --> BOth are green initially and then the other turns orange on programming stage. once it failed reading it stays orange though.

One green LED hopefully? If not then there is definitely a wiring problem.

Looks like a connection problem on the ISP header.

   --> checked the isp connections seemed to be ok. My Next plan of attack is to breadboard it, just to see iif whether it is my circuit board or the MKII itself (Do you have any better ideas). What is the minimal connection needed for programming the atmega8 (i'm guessing the ISP header only right (MISO,MOSI, SCK,RESET,VCC and GND) right?).

Thanks bro for the quick response. I m doing this as a proof of concept for my school project.

By the way is the diode crucial for the programming part?Coz seems that i cooked it when soldering (it doesnt light up when I power the board). Also I'm doing the programing without the servos and and sensors which I guess should be alright. THANKS again!!


Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: $50 Robot Reading Failed (URGENT)
« Reply #3 on: January 12, 2009, 12:17:55 PM »
Try reducing the speed of the programmer in the software settings.

The LED will make no difference to the programmer. Also: it wont light up. It's not a 'power on' indicator. You have to write some code to turn it on.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline HePETopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: $50 Robot Reading Failed (URGENT)
« Reply #4 on: January 12, 2009, 02:08:01 PM »
Went all the way down to ISP freq = 51.9 Hz got the same results.

Should I specify anything on the Oscillator Calibration byte in the Advanced Tab?

Wow it feels so nice to have somebody to talk too... takes out some of the frustration! ;)


Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: $50 Robot Reading Failed (URGENT)
« Reply #5 on: January 12, 2009, 02:29:55 PM »
Check out this thread http://www.societyofrobots.com/robotforum/index.php?topic=6308.0 and the link to AVRISPMKII programmer - may help

Here are my settings:
'Main'
Device and Signature Bytes = ATMega8. Click 'Read Signature' and make sure its ok.
Programming mode and target settings = ISP Mode. Frequency = 12.37kHz

'Fuses'
Make sure SUT_CKSEL uses an internal clock such as 'Int RC Osc. 1MHz; Startup time: 6CK + 4ms', or the equivalent 8MHz internal clock if your code is compiled to 8MHz.
I'm assuming you haven't added your own clock crystal to the board.

'Lock Bits'
Dont change anything

'Advanced'
Don't need to set it. Leave at 'Select Frequency'.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline HePETopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: $50 Robot Reading Failed (URGENT)
« Reply #6 on: January 13, 2009, 10:14:56 AM »
I GOT IT!!!!!!

Oh my gosh... I just kept on missing the frequency thing... I read your reply and did the same thing except for (guess what!?) the frequency. So I went back on the manual (for like the thousandth time which probably made my mind numb, since i missed this frequency note)  and found this:

Note: The AVRSP MKII does not support FLASH or EEPROM programming below 2 KHz. (for some reason my default was 1.049 KHz)

So, for the benefit of people who might get the same problem, make sure your your ISP Frequency is set above 2 Khz but less than 1/4 of your  target. Oh by the way don't forget to click the write button when setting it (I was dumb I did it once ::) it will save you terabytes of frustration).

Now on to the servostuff...

Webbot thanks a lot.. amazing response time my friend.. I'll probably need help on this competition, that's why i'll be bugging everybody some more. By the way bro.. can i email you? I just want to send you the details of the contest to get your insight on this competition. It's just because some of my classmates may see my plans for my project if I post them here . To the people who are reading this dont worry  i'll post every detail of the BOT if I win..

 


Get Your Ad Here

data_list