Programm atmega168P-PU with USBASP

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

Hello, I am a beginner.I am trying programm the atmega168P-PU with USBASP.I use avrdude as an external tool on atmelstudio 7 and i have this ERROR:avrdude.exe: AVR Part "m168p" not found.I dont use an external oscillator.Maybe i should?I check my connections and i think they are right

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

Welcome to AVRFreaks!

 

i would suggest you copy / paste the whole avrdude command line and the complete error message.

also note avrdude will output more descriptive messages using -v up to -v-v-v-v-v

 

jim

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

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

MY CODE(just blink a LED):

 

#ifndef F_CPU
#define F_CPU 1000000UL
#endif

#include <avr/io.h>
#include <util/delay.h>//it has delay function
int main(void)
{
    DDRB=0b00000001;
    while(1)
    {
        PORTB=0b00000001;
        _delay_ms(1000); //so that LED would remain in ON state for 1 sec and then  turns off  for  1 sec.
        PORTB=0b00000000;
        _delay_ms(1000);
    }
}

 

 

USBASP RELEASE:(PROGRAMM WITH THIS)

Command:C:\Users\Boss\Documents\Atmel Studio\7.0\win32_executable\avrdude.exe

Arguments:-c usbasp -p m168p -U flash:w:$(TargetDir)$(TargetName).hex:i

 

DEBUG USBASP:

Command:C:\Users\Boss\Documents\Atmel Studio\7.0\win32_executable\avrdude.exe

Arguments:-c usbasp -p m168 -U flash:w:$(ProjectDir)/Debug/$(ItemFileName).hex

 

Thank for your reply.

 

 

Attachment(s): 

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

You only have power connected on one side of the chip, connect AVcc/GND too and both power pin pairs need 100nf caps!  Why not just use an Arduino nano or pro micro on the bread board, they are even cheaper then bare chips, and have a bootloader so you don’t need external hardware to program.

check all of your wires, long flying leads like that are always trouble.

jim

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

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

https://www.adafruit.com/product...

https://www.amazon.com/Convert-S...

these two adapters will make bread board bare chips much easer to program

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

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

OK I WILL TRY,THANK YOU.