Maker Pro
Maker Pro

Dead ATMega88?

M

Mr G

Jan 1, 1970
0
I've been programming my first atmel project via a simple parallel programmer.

I had changed the security bits as per the project I was following but now it seems my atmega88 is not really responsive to my programmer (pongprog). I get error -24 check if hardware is connected etc.

I've checked my programmer with a spare atmega8 which works fine.

I believe I might be able to salvage the atmega88 with a external xcal setup, just have to find a spare 4Mhz xcal I got hanging around. Would this assumption be correct?
 
R

Rich Webb

Jan 1, 1970
0
I've been programming my first atmel project via a simple parallel programmer.

I had changed the security bits as per the project I was following but now it seems my atmega88 is not really responsive to my programmer (pongprog). I get error -24 check if hardware is connected etc.

I've checked my programmer with a spare atmega8 which works fine.

I believe I might be able to salvage the atmega88 with a external xcal setup, just have to find a spare 4Mhz xcal I got hanging around. Would this assumption be correct?

Some clarification, please. PonyProg seems to be the device programming
software and it can be used with several hardware interfaces to the
target devices. Can you post a link to the schematic for the specific
parallel-based programmer that you're using?

By security bits, do you mean the lock bits or the fuse bits? The lock
bits (which is what I would presume would be the security bits) are
reset on chip erase. The fuse bits are not and have to be specifically
set/reset. What bits did you change, and to what configuration?

If you changed the fuse bits to select an external clock or crystal then
yes, you will need to drive the core with an appropriate source. It
shouldn't have to be 4 MHz (I assume the programmer you're using can
vary the programming speed) but you do need to run the programmer's
clock at less than 1/4 of the mega88's clock.
 
M

Mr G

Jan 1, 1970
0
Some clarification, please. PonyProg seems to be the device programming
software and it can be used with several hardware interfaces to the
target devices. Can you post a link to the schematic for the specific
parallel-based programmer that you're using?

By security bits, do you mean the lock bits or the fuse bits? The lock
bits (which is what I would presume would be the security bits) are
reset on chip erase. The fuse bits are not and have to be specifically
set/reset. What bits did you change, and to what configuration?

If you changed the fuse bits to select an external clock or crystal then
yes, you will need to drive the core with an appropriate source. It
shouldn't have to be 4 MHz (I assume the programmer you're using can
vary the programming speed) but you do need to run the programmer's
clock at less than 1/4 of the mega88's clock.



Here's the programmer Im using http://www.flightsim.com/howto/mind/avrisp.gif

Currently Im searching for a nice all-in-one programmer for my first pcb etch session.

The security/fuse bits I changed. Its probably best to look at the screenshot @ step 7 on the following url
http://www.flightsim.com/cgi/kds?$=main/howto/mind.htm

Thanks for the clarification on xcal requirements, I can use my 2Mhz spare crystal :p

I better read up on a few programming guides for Atmels before aimlessly flashing just to get a project running.
 
R

Rich Webb

Jan 1, 1970
0
Here's the programmer Im using http://www.flightsim.com/howto/mind/avrisp.gif

Currently Im searching for a nice all-in-one programmer for my first pcb etch session.

All-in-one programmers are rapidly disappearing, in favor of JTAG,
serial bootloaders, and device-specific serial loaders. Get one if you
really need it but they're going the way of the UV eraser.

For the AVRs, the Atmel-branded AVRISP2 is so inexpensive that it hardly
makes sense to "roll yer own" and introduce another variable into the
equation. Of course, you'd miss out on the challenge and fun of doing it
yourself, which is the whole point of do it yourself, of course.
The security/fuse bits I changed. Its probably best to look at the screenshot @ step 7 on the following url
http://www.flightsim.com/cgi/kds?$=main/howto/mind.htm

Thanks for the clarification on xcal requirements, I can use my 2Mhz spare crystal :p

From what's shown there, you've configured the device to expect a low
power, 8-16 MHz crystal oscillator as the clock source, so you'll
definitely need a crystal to get it going. The schematic shows a 12 MHz
crystal so that's probably what's expected (and should work with that
fuse configuration).

AFAIK, USB is kind of picky about timing so that's probably why the
design uses a crystal and not the internal oscillator.
I better read up on a few programming guides for Atmels before aimlessly flashing just to get a project running.

You can pick up a copy of the datasheet from Atmel's website. Always
good to refer to the datasheet when starting with any new processor and
especially when setting things like fuses which, if set improperly, can
cause Bad Things to happen.

The 2 MHz crystal won't be entirely happy with the current setup but it
will *probably* be enough to get the chip talking to the programmer
again.
 
M

Mr G

Jan 1, 1970
0
All-in-one programmers are rapidly disappearing, in favor of JTAG,
serial bootloaders, and device-specific serial loaders. Get one if you
really need it but they're going the way of the UV eraser.

For the AVRs, the Atmel-branded AVRISP2 is so inexpensive that it hardly
makes sense to "roll yer own" and introduce another variable into the
equation. Of course, you'd miss out on the challenge and fun of doing it
yourself, which is the whole point of do it yourself, of course.


From what's shown there, you've configured the device to expect a low
power, 8-16 MHz crystal oscillator as the clock source, so you'll
definitely need a crystal to get it going. The schematic shows a 12 MHz
crystal so that's probably what's expected (and should work with that
fuse configuration).

AFAIK, USB is kind of picky about timing so that's probably why the
design uses a crystal and not the internal oscillator.


You can pick up a copy of the datasheet from Atmel's website. Always
good to refer to the datasheet when starting with any new processor and
especially when setting things like fuses which, if set improperly, can
cause Bad Things to happen.

The 2 MHz crystal won't be entirely happy with the current setup but it
will *probably* be enough to get the chip talking to the programmer
again.


I've hooked up my atmega88 to a external crystal @ 4Mhz with 22 or 27pf caps (cant remember)

I still cant reprogram my atmega. error -24 still comes up :( I found a article on rescuing atmega controllers, but they require a 2nd microcontroller to provide an external clk signal. Heres the brief article http://www.scienceprog.com/life-giving-to-atmega8/ Might give it a go on the weekend.
 
M

Mr G

Jan 1, 1970
0
I've hooked up my atmega88 to a external crystal @ 4Mhz with 22 or 27pf caps (cant remember)

I still cant reprogram my atmega. error -24 still comes up :( I found a article on rescuing atmega controllers, but they require a 2nd microcontroller to provide an external clk signal. Heres the brief article http://www.scienceprog.com/life-giving-to-atmega8/ Might give it a go on the weekend.


I know how to fix now. I require a 4Mhz external Clock. Whats an easy way of generating this without a signal generator
 
M

Mr G

Jan 1, 1970
0
Take a feed from another microprocessor board? It can be any
frequency>4Mhz -< 10Mhz?


i can use another micro, problem is a I need a reference to start off from.. Been searching and I guess the closest example would be a PWM one. I guess I need a good book to start off from.
 
R

Rich Webb

Jan 1, 1970
0
I know how to fix now. I require a 4Mhz external Clock. Whats an easy way of generating this without a signal generator

You could put together a simple RC or RLC transistor oscillator. Do a
web search, there are hundreds of examples out there; hard to recommend
one without knowing what resources you have handy. The disadvantage is
that these won't be the most stable possible solution.

The simplest is to buy a canned oscillator, something like the
ECS-2100A-040. This takes +5 V and ground and outputs 4 MHz +/- 100 ppm.
Only costs about US$2 in single unit quantity.
 
M

Mr G

Jan 1, 1970
0
You could put together a simple RC or RLC transistor oscillator. Do a
web search, there are hundreds of examples out there; hard to recommend
one without knowing what resources you have handy. The disadvantage is
that these won't be the most stable possible solution.

The simplest is to buy a canned oscillator, something like the
ECS-2100A-040. This takes +5 V and ground and outputs 4 MHz +/- 100 ppm.
Only costs about US$2 in single unit quantity.

I haven't had much free time to get further with this. I dont have access to a canned oscillator, I've checked the electronic shops around here and can only get crystals, or 555 timers which can only scale up to 1Mhz I believe.
to
I do have a 1960's RF Signal Generator which can do 4MHZ but thats a Sine wave. Had thought of clipping it with a transistor. I also have a spare Atmega88, pic18f84 & another pic starting with 23<something> These are in working order.
Since Im new to atmel/pic programming its taking me awhile to learn.
 
R

Rich Webb

Jan 1, 1970
0
I haven't had much free time to get further with this. I dont have access to a canned oscillator, I've checked the electronic shops around here and can only get crystals, or 555 timers which can only scale up to 1Mhz I believe.
to
I do have a 1960's RF Signal Generator which can do 4MHZ but thats a Sine wave. Had thought of clipping it with a transistor.

No need to clip. The waveform from a crystal connected to a
microcontroller is pretty much sinusoidal. Don't go below ground or
above Vcc, though, so if your sig gen is AC coupled or symmetric around
0 V then you'll need to bias it up.

Alternately, if you can't get a crystal for 4 MHz but can get a multiple
(8 or 16) then you could set up a stand-alone oscillator and divide it
down. Google for "Pierce oscillator" for one relatively easy way.
 
M

Mike Henry

Jan 1, 1970
0
Why not just used a can oscillator? Abracon makes one that is 4 MHz. Uses
5-12 vdc input, very simple, not external components. p/n is
ACO-4.000MHZ-EK. You can get this for less than $2.

Mike
 
Top