Author Topic: ATMega328 Programmer  (Read 2023 times)

0 Members and 1 Guest are viewing this topic.

Offline JDemoTopic starter

  • Contributor
  • Posts: 13
  • Country: us
ATMega328 Programmer
« on: September 01, 2018, 08:37:29 am »
So lately I've been trying to teach myself engineering and I've come to love working with Arduinos. I've moved on to creating breadboarded arduinos as I tend to run out of Unos and theyre a bit more pricey. I also hate having to setup a breadboard every time I need to program one of those chips. To solve that and learn in the process I'm trying to make a programming tool that'll have a screen and what not and basically allow me to drop a 328P into a ZIF socket, press a button, and boom it's programmed with a saved sketch and / or the bootloader. I've created what I believe is a valid schematic for the programming bit, this doesn't include all of the bells and whistles like the screen just the 2 atmega chips (one, the main board one is a TQFP package). Was wondering if anyone could make sure this looks correct and recommend anything to make it better. Thanks a bunch :)

EDIT: Basically it'll be running (the main chip) off of the ArduinoISP sketch. U1 is the on-board 328 and U3 is the DIP 328 that'll be in the ZIF socket.
EDIT2: Yes, I know there are plenty of ready-made easier options but as I say above, the point isn't to make things quick and easy. This is all for a learning experience. I generally learn by doing and that's what I'm trying to do here.
« Last Edit: September 01, 2018, 10:52:11 am by JDemo »
 

Offline firewalker

  • Super Contributor
  • ***
  • Posts: 2450
  • Country: gr
Re: ATMega328 Programmer
« Reply #1 on: September 01, 2018, 08:51:21 am »
How do you plan to load the "to be programmed" firmware to the programmer?

Alexander
Become a realist, stay a dreamer.

 


Offline picandmix

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: gb
Re: ATMega328 Programmer
« Reply #3 on: September 01, 2018, 09:24:08 am »
Hi,

Quote
I tend to run out of Unos and theyre a bit more pricey.

It sounds like you are using genuine Arduino boards which are expensive, but surely buying the cheap clone boards would be a cheaper and more complete option than the cost of a 328 dip chip plus crystal etc.

A clone Nano board will plug straight in to a breadboard and has all the extra parts ready fitted so you just download the sketch as normal via USB.
 

Offline JDemoTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: ATMega328 Programmer
« Reply #4 on: September 01, 2018, 09:35:12 am »
How do you plan to load the "to be programmed" firmware to the programmer?

Alexander

Hey, I plan on adding in either a USB port and what nots or using an FTDI chip or something alike.

Hi,

Quote
I tend to run out of Unos and theyre a bit more pricey.

It sounds like you are using genuine Arduino boards which are expensive, but surely buying the cheap clone boards would be a cheaper and more complete option than the cost of a 328 dip chip plus crystal etc.

A clone Nano board will plug straight in to a breadboard and has all the extra parts ready fitted so you just download the sketch as normal via USB.
These are cheap as dirt and both have worked for me:

https://www.ebay.com/itm/USBASP-USBISP-AVR-Programmer-Module-For-Arduino-USBISP-USB-ASP-ATMEGA8-ATMEGA128/253775424002?hash=item3b1631aa02:g:~2QAAOSwejdbWC9R

https://www.ebay.com/itm/5V-Micro-USB-Tiny-AVR-ISP-ATtiny44-USBTinyISP-Programmer-For-Arduino-Bootloader/322924720403?hash=item4b2fd03113:g:fbwAAOSwzppaJ1DX





Yeah I'm aware of all of those things but the reason I'm choosing to do it this way (I guess the harder way) is more for a learning experience as well. I'm quite fine with spending the money to build. I enjoy the challenge as well.

Thanks for the replies :)
 

Offline JDemoTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: ATMega328 Programmer
« Reply #5 on: September 01, 2018, 09:37:50 am »
Hi,

Quote
I tend to run out of Unos and theyre a bit more pricey.

It sounds like you are using genuine Arduino boards which are expensive, but surely buying the cheap clone boards would be a cheaper and more complete option than the cost of a 328 dip chip plus crystal etc.

A clone Nano board will plug straight in to a breadboard and has all the extra parts ready fitted so you just download the sketch as normal via USB.

Also to add more to that, generally speaking the crystal isn't totally necessary for 328s (at least from what I've been reading) also I can use a resonator but in all honesty all of those options are relatively cheap. I'd likely go the clone nano board route for permanent projects but things like perfboard and breadboarding projects I generally just use a 328 or something smaller if need be. This is 50% a learning experience 50% a time saving thing when prototyping. If I didn't need the learning experience then yeah I'd just buy a bunch of clone boards. Thanks for the info though!
« Last Edit: September 01, 2018, 09:42:41 am by JDemo »
 

Offline picandmix

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: gb
Re: ATMega328 Programmer
« Reply #6 on: September 01, 2018, 10:29:37 am »
Hi,

As @Pirateguy mentioned the little USB programmers are easy enough.

However think this is what you are after doing  -  like most things arduino , its been done before, just a case of finding it.

https://www.instructables.com/id/Arduino-UNO-as-AtMega328P-Programmer/
 

Offline JDemoTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: ATMega328 Programmer
« Reply #7 on: September 01, 2018, 10:49:42 am »
Hi,

As @Pirateguy mentioned the little USB programmers are easy enough.

However think this is what you are after doing  -  like most things arduino , its been done before, just a case of finding it.

https://www.instructables.com/id/Arduino-UNO-as-AtMega328P-Programmer/

Right, I'm sure they are easier. That's not the point though. The reason I'm doing this is because it gives me a cool opportunity to learn more about things like this.

Essentially that link is what I'm trying to do. The few differences would be I want it to all be one PCB with no Arduino Uno and it will also have a few added features (the few of which are easy for me) I just wanted to make sure that my nets in the schematic look like they're going to the right places and make sure I didn't miss anything. I believe all is okay with it but it doesn't hurt to have a fresh and more experienced set of eyes take' a look.
 

Offline LukeB

  • Contributor
  • Posts: 46
  • Country: au
Re: ATMega328 Programmer
« Reply #8 on: September 01, 2018, 12:07:33 pm »
just thought id put my 2 cents in. I am also an electronics tinkerer and have used arduino a lot in the past but also realise that arduinos are a bit expensive. Have you thought of using an attiny85. It is a smaller simpler arduino and is very cheap. It will help to teach you how to program the arduino chips and a lot of other arduino stuff. You can learn to program it using your other arduinos.
 

Offline LukeB

  • Contributor
  • Posts: 46
  • Country: au
Re: ATMega328 Programmer
« Reply #9 on: September 01, 2018, 12:09:01 pm »
Oh sorry one more thing. What is to stop you just programming the chip using an arduino uno you already have. Just swap the chip for the one you want to program, and take it out once programmed.
 

Offline firewalker

  • Super Contributor
  • ***
  • Posts: 2450
  • Country: gr
Re: ATMega328 Programmer
« Reply #10 on: September 01, 2018, 12:28:16 pm »
OK. It will be great learning exprience!

First off all add to the schematic everything. You are going to use a USB<->Serial chip? Add it.

Select what protocol you want to use for programming the AVR. STK500 is simple enough.

Tuxgraphics has an open source, hardware STK500 compatible programmer. USB <-> FTDI <---UART---> ATmega8 <---ISP---> Target AVR.

Alexander.
Become a realist, stay a dreamer.

 

Offline JDemoTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: ATMega328 Programmer
« Reply #11 on: September 01, 2018, 12:39:43 pm »
OK. It will be great learning exprience!

First off all add to the schematic everything. You are going to use a USB<->Serial chip? Add it.

Select what protocol you want to use for programming the AVR. STK500 is simple enough.

Tuxgraphics has an open source, hardware STK500 compatible programmer. USB <-> FTDI <---UART---> ATmega8 <---ISP---> Target AVR.

Alexander.

Awesome, thanks for the advice. Yeah I've just started adding some of those parts, basically the above was just a baseline. I'll get to checking out the STK500 protocol.

Oh sorry one more thing. What is to stop you just programming the chip using an arduino uno you already have. Just swap the chip for the one you want to program, and take it out once programmed.

I was doing this for a while but eventually I bent a bunch of the DIP pins and had to sit there straightening them and that's what made me want to get an AVR programmer or something then I figured I'd use this as a good opportunity to learn a thing or two about actually designing PCBs and such. Thanks for that though!

just thought id put my 2 cents in. I am also an electronics tinkerer and have used arduino a lot in the past but also realise that arduinos are a bit expensive. Have you thought of using an attiny85. It is a smaller simpler arduino and is very cheap. It will help to teach you how to program the arduino chips and a lot of other arduino stuff. You can learn to program it using your other arduinos.

As for the ATTiny I have seen and heard a lot of good about it. This board will include a few buttons, some storage, and an LCD in the near future and as I'm not familiar with that chip I might be wrong here but I don't think it has enough IO for this. I do want to work on some other projects and hopefully use the 85. Seems like a damn good chip.
« Last Edit: September 01, 2018, 12:44:08 pm by JDemo »
 

Offline JDemoTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: ATMega328 Programmer
« Reply #12 on: September 01, 2018, 12:41:59 pm »
OK. It will be great learning exprience!

First off all add to the schematic everything. You are going to use a USB<->Serial chip? Add it.

Select what protocol you want to use for programming the AVR. STK500 is simple enough.

Tuxgraphics has an open source, hardware STK500 compatible programmer. USB <-> FTDI <---UART---> ATmega8 <---ISP---> Target AVR.

Alexander.

Oh and another thing the on-board TQFP 328 will only be programmed once (in theory) it'll just act as an ArduinoISP (and control a few other things) which will then program the inserted DIP. The only issue is programming the TFQP 328 initially which is where your suggestion really comes in handy since I want this to be a standalone thing rather than needing another board (such as an FTDI board) to do the initial programming. Thanks again!
 

Offline anishkgt

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Re: ATMega328 Programmer
« Reply #13 on: September 01, 2018, 01:47:11 pm »
I've been doing the same. A standalone Arduino bootloader/programmer. I've not tested mine but here is how it looks.
 

Offline JDemoTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: ATMega328 Programmer
« Reply #14 on: September 01, 2018, 02:54:29 pm »
I've been doing the same. A standalone Arduino bootloader/programmer. I've not tested mine but here is how it looks.

Very cool! So far it's been pretty fun. I have most of the schematic done, just have to add a few more things then it's on to PCB layout.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf