Can't upload to Atmega328PU

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I can't upload a project to my new Atmega328pu, which is clocked at 8MHz. I can reach it with the AtmelStudio over a AVRISP mk2 programmer, however when I try to upload a simple "Blink" program, I get a message like this:

Unexpected signature 0x001e0114 (expected 0x001e9514).

Sometimes I get this:

Verifying Flash...Failed! address=0x0000 expected=0x0c actual=0x6e

 

Just to be sure, here is my code:

#include <avr/io.h>
#define F_CPU 8000000UL
#include "util/delay.h"

int main(void)
{
    DDRB = 0b11111110;
    while (1)
    {
        PORTB = 0b00000100;
        _delay_ms(1000);
        PORTB = 0b00001000;
        _delay_ms(1000);
    }
}

 

This topic has a solution.
Last Edited: Sat. Mar 16, 2019 - 03:51 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Does the 328PU has a bootloader on board?

 

Regards,

Bert

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't think so, it is brand new.

Actually, I tried to burn one with an arduino. Is there any way to find out?

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Try slowing down the ISP interface clock to something less than 250KHz (typically 125KHz). You get errors like that when it is trying to clock too fast.

 

Jim

 

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Thanks, that solved my problem!