0

I have a ATMEGA328-PU (not a atmega328P-PU) and managed to install the boot loader on it using an Uno as ISP, but now i can not upload any sketch, this are the steps I've done so far:

connected this pins:

reset to pin10

11 to 11

12 to 12

13 to 13

and 5V to 5V and ground to ground.

uploaded ArduinoISP from examples and then changed the programmer to Arduino as ISP.

Then i changed this line in avrdude.conf:

part parent "m328"
    id          = "m328p";
    desc        = "ATmega328P";
    signature       = 0x1e 0x95 0x0F;

    ocdrev              = 1;
;

to:

part parent "m328"
    id          = "m328p";
    desc        = "ATmega328P";
    signature       = 0x1e 0x95 0x14;

    ocdrev              = 1;
;

selected burn bootloader and uploaded the boot loader with success.

and then i removed pin 10 to 13 and connected reset to reset, RX to RX and TX to TX and removed the chip from Arduino UNO.

added this lines to boards.txt:

##############################################################

uno328.name=Arduino328

uno328.vid.0=0x2341
uno328.pid.0=0x0043
uno328.vid.1=0x2341
uno328.pid.1=0x0001
uno328.vid.2=0x2A03
uno328.pid.2=0x0043
uno328.vid.3=0x2341
uno328.pid.3=0x0243

uno328.upload.tool=avrdude
uno328.upload.protocol=arduino
uno328.upload.maximum_size=32256
uno328.upload.maximum_data_size=2048
uno328.upload.speed=115200

uno328.bootloader.tool=avrdude
uno328.bootloader.low_fuses=0xFF
uno328.bootloader.high_fuses=0xDE
uno328.bootloader.extended_fuses=0xFD
uno328.bootloader.unlock_bits=0x3F
uno328.bootloader.lock_bits=0x0F
uno328.bootloader.file=optiboot/optiboot_atmega328.hex

uno328.build.mcu=atmega328
uno328.build.f_cpu=16000000L
uno328.build.board=AVR_UNO
uno328.build.core=arduino
uno328.build.variant=standard

Selected that from board menu changed the programmer to AVRISP mkll and tried to upload the blink sketch but it stuck on "uploading" and after a while says "an error occurred during upload".

I triple checked the wiring!

Juraj
  • 18,037
  • 4
  • 29
  • 49
ElectronSurf
  • 794
  • 4
  • 15
  • 41
  • 1
    Is your chip set up with a crystal/caps, or a resonator? The chip needs an external clock source since that's your fuses are set up for. "changed the programmer to AVRISP mkll" This will do nothing unless you have a Programmer connected to the ICSP pins. What is connected to what here: "connected reset to reset, RX to RX and TX to TX and removed the chip from Arduino UNO."? – CrossRoads Jul 01 '19 at 16:16
  • @CrossRoads yes it have a crystal and two capacitors, i wanna use the Arduino as programmer... WIRES connected those pines together. – ElectronSurf Jul 01 '19 at 16:56
  • 2
    newbie, use the https://github.com/MCUdude/MiniCore to burn the bootloader and serial upload. btw: you can put the 328 in the socket on Uno – Juraj Jul 01 '19 at 17:24
  • "managed to install the boot loader on it" How did you do that? Do you have another board you are using as a Programmer? Or do you have a Programmer? – CrossRoads Jul 01 '19 at 18:14
  • 2
    @CrossRoads, it started here https://arduino.stackexchange.com/questions/66694/atmega328p-u-vs-atmega328-pu this question make more sense if you put the informations together. but you should read this question again – Juraj Jul 01 '19 at 18:19
  • Not really. There is no indication of how the bootloader was installed. – CrossRoads Jul 01 '19 at 18:23
  • @Juraj thanks i'll try that and let you know what happened. – ElectronSurf Jul 01 '19 at 18:52
  • @Juraj i placed the 328 on arduino and installed that library from github then followed the instruction but i'm still getting this error: "An error occurred while uploading the sketch"! – ElectronSurf Jul 01 '19 at 19:18
  • @Juraj the led on pin 13 is blinking tho... i have no clue... – ElectronSurf Jul 01 '19 at 19:20
  • 1
    sorry, you should burn a 328 bootloader from that package first – Juraj Jul 01 '19 at 19:22
  • the instruction didn't say anything about that, how do i do that? @Juraj – ElectronSurf Jul 01 '19 at 19:25
  • 1
    same way like before, only with MiniCore. choose the right settings in Tools menu – Juraj Jul 01 '19 at 19:32
  • Comments are not for extended discussion; this conversation has been moved to chat. – VE7JRO Jul 01 '19 at 19:58

1 Answers1

2

Use the https://github.com/MCUdude/MiniCore for ATmega328. It has Boards Manager installation. Choose the right options in Tools menu for your ATmega328.

First burn the bootloader using programmer or "Arduino as ISP". Then you can do serial upload as usual.

You can put the ATmega328 on Uno if you want.

Juraj
  • 18,037
  • 4
  • 29
  • 49