Dead ATMega88?

Discussion in '8bit Microcontrollers' started by Mr G, Aug 31, 2008.

  1. Mr G

    Mr G Guest

    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?
    Mr G, Aug 31, 2008
    1. Advertisements

  2. Mr G

    Rich Webb Guest

    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.
    Rich Webb, Aug 31, 2008
    1. Advertisements

  3. Mr G

    Mr G Guest

    Here's the programmer Im using

    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$=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.
    Mr G, Aug 31, 2008
  4. Mr G

    Rich Webb Guest

    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
    Rich Webb, Aug 31, 2008
  5. Mr G

    Mr G Guest

    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 Might give it a go on the weekend.
    Mr G, Sep 19, 2008
  6. Mr G

    Mr G Guest

    I know how to fix now. I require a 4Mhz external Clock. Whats an easy way of generating this without a signal generator
    Mr G, Sep 20, 2008
  7. Mr G

    Mr G Guest

    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.
    Mr G, Sep 22, 2008
  8. Mr G

    Rich Webb Guest

    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.
    Rich Webb, Sep 26, 2008
  9. Mr G

    Mr G Guest

    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.
    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.
    Mr G, Oct 10, 2008
  10. Mr G

    Rich Webb Guest

    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.
    Rich Webb, Oct 10, 2008
  11. Mr G

    Mike Henry Guest

    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 Henry, Oct 10, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.