AVRISP

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I have the AVRISP and when programming the ATMega 8  chip I have 2 chips out
of four that have locked up when been reprogrammed to the point the AVRISP
programmer complains it can not enter programming mode.

I asked ATMEL about the problem and they just said that I must have the
wrong fuse bits set!

IMHO why the hell should a product produced by a comercial company have a
bug that allows you to corrupt the chip you are programming to the point
that you can not even reset the fuse bits anymore.

Have read that this situation can be rescued with a parrallel programmaer,
is there a way I can rig somthing up to reset the fuse bits other than
buying another programmer?

Thanks in advance Roy.



Re: AVRISP

Quoted text here. Click to load it

To paraphrase an old saying from the 'net:

"Programming in BASIC is like using the kind of scissors a child gets in
school: difficult for the child get hurt using them and they will cut
paper as intended.

"Programming in C is like using a surgeon's scalpel: a precise
instrument that can perform miracles in trained hands but careless use
can lead to spilling your own blood (and losing a few fingers).

"Programming a microcontroller's fuse bits is like juggling scalpels..."

Developers need to be able to do things deliberately that could be
catastrophic if done incorrectly or in the wrong circumstances. Just one
incorrect bit can do a lot of damage; it's the nature of the business.

IIRC, the parallel programming algorithms for Atmel chips are documented
on their web site but it seems not to be accessible at the moment?

But here's one bloke from your neighborhood who may have had a similar
problem in the past and came up with a clever solution. I haven't tried
it, so caveat emptor. http://www.uq.net.au/~zzdkeena/AVR /

--
Rich Webb   Norfolk, VA

Re: AVRISP

Quoted text here. Click to load it

You may have inadvertently selected an external oscillator option when
you don't have one.  The answer to this is to use an external
oscillator, to inject into the XTAL1 pin of the device, then reselect
your required oscillator option in the fuses section.  Once you've
seleceted the right option then just disconnect the external
oscillator - you don't have to remove any crystal in your cicruit to
do this.

HTH
Alan


++++++++++++++++++++++++++++++++++++++++++
Jenal Communications
Manufacturers and Suppliers of HF Selcall
P O Box 1108, Morley, WA, 6943
Tel: +61 8 9370 5533 Fax +61 8 9467 6146
Web Site: http://www.jenal.com
e-mail: http://www.jenal.com/?p=1
++++++++++++++++++++++++++++++++++++++++++

Re: AVRISP
Thanks Alan - that makes sense,

What frequency do I need  1 mhz?

Quoted text here. Click to load it



Re: AVRISP

Quoted text here. Click to load it
Almost any frequency will do - I use 1MHz or 8MHz normally.  

I actually built an oscillator box with a 16MHz xtal osc and a binary
divider chain with a switch to select 16, 8, 4, 2, 1 0.5 or 0.25MHz.

I have managed to "kill" a few AVRs by accidently reprogramming the
fuse bits to external - but it seems to happen when you try and
programme the device with no power applied to it (apart from leakage
from the programming pins).  It's a real pain when it first happens
but now I just shrug my shoulder and accept I goofed again :-)

Alan

++++++++++++++++++++++++++++++++++++++++++
Jenal Communications
Manufacturers and Suppliers of HF Selcall
P O Box 1108, Morley, WA, 6943
Tel: +61 8 9370 5533 Fax +61 8 9467 6146
Web Site: http://www.jenal.com
e-mail: http://www.jenal.com/?p=1
++++++++++++++++++++++++++++++++++++++++++

Re: AVRISP
Thanks for the advice Alan.

Any chance of showing the schemaic of your 16Mhz divider circuit?

Quoted text here. Click to load it



Re: AVRISP

Quoted text here. Click to load it
Don't think I've got a diagram!!

It's just a 74LS04 running as a 16MHz XTAL oscillator and buffer then
a 74LS393 dual 4 bit binary counter wired up as a divider with the
input and the outputs connected to a rotary switch.  

The switch output is then fed through a couple of spare inverter ('04)
gates before going to the outside world via an RCA socket.  I then use
a bit of shielded cable to a ground croc cilp and a "injection" (ie.
voltmeter type) probe.

All in a small jiffy box with a 5v reg and a power lead to connect to
the 12v bench PSU.

Probably be even easier if you could pick up a cheap/free 16MHz osc
module from somewhere. Don't know whats on a PC Motherboard haven't
looked for a while.

HTH

Alan

++++++++++++++++++++++++++++++++++++++++++
Jenal Communications
Manufacturers and Suppliers of HF Selcall
P O Box 1108, Morley, WA, 6943
Tel: +61 8 9370 5533 Fax +61 8 9467 6146
Web Site: http://www.jenal.com
e-mail: http://www.jenal.com/?p=1
++++++++++++++++++++++++++++++++++++++++++

Re: AVRISP
Thanks again Alan,

Who are your prefered suppliers of Atmel / AVR chips?



Re: AVRISP

Quoted text here. Click to load it
Well I am using SMD parts (AtMega16, AtMega32) so I buy them through
distributors in quantities as I need them.

I use a couple of DIP chips of each type for prototyping and just keep
reprogramming them as required.

Dontronics have a range of Atmel parts at reasonable prices, have a
look at : http://www.dontronics.com/cat_hard_micro_avr.html

With the oscillator you also have to remember that the fusebits have
to be set correctly for whatever crystal you are using otherwise the
internal oscillator will not work right or not at all.  If you somehow
select "external oscillator" then you will have to supply an external
clock to recover.

I built a separate oscillator/divider box as it was more convenient
for me (I build different proto boards as I require as well as having
my "standard" board).  If you build your oscillator on your
development board just make sure you put some means on there for
extracting the closk for another board when you need it.

ICs are normally shipped with the internal RC oscillator selected
(1MHz).

Alan

++++++++++++++++++++++++++++++++++++++++++
Jenal Communications
Manufacturers and Suppliers of HF Selcall
P O Box 1108, Morley, WA, 6943
Tel: +61 8 9370 5533 Fax +61 8 9467 6146
Web Site: http://www.jenal.com
e-mail: http://www.jenal.com/?p=1
++++++++++++++++++++++++++++++++++++++++++

Re: AVRISP
Just thinking I may experiment with a simple 1 Mhz oscillator & buffer as
part of my seperat programmer board so that it is available for the next
time.

May even program a ATtiny 12 to give different frequency's as required and
use this is a clock source with some predefined frequency ranges ie 1Mhz,
500Khz,100Khz etc.

cya Roy



Re: AVRISP

Quoted text here. Click to load it

You might also have programmed the ATMega8's reset pin to be a GPIO
pin. Once you have done this, then you have to use a parallel
programmer to program the chip again.

Regards
   Anton Erasmus


Re: AVRISP
Thanks Anton.

So what does a parrallel programer do that allows it to recover the
situation, ie can I not rig up somthing to over come the problem?

Quoted text here. Click to load it



Re: AVRISP
Quoted text here. Click to load it

Try reading the data sheet ?
In there, you will see +12V is applied to /RST.

-jg


Re: AVRISP

Quoted text here. Click to load it

Just make a parallel programmer or buy one.

http://www.dontronics.com/auto.html#avr
http://www.dontronics.com/atmel.html

Also have a browse at http://www.avrfreaks.net /
free to join, look under academy



schematics
(just make sure you get the right circuits)
http://www.lancos.com/prog.html

http://www.myplace.nu/avr/yaap /

avrdude
http://savannah.nongnu.org/projects/avrdude /
http://www.bsdhome.com/avrdude /

lots of others
http://www.google.com/search?num50%&hl=en&lr=&safe=off&q=avr+programmer+circuits&btnG=Search

http://www.serasidis.gr/



Re: AVRISP

Quoted text here. Click to load it

There seems to be confusion about what an AVR parallel programmer is.
Many programmers refered to as a parallel programmer, is a programmer
driven from a PC's parallel port. From the point of view of the AVR it
is a serial programmer. I cannot recall having seen any programmers
available that is a parallel programmer from the AVR's point of view.

Regards
   Anton Erasmus


Re: AVRISP
On Sun, 10 Oct 2004 10:26:32 +0200, Anton Erasmus

Quoted text here. Click to load it

STK500 is the only one that I know of.

--
Mikael Ejberg Pedersen

Re: AVRISP
On Sun, 10 Oct 2004 10:46:01 +0200, Mikael Ejberg Pedersen

Quoted text here. Click to load it

Is the STK500 not a JTAG programmer ?

Re: AVRISP
On Tue, 12 Oct 2004 22:26:43 +0200, Anton Erasmus

Quoted text here. Click to load it

No. STK500 is a development kit capable of serial AND parallel
programming nearly every AVR type. But it doesn't do JTAG.

--
Mikael Ejberg Pedersen

Re: AVRISP
On Tue, 12 Oct 2004 22:26:43 +0200, Anton Erasmus

Quoted text here. Click to load it

No, it uses the chip's SPI ports for programming. Take a look at, for
example, the data sheet on the ATmega64 that supports both JTAG and SPI
programming.

Having a few JTAG dongles sitting around here (TI MSP430, Cypress
something (clear blue plastic box), a Xilinx Parallel 3, and an Altera
ByteBlasterMV clone (dang, these things do accumulate)) does anyone know
if the Atmel JTAG software can be fooled into using one of the others?

--
Rich Webb   Norfolk, VA

Re: AVRISP


Quoted text here. Click to load it

JTAG is _supposed_ to be JTAG. Compare the pinouts of the various
devices you have, and that should answer your question.

--
* * * * * * * * * * * * * * * * *
Dorsai - Author of Erotic Fiction
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline