Bootloader onto ATMega328P-PU Chip and Then Loading Sketch  

Page 3 / 3
  RSS

Pugwash
(@pugwash)
Prominent Member
Joined: 10 months ago
Posts: 969
2020-02-15 1:10 pm  

@stargatefan

I learn new things each time I talk to you guys.

That is the way it should be, I also learn from others on this forum!

SteveC - Topple Rudd Poltman


ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 10 months ago
Posts: 507
2020-02-19 3:24 pm  

@pugwash@stargatefan

The bootloaders for the two chips are definitely different and as soon as I get some of the 328P chips I'll try to do a write up on what are the steps to program the two different chips, and any pitfalls you might encounter.

I'm working on a proto-board with a 28 Pin ZIF socket that will allow programming from either a connection to another Arduino or with an external FTDI adapter.  If it works out good enough, I might just put it into KiCad and have a few boards made.

SteveG


ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 10 months ago
Posts: 507
2020-02-19 3:25 pm  
Posted by: @pugwash

That is the way it should be, I also learn from others on this forum!

And that is probably true for everyone on this forum, I know it is for me!

SteveG


ReplyQuote
Stargatefan
(@stargatefan)
Active Member
Joined: 2 months ago
Posts: 10
2020-02-20 1:31 am  

@codecage
@Pugwash
I'd be very interested if that protoboard works.

So the Word document attached shows how I loaded the bootloader and then programmed the sketch.  Note that I did confirm I could also program using the Uno board like Pugwash thought I could.  But I noticed if I programmed the bootloader with the Uno board I also had to load the sketch that way.  I couldn't switch between the Duemilanove bootloader and the Uno sketch.

I was also able to insert a 28 pin socket into my Uno into the socket I already have soldered into the Uno.  Then I put the ATMega328P-PU I want to program into the extra socket.  Hopefully this means I'll wear out less boards.

Getting the FTDI adapter working has taken something of a backseat for the moment.  I would still like to get it working.  But now I want to try to figure out how to get the Pirates  of the Carribean song to work with the Star Wars song (the one Bill introduced us to).  I've got the Star Wars song working with a pushbutton.  But the Pirates song doesn't execute inside of the loop.  I'm still trying to figure that one out.


ReplyQuote
Pugwash
(@pugwash)
Prominent Member
Joined: 10 months ago
Posts: 969
2020-02-20 11:27 am  

@stargatefan

This is the setup I used to get the bootloader on to the ATmega328P.

IMG 4257

 

I used the Mega as the master and Uno as the slave, and used Atmega_Board_Programmer from Nick Gammon's toolbox (files below) on the Arduino Mega.

As I was converting the ATmega328P to 8MHz, to run on 3.3V, the actual sketch uploading had to be done on a breadboard with NO oscillator attached. I used an FTDI USB to serial for the sketch uploading.

Unfortunately, I can't do any more experimenting with bootloaders until my new ATmega328P chips arrive from China, which due to the Corona Virus, is probably in the distant future!

SteveC - Topple Rudd Poltman


ReplyQuote
Duce robot
(@duce-robot)
Reputable Member
Joined: 9 months ago
Posts: 413
2020-03-01 12:20 am  

They have them on amazon with the bootloader already installed for arduino . $6.99


ReplyQuote
Page 3 / 3

Please Login or Register