|
RE: FW: avrdude + avrstudio / stk500 / ATMEGA162 - programming problems: msg#00008hardware.avr.avrdude.devel
Galen, Thanks for the help. I have had some success!!! I can now program the chip using High-Voltage Programming mode ONLY. I wanted to reassure myself that I did not have any board, power supply, chip problems. I connected PORTD to PROG-CTRL and PORTB to PROG-DATA as described in the stk documentation. Then using AVRStudio I could successfully read the signature. I then programmed a simple (flashing light) program. Switching off the power supply, disconnected the two cables, hooked up the leds, switched back on and lo and behold I saw flashing lights. This is at least a temporary solution. Inserting and removing the cables will become tedious very quickly I fear. :) Returning to the ISP issue. I believe Galen is correct with his suggestion regarding sck but currently I only receive the following: //// Avrdude -p atmega162 -c stk500 -t avrdude: stk500_program_enable(): failed to enter programming mode avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check. avrdude done. Thank you. //// Not being very familiar with avrdude, I was not sure when and how to set sck. My idea was to set sck in the terminal mode, is this correct? Obviously this is different to the behaviour that I had previously when avrdude would complain at the verification stage. I'm not sure why this is, I guess in my fiddling about I have forgotten to change something back. So once again here are my settings on the stk board. VTARGET = ON AREF = ON RESET = ON XTAL1 = ON OSCSEL = 1+2 BSEL2 = ON PJUMP = OFF ISP6PIN connected to SPROG3 UGGHH!!! Steve -----Original Message----- From: Galen Seitz [mailto:galens@xxxxxxxxxxxxxx] Sent: Mittwoch, 22. Dezember 2004 20:52 To: Steve Bentley Cc: 'avrdude-dev' Subject: Re: [avrdude-dev] FW: avrdude + avrstudio / stk500 / ATMEGA162 - programming problems >From the mega162 datasheet: Default Clock Source The device is shipped with CKSEL = 0010 , SUT = 10 and CKDIV8 programmed. The default clock source setting is therefore the Internal RC Oscillator with longest startup time and an initial system clock prescaling of 8. This default setting ensures that all users can make their desired clock source setting using an In-System or Parallel programmer. ... Calibrated Internal RC Oscillator The calibrated internal RC Oscillator provides a fixed 8.0 MHz clock. This means that the clock coming from the STK500 oscillator is not being used, assuming this is the first time you have programmed the part (ie it is in its factory default state). Thus the actual system clock is 1 MHz. When the SPI is configured as Slave, the SPI is only guaranteed to work at fosc/4 or lower. You need to set the SCK period >= 4 us. Use the avrdude command 'sck 4'. I think this will solve the problems you are having. BTW, AvrStudio has the ability to change the SCK period, but I can't remember where. galen --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.820 / Virus Database: 558 - Release Date: 20.12.2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.820 / Virus Database: 558 - Release Date: 20.12.2004 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: FW: avrdude + avrstudio / stk500 / ATMEGA162 - programming problems: 00008, Galen Seitz |
|---|---|
| Next by Date: | Re: FW: avrdude + avrstudio / stk500 / ATMEGA162 - programming problems: 00008, Galen Seitz |
| Previous by Thread: | Re: FW: avrdude + avrstudio / stk500 / ATMEGA162 - programming problemsi: 00008, Galen Seitz |
| Next by Thread: | Re: FW: avrdude + avrstudio / stk500 / ATMEGA162 - programming problems: 00008, Galen Seitz |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |