1. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    1,022
    4
    Ok I got it all rigged up correctly on the solderless breadboard.
    But when I do a verify signature I get

    Code ( (Unknown Language)):
    1.  
    2. Setting and device mode Ok
    3. Entering program mode OK
    4. Reading signature 0x01, 0x03 ,0x05 OK
    5. signature does not match selected device Failed
    6.  
    On the chips body it say's
    ATMEGA32
    16 PU
    08U7D

    What could be the problem.

    I selected to connect to the device with AVRISP mkII with usb.
    Because that is my programmer.

    But when verifying the signature it say's it doesn't match.
    When I try to write to the chip it fails at flashing.

    But now I don't get a red light or any thing staying on. It seems like everything should work maybe I selected the wrong project type ??? Don't think so.

    I don't know anyway could somebody help me aaaaaaaaaaahhhhhhh.


    Note I didn't connect the 10 Kohm resistor and when I connect the reset pin to batteries VCC I get a blinking orange /redish light.

    Not I am runing a wire from the programmers rest pin hole to the chips reset pin.

    Thanks
     
    Last edited: Mar 21, 2009
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    First off, do you get a green light on both the led internal to the AVR ISP MKII and the green led on the outside of the programmer with power applied to your Target?

    hgmjr
     
  3. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    It happens that right now I am using my AVR ISP MKII to program an ATTINY85 and all is working perfectly.

    hgmjr

    P.S. Together we should be able to get you operational.
     
  4. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    1,022
    4
    I am getting 2 solid green lights one by the connector strap the other by the usb connector.
     
  5. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Ok, those are both healthy indications that you can proceed to the next step.

    Can I assume you are using AVRSTUDIO4 as your programming software?

    hgmjr
     
  6. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    1,022
    4
    I have a 10 kohm resistor from VCC on chip to reset on chip.
    As well as the programmers reset pin hole connected to the reset of the chip rest pin.

    If I plug the reset pin of the chip directly to the reset pin of the VCC battery or chip with out a resistor I get a flashing orange/redish light.

    Think it is rigged up right because it is reading the signature but falling to write to the chip.

    Am I supposed to see more then 2 solid green lights?
    And am I suppose to set the frequency or other setting is in one of these programming under Main , Program , Fuse , ...etc tabs ???
    It say's I am in AVRISP mkII in ISP mode with ATMEGA32.
     
  7. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    1,022
    4
    Yes ...................................
     
  8. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    This is the correct connection scheme.
    You should avoid this hook scheme.
    There are only two status indicators. The one inside the programmer enclosure is green and indicates that he programmer has a good link to the PC. The other LED on the outside of the enclosure indicates that the programmer is happy with the connections to the target system.
    Are you using a crystal or are you using the internal RC oscillator of the atmega32?
    IF you are getting a successful signature read then that means that you are communicating between the PC and the target via the programmer.

    hgmjr
     
  9. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Are you using the internal RC oscillator or an external crystal? If you have crystal, what frequency is it?

    hgmjr
     
  10. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    1,022
    4
    On the chip I have

    For Atmega32 chip

    MOSI at pin 6 on chip
    MISO at pin 7 on chip
    SCK at pin 8 on chip
    reset bar is at pin 9 on chip
    VCC is at pin 10 on chip
    ground is at pins 11 and 31 on chip
    AVCC is at pin 30 on chip

    For mkII programmer

    The hole on the programmers connector nearest to the triangle (i.e right under it)
    is hole one which is MISO
    On the same row as MISO we have SCK then RESET
    Next row has VCC for programmer , followed by MOSI then ground for programmer.

    The MISO , SCK , MOSI for chip and programmer are connected directly to one another. The VCC , and ground of the programmer is connected to the solderless breadboards +/- strip respectfully.

    The chips VCC and AVCC are connected by a wire and then connected to the + strip.
    The chips ground and Aground is connected by a wire and then connected to the - strip.
    The chips reset is connected to the VCC of the chip by a 10 kohm resistor.
    The programmers reset pin hole is connected to the reset of the chip.

    I have 2 green lights like I said before.

    And I am using avrstudio4 like you said.
    The program compiles/links fine into a .hex file

    When trying to connect to the chip the only connection I can make is using
    Platform AVRISP MKII
    Port USB

    It connects fine with the same 2 solid green lights still on after connection.
    It then brings up the window with all the tabs Main , Program , Fuses ,...etc
    I don't know if I have to set something in one of the tabs ?

    Other then that I don't know any other info I can give you.
    I did mention that when I pressed the verify button it gives me
    Reading flash .. Ok
    Waringing Flash byte address 0x0000 is 0x00 (should be 0x0C) .. Failed
    Leaving programming mode ... OK

    When I hit the reading tab a blue progress bar shows up on the bottom of the screen.
    The green light by the connector strap on programmer turns to solid red. When reading is done the red light by connector turns back to the solid green.
    And in the textarea status it say's every thing is OK

    Note I tried this reading button on both the eeprom , flash. Both seem to say the same thing OK for everything.

    Seems that verify and program buttons are giving the only problems.

    I may have set something I wasn't suppose to do a while ago or something on one of these tabs.
    If their is any more info I can give you or a screen shot let me know?

    AT the bottom of the AVRStudio4 their is ATmega32 AVR Dragon Auto
    The ATmega32 is the one in bold the others are grayed out.


    In the messages tab at the bottom it say's
    Loaded plugin STK500
    Loaded plugin AVR GCC
    Loaded partfile: C:\Program Files\Atmel\AVR Tools\PartDescriptionFiles\ATmega32.xml
    AVRISP mkII: : Failed

    ALso if you didn't know I am using GCC WinAVr compile with AVRstudio4 to program with c instead of assemblier.

    Everything compiles fine.

    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
     
  11. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    1,022
    4
    On the advanced tab calibrate for frequency is 4.0 Mhz
    It has value 0x05 when I hit the read button.
    When the radio button is on eeprom.

    When it is on flash radio button it given value of 0x81

    On the Main tab I when I push verify it say's signature does not match selected device?

    For the device I have Atmega32 selected from the drop down list right above

    Signature 0x01 0x03 0x05.

    Programing mode and target settings only can be ISP mode.
    ISP frequency is 500kHZ May have messed with this don't remember.
    Say's something like it must be 1/4 of the target ...etc

    Maybe I screwed something up in the fuse or lock bit tab because their is
    A ? under the check of SPIEN.

    I just don't know.

    The hex file I wanted to program source is

    Code ( (Unknown Language)):
    1.  
    2.  
    3. #include <stdio.h>
    4.  
    5. #include <AVR\io.h>
    6.  
    7. void delay(void)
    8. {
    9.     unsigned int i;
    10.     unsigned char j;
    11.  
    12.     for (j=0; j<10; j++)
    13.     {
    14.          for ( i=0 ; i < 65000 ; i= i + 1 ) ;
    15.     }
    16. }
    17.  
    18. int main()
    19. {
    20.    DDRA=0x01;
    21.  
    22.    while (1)
    23.    {
    24.       PORTA = 0x01;
    25.       delay();      
    26.       PORTA = 0x00;
    27.       delay();
    28.    }
    29.  
    30. return 0 ;
    31. }
    32.  
    33.  
    34.  
    Maybe I need something in the code to tell the programmers something.
    I don't think so and the code compiles to .hex fine.
     
  12. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Sounds like all of your connections to the programmer are fine.

    Are you using the internal RC oscillator or are you using a crystal?

    hgmjr
     
  13. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    1,022
    4
    Are you using the internal RC oscillator or are you using a crystal?

    How can I tell what tab is this under ?
     
  14. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Does your target board have a crystal on it?

    hgmjr
     
  15. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    1,022
    4
    All I am using is a radioshacks solderless breadboard cat No. 276-001

    I am NOT using a specific test/programming board that you can by on atmel like something that comes in a kit.

    Just a plan old solderless bread board that has 2 horizontial stips on each side for powerer and ground and the vertical lines are common to each other...etc

    So the anwser is I am using the built in one for the chip or if their isn't one in the chip
    then I am not using one.

    Hope that helps
     
  16. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    This issue needs some attention.

    Do you have time to deal with this now or do you have something more pressing?

    hgmjr
     
  17. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    1,022
    4
    Well I have about 30 mins
     
  18. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    In this case, I think it is safe to assume that you are using no crystal.

    That's OK. You don't need to use a crystal since the AVR has an internal RC oscillator. Timing accuracy is the only thing that is affected by using the internal oscillator. For your circuit that is not a show-stopper.

    hgmjr
     
  19. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Rather than rush it. When do you plan to be back in the forum?

    hgmjr
     
  20. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    1,022
    4
    Ok, yes I see what your saying but what could be the next problem?
    I am wondering way I get the signature not the same

    warning on the main tab when I push verify.

    And the frequency ossilation , fuse , lock tabs could have a problem.
     
Loading...