开云体育

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Programming the Atmega238P


 

开云体育

Can one of you who do this all the time advise me what minimal hardware and software is needed to do simple programming of the Atmega chip.? I already have the script I want to put in it, my main interest is just to familiarize myself with the basics with a small project and to get a useable chip out of it.

Perhaps a reference to a good beginning (very beginning) tutorial.? Everything I've seen so far assumes way to much about what I already know.? They begin with acronyms and processes that are meaningless to me. Little wonder I haven't learned much yet.? There has to be someone who can teach someone like me who hasn't kept up with the pace of progress, but have a foundation in the rudiments.

73 Phil WA8YAN


Sent from my Verizon, Samsung Galaxy smartphone


 

开云体育

The best thing about the atmel microcontrollers is that there's so many ways to work with them! The worst thing about the atmel microcontrollers is that there's so many ways to work with them!!! :-) Where to start?

The easiest way ,I think, might be to get an Arduino uno or clone uno board with the socketed Atmega238P chip. You can program it and debug with the Arduino IDE and use it as is, or pop the chip out and use it bare in your other circuits. (some modes need a crystal, but stick to the internal resonator modes to start, just to make it easier)

If you get additional 328p's for the board you might want to start with chips with the Arduino bootloader already on them as they are a drop in replacement on an Uno with a socket. (Some sellers are better than others at reliably indicating if they preload the bootloader, depending on the source...)

But... Buy 2 Arduino uno boards, and one can be loaded with an in circuit serial programing (ICSP) program (an example script distributed with the Arduino IDE) and use it to program bare atmega chips, either with the bootloader (making them useable to load your scripts from within the ide), or your just loading your own scripts directly... (The bootloader code is bundled in with the ide)

There are dedicated ICSP programmers too, but a lot of them amongst hobby community are themselves just atmega based boards... Another uno board works just as well imo, and can do double duty as another Arduino dev board...

There's a series of YouTube videos from a channel called "wifi sheep" where he's making an atmega tiny basic computer, but in the series he modifies an Arduino Uno socketed board with a zif socket so he can swap chips easier as he programs them. Along the way he outlines a decent foundational method of getting started with these chips that you could build on from there... Ymmv , of course :-)

Good luck! They really are a lot of fun!

Wayde Nie VA3NCA
73


-------- Original message --------
From: "wa8yan.radio via groups.io" <wa8yan.radio@...>
Date: 2021-10-30 00:44 (GMT-05:00)
Subject: [QRPLabs] Programming the Atmega238P

Can one of you who do this all the time advise me what minimal hardware and software is needed to do simple programming of the Atmega chip.? I already have the script I want to put in it, my main interest is just to familiarize myself with the basics with a small project and to get a useable chip out of it.

Perhaps a reference to a good beginning (very beginning) tutorial.? Everything I've seen so far assumes way to much about what I already know.? They begin with acronyms and processes that are meaningless to me. Little wonder I haven't learned much yet.? There has to be someone who can teach someone like me who hasn't kept up with the pace of progress, but have a foundation in the rudiments.

73 Phil WA8YAN


Sent from my Verizon, Samsung Galaxy smartphone


 

Mornin' Phil:

First, the disclaimer: I've written a number of programming books, so I'm going to suggest my Beginning C for Microcontrollers for consideration. Go to Amazon, look up this title, and click on the Look Inside banner near the upper-right corner of the book. This would allow you to read the Foreword, and look at the Table of Contents. Then read the reviews. I would also read the reviews of several other intro books to see if one better-suits your preferences.

Since the above sounds like an ad more than being helpful, I've attached Chapter 1 from that book. It tells you how to download and install the (free) Arduino Integrated Development Environment (IDE), test the install, and write your first program. Obviously, I'm biased, but I think programming brings a new element of enjoyment to this wonderful hobby of ours.

Give programming a try. I think you'll find it a fascinating tool to add to your hobby tool belt.

Jack, W8TEE

On Saturday, October 30, 2021, 12:43:56 AM EDT, wa8yan.radio via groups.io <wa8yan.radio@...> wrote:


Can one of you who do this all the time advise me what minimal hardware and software is needed to do simple programming of the Atmega chip.? I already have the script I want to put in it, my main interest is just to familiarize myself with the basics with a small project and to get a useable chip out of it.

Perhaps a reference to a good beginning (very beginning) tutorial.? Everything I've seen so far assumes way to much about what I already know.? They begin with acronyms and processes that are meaningless to me. Little wonder I haven't learned much yet.? There has to be someone who can teach someone like me who hasn't kept up with the pace of progress, but have a foundation in the rudiments.

73 Phil WA8YAN


Sent from my Verizon, Samsung Galaxy smartphone


 

I agree with Wayde that the Arduino 328P is a good place to start, but I would suggest the Nano over the Uno. The Uno does allow a lot of modules to be plugged into it, but the Nano has a much smaller footprint. Indeed, if you read current articles on using an Arduino, most use the Nano. Also, the Nano costs less. You can buy 3 Nano's for about $15 on Amazon. Do NOT buy the Nano Pro Mini. It's cheaper than an ordinary Nano, but it does not have the USB connector on it, which makes it less convenient to program.

Jack, W8TEE

On Saturday, October 30, 2021, 01:30:24 AM EDT, Wayde Nie via groups.io <wayde@...> wrote:


The best thing about the atmel microcontrollers is that there's so many ways to work with them! The worst thing about the atmel microcontrollers is that there's so many ways to work with them!!! :-) Where to start?

The easiest way ,I think, might be to get an Arduino uno or clone uno board with the socketed Atmega238P chip. You can program it and debug with the Arduino IDE and use it as is, or pop the chip out and use it bare in your other circuits. (some modes need a crystal, but stick to the internal resonator modes to start, just to make it easier)

If you get additional 328p's for the board you might want to start with chips with the Arduino bootloader already on them as they are a drop in replacement on an Uno with a socket. (Some sellers are better than others at reliably indicating if they preload the bootloader, depending on the source...)

But... Buy 2 Arduino uno boards, and one can be loaded with an in circuit serial programing (ICSP) program (an example script distributed with the Arduino IDE) and use it to program bare atmega chips, either with the bootloader (making them useable to load your scripts from within the ide), or your just loading your own scripts directly... (The bootloader code is bundled in with the ide)

There are dedicated ICSP programmers too, but a lot of them amongst hobby community are themselves just atmega based boards... Another uno board works just as well imo, and can do double duty as another Arduino dev board...

There's a series of YouTube videos from a channel called "wifi sheep" where he's making an atmega tiny basic computer, but in the series he modifies an Arduino Uno socketed board with a zif socket so he can swap chips easier as he programs them. Along the way he outlines a decent foundational method of getting started with these chips that you could build on from there... Ymmv , of course :-)

Good luck! They really are a lot of fun!

Wayde Nie VA3NCA
73


-------- Original message --------
From: "wa8yan.radio via groups.io" <wa8yan.radio@...>
Date: 2021-10-30 00:44 (GMT-05:00)
Subject: [QRPLabs] Programming the Atmega238P

Can one of you who do this all the time advise me what minimal hardware and software is needed to do simple programming of the Atmega chip.? I already have the script I want to put in it, my main interest is just to familiarize myself with the basics with a small project and to get a useable chip out of it.

Perhaps a reference to a good beginning (very beginning) tutorial.? Everything I've seen so far assumes way to much about what I already know.? They begin with acronyms and processes that are meaningless to me. Little wonder I haven't learned much yet.? There has to be someone who can teach someone like me who hasn't kept up with the pace of progress, but have a foundation in the rudiments.

73 Phil WA8YAN


Sent from my Verizon, Samsung Galaxy smartphone


Jeff | VA2SS
 

Hi everyone,

As a former programmer, I do agree that adding programming skill into the hobby, especially since so many micro controller are available at cheap price, it is indeed a nice add-on into the hobby. I understand it is not for everyone, but a small project using Arduino is not very hard at all and can be really fun.... to share with other too!

I began years ago with the Arduino Uno R3. Yes, it might be limited for some project, but it is very versatile and cheap. IMHO, it is also very easy to extract from the UNO, minimal hardware needed to run the 328P stand alone in your own project and design.... I had fun to create my own PCB and add the vital parts of the UNO then integrated it inside my own designed PCB.... I also began by finding a project... a goal. An excellent book from the ARRL library that contains amateur radio projects from Glen Popiel KW5GP, a friend of mine, is a great place to start.

Starts with smaller project, finish with strong knowledge! :-)

Have fun and 73.

--
Jeff | VA2SS


 

开云体育

I like the nano a lot too. Its lower cost and smaller size makes it very project embeddable (you could sprinkle them into everything ;-) ).

If the project itself doesn't need USB, I actually like the promini, myself... I have a few USB to serial cables for programing time, but now we're layering on extras again ;-)

I may have read too much into the original question, but it sounded like their end goal was a standalone programmed 328p chip. For that use case, and for starters into the world of Arduino, I still like the socketed uno with the 328p in the dip package.?

It's basically the original/basic Arduino experience with lots of Internet support (that can be good or bad!). The uno can wired up directly on its socket pin headers, or breadboard(or both!), and is compatible with a bunch of different 'hats' ( expansion modules/boards ) if you wanted to explore that part of the Arduino landscape.

Once comfortable with the basics, there's no shortage of directions you can go from there...

I actually really like the esp8266's and esp32's. Not Arduino or atmel, but really shares a lot of overlap... You can even use and program within the same Arduino environment and scripts in most cases, if you want/need. For this you get wifi and Bluetooth. But I'm getting ahead of myself again!

My next direction I want to get into are all the LoRa WAN boards! Looks like a lot of fun!

No matter what direction you go, there's no shortage of options, most importantly - enjoy!

Wayde Nie VA3NCA
73


-------- Original message --------
From: "jjpurdum via groups.io" <jjpurdum@...>
Date: 2021-10-30 09:08 (GMT-05:00)
Subject: Re: [QRPLabs] Programming the Atmega238P

I agree with Wayde that the Arduino 328P is a good place to start, but I would suggest the Nano over the Uno. The Uno does allow a lot of modules to be plugged into it, but the Nano has a much smaller footprint. Indeed, if you read current articles on using an Arduino, most use the Nano. Also, the Nano costs less. You can buy 3 Nano's for about $15 on Amazon. Do NOT buy the Nano Pro Mini. It's cheaper than an ordinary Nano, but it does not have the USB connector on it, which makes it less convenient to program.

Jack, W8TEE

On Saturday, October 30, 2021, 01:30:24 AM EDT, Wayde Nie via groups.io <wayde@...> wrote:


The best thing about the atmel microcontrollers is that there's so many ways to work with them! The worst thing about the atmel microcontrollers is that there's so many ways to work with them!!! :-) Where to start?

The easiest way ,I think, might be to get an Arduino uno or clone uno board with the socketed Atmega238P chip. You can program it and debug with the Arduino IDE and use it as is, or pop the chip out and use it bare in your other circuits. (some modes need a crystal, but stick to the internal resonator modes to start, just to make it easier)

If you get additional 328p's for the board you might want to start with chips with the Arduino bootloader already on them as they are a drop in replacement on an Uno with a socket. (Some sellers are better than others at reliably indicating if they preload the bootloader, depending on the source...)

But... Buy 2 Arduino uno boards, and one can be loaded with an in circuit serial programing (ICSP) program (an example script distributed with the Arduino IDE) and use it to program bare atmega chips, either with the bootloader (making them useable to load your scripts from within the ide), or your just loading your own scripts directly... (The bootloader code is bundled in with the ide)

There are dedicated ICSP programmers too, but a lot of them amongst hobby community are themselves just atmega based boards... Another uno board works just as well imo, and can do double duty as another Arduino dev board...

There's a series of YouTube videos from a channel called "wifi sheep" where he's making an atmega tiny basic computer, but in the series he modifies an Arduino Uno socketed board with a zif socket so he can swap chips easier as he programs them. Along the way he outlines a decent foundational method of getting started with these chips that you could build on from there... Ymmv , of course :-)

Good luck! They really are a lot of fun!

Wayde Nie VA3NCA
73


-------- Original message --------
From: "wa8yan.radio via groups.io" <wa8yan.radio@...>
Date: 2021-10-30 00:44 (GMT-05:00)
Subject: [QRPLabs] Programming the Atmega238P

Can one of you who do this all the time advise me what minimal hardware and software is needed to do simple programming of the Atmega chip.? I already have the script I want to put in it, my main interest is just to familiarize myself with the basics with a small project and to get a useable chip out of it.

Perhaps a reference to a good beginning (very beginning) tutorial.? Everything I've seen so far assumes way to much about what I already know.? They begin with acronyms and processes that are meaningless to me. Little wonder I haven't learned much yet.? There has to be someone who can teach someone like me who hasn't kept up with the pace of progress, but have a foundation in the rudiments.

73 Phil WA8YAN


Sent from my Verizon, Samsung Galaxy smartphone


 

I didn't understand that the OP wanted to just program the chip. I agree that the Uno would be a good choice for that, and there's lots of info on the web for doing it.

The ESP32 family make me a bit nervous, mainly because of the huge variations in the boards being sold. Some have 32 pins, other 38, and a few others in between. Some of the ESP32 pins really shouldn't be used in most cases (i.e., those dedicated to external memory), while others do some weird things, especially on boot. On the plus side, it is very easy to add WiFi capability and that is often worth the hassles, plus is has a pretty deep memory pool and a reasonably fast clock. Still, for the rank beginner, I think the Uno/Nano makes more sense.

Jack, W8TEE

On Saturday, October 30, 2021, 11:48:10 AM EDT, Wayde Nie via groups.io <wayde@...> wrote:


I like the nano a lot too. Its lower cost and smaller size makes it very project embeddable (you could sprinkle them into everything ;-) ).

If the project itself doesn't need USB, I actually like the promini, myself... I have a few USB to serial cables for programing time, but now we're layering on extras again ;-)

I may have read too much into the original question, but it sounded like their end goal was a standalone programmed 328p chip. For that use case, and for starters into the world of Arduino, I still like the socketed uno with the 328p in the dip package.?

It's basically the original/basic Arduino experience with lots of Internet support (that can be good or bad!). The uno can wired up directly on its socket pin headers, or breadboard(or both!), and is compatible with a bunch of different 'hats' ( expansion modules/boards ) if you wanted to explore that part of the Arduino landscape.

Once comfortable with the basics, there's no shortage of directions you can go from there...

I actually really like the esp8266's and esp32's. Not Arduino or atmel, but really shares a lot of overlap... You can even use and program within the same Arduino environment and scripts in most cases, if you want/need. For this you get wifi and Bluetooth. But I'm getting ahead of myself again!

My next direction I want to get into are all the LoRa WAN boards! Looks like a lot of fun!

No matter what direction you go, there's no shortage of options, most importantly - enjoy!

Wayde Nie VA3NCA
73


-------- Original message --------
From: "jjpurdum via groups.io" <jjpurdum@...>
Date: 2021-10-30 09:08 (GMT-05:00)
Subject: Re: [QRPLabs] Programming the Atmega238P

I agree with Wayde that the Arduino 328P is a good place to start, but I would suggest the Nano over the Uno. The Uno does allow a lot of modules to be plugged into it, but the Nano has a much smaller footprint. Indeed, if you read current articles on using an Arduino, most use the Nano. Also, the Nano costs less. You can buy 3 Nano's for about $15 on Amazon. Do NOT buy the Nano Pro Mini. It's cheaper than an ordinary Nano, but it does not have the USB connector on it, which makes it less convenient to program.

Jack, W8TEE

On Saturday, October 30, 2021, 01:30:24 AM EDT, Wayde Nie via groups.io <wayde@...> wrote:


The best thing about the atmel microcontrollers is that there's so many ways to work with them! The worst thing about the atmel microcontrollers is that there's so many ways to work with them!!! :-) Where to start?

The easiest way ,I think, might be to get an Arduino uno or clone uno board with the socketed Atmega238P chip. You can program it and debug with the Arduino IDE and use it as is, or pop the chip out and use it bare in your other circuits. (some modes need a crystal, but stick to the internal resonator modes to start, just to make it easier)

If you get additional 328p's for the board you might want to start with chips with the Arduino bootloader already on them as they are a drop in replacement on an Uno with a socket. (Some sellers are better than others at reliably indicating if they preload the bootloader, depending on the source...)

But... Buy 2 Arduino uno boards, and one can be loaded with an in circuit serial programing (ICSP) program (an example script distributed with the Arduino IDE) and use it to program bare atmega chips, either with the bootloader (making them useable to load your scripts from within the ide), or your just loading your own scripts directly... (The bootloader code is bundled in with the ide)

There are dedicated ICSP programmers too, but a lot of them amongst hobby community are themselves just atmega based boards... Another uno board works just as well imo, and can do double duty as another Arduino dev board...

There's a series of YouTube videos from a channel called "wifi sheep" where he's making an atmega tiny basic computer, but in the series he modifies an Arduino Uno socketed board with a zif socket so he can swap chips easier as he programs them. Along the way he outlines a decent foundational method of getting started with these chips that you could build on from there... Ymmv , of course :-)

Good luck! They really are a lot of fun!

Wayde Nie VA3NCA
73


-------- Original message --------
From: "wa8yan.radio via groups.io" <wa8yan.radio@...>
Date: 2021-10-30 00:44 (GMT-05:00)
Subject: [QRPLabs] Programming the Atmega238P

Can one of you who do this all the time advise me what minimal hardware and software is needed to do simple programming of the Atmega chip.? I already have the script I want to put in it, my main interest is just to familiarize myself with the basics with a small project and to get a useable chip out of it.

Perhaps a reference to a good beginning (very beginning) tutorial.? Everything I've seen so far assumes way to much about what I already know.? They begin with acronyms and processes that are meaningless to me. Little wonder I haven't learned much yet.? There has to be someone who can teach someone like me who hasn't kept up with the pace of progress, but have a foundation in the rudiments.

73 Phil WA8YAN


Sent from my Verizon, Samsung Galaxy smartphone


 

Phil,
I sympathize.
This is confusing territory.
Sorry there is not a simple answer.
Your best route depends on your goals:
I understand you already have a script and you want to get it on the Atmega 328P chip.

What type of script is it?

If your script is a .hex file, see Hans' suggestions here:

This is a good place to start if you want to upgrade the QCX firmware, but the same procedure can be used for any .hex file.
I have also seen .elf file extensions and I am guessing Hans' suggestions will work for .elf file types as well as .hex.

If your script is a .ino type, that's an Arduino script. Use the Arduino IDE as Jack W8TEE said. There are LOTS of resources for this.? Use a simple USB cable, Arduino Uno, and? the Arduino IDE.

Good luck,
John
AC2SG


 

开云体育

Just to clarify, for my immediate project, yes I do simply wish to get an Atmega chip programmed to make the script I have work.? I assume the Script has to be compiled then the results uploaded to the Atmega32P. At that point I'm hoping I can put the chip in the project and be ready to run.??

Beyond that however, I am hoping to begin building my knowledge of these chips and their programming for other applications.? In the 1970's I was teaching Basic at the local junior college and in the 80's was also teaching dBase III and relational data base programming so learning C is doable.? I just gotta get the hardware down and the support software.

At the present time I have several responses from folks here that i am digesting and trying to figure out where to go next.? I can't do this in one quick read though, so please have patience with me as i study what each of you have been so kind to share with me.? I appreciate all of you taking the time to help me.? As I get a grasp on the content of your responses I will be back most likely with more beginner questions.? For now.... reading and researching and cross referencing, etc. etc. Until I get it.

73 Phil WA8YAN




Sent from my Verizon, Samsung Galaxy smartphone


-------- Original message --------
From: "jjpurdum via groups.io" <jjpurdum@...>
Date: 10/30/21 11:59 AM (GMT-05:00)
Subject: Re: [QRPLabs] Programming the Atmega238P

I didn't understand that the OP wanted to just program the chip. I agree that the Uno would be a good choice for that, and there's lots of info on the web for doing it.

The ESP32 family make me a bit nervous, mainly because of the huge variations in the boards being sold. Some have 32 pins, other 38, and a few others in between. Some of the ESP32 pins really shouldn't be used in most cases (i.e., those dedicated to external memory), while others do some weird things, especially on boot. On the plus side, it is very easy to add WiFi capability and that is often worth the hassles, plus is has a pretty deep memory pool and a reasonably fast clock. Still, for the rank beginner, I think the Uno/Nano makes more sense.

Jack, W8TEE

On Saturday, October 30, 2021, 11:48:10 AM EDT, Wayde Nie via groups.io <wayde@...> wrote:


I like the nano a lot too. Its lower cost and smaller size makes it very project embeddable (you could sprinkle them into everything ;-) ).

If the project itself doesn't need USB, I actually like the promini, myself... I have a few USB to serial cables for programing time, but now we're layering on extras again ;-)

I may have read too much into the original question, but it sounded like their end goal was a standalone programmed 328p chip. For that use case, and for starters into the world of Arduino, I still like the socketed uno with the 328p in the dip package.?

It's basically the original/basic Arduino experience with lots of Internet support (that can be good or bad!). The uno can wired up directly on its socket pin headers, or breadboard(or both!), and is compatible with a bunch of different 'hats' ( expansion modules/boards ) if you wanted to explore that part of the Arduino landscape.

Once comfortable with the basics, there's no shortage of directions you can go from there...

I actually really like the esp8266's and esp32's. Not Arduino or atmel, but really shares a lot of overlap... You can even use and program within the same Arduino environment and scripts in most cases, if you want/need. For this you get wifi and Bluetooth. But I'm getting ahead of myself again!

My next direction I want to get into are all the LoRa WAN boards! Looks like a lot of fun!

No matter what direction you go, there's no shortage of options, most importantly - enjoy!

Wayde Nie VA3NCA
73


-------- Original message --------
From: "jjpurdum via groups.io" <jjpurdum@...>
Date: 2021-10-30 09:08 (GMT-05:00)
Subject: Re: [QRPLabs] Programming the Atmega238P

I agree with Wayde that the Arduino 328P is a good place to start, but I would suggest the Nano over the Uno. The Uno does allow a lot of modules to be plugged into it, but the Nano has a much smaller footprint. Indeed, if you read current articles on using an Arduino, most use the Nano. Also, the Nano costs less. You can buy 3 Nano's for about $15 on Amazon. Do NOT buy the Nano Pro Mini. It's cheaper than an ordinary Nano, but it does not have the USB connector on it, which makes it less convenient to program.

Jack, W8TEE

On Saturday, October 30, 2021, 01:30:24 AM EDT, Wayde Nie via groups.io <wayde@...> wrote:


The best thing about the atmel microcontrollers is that there's so many ways to work with them! The worst thing about the atmel microcontrollers is that there's so many ways to work with them!!! :-) Where to start?

The easiest way ,I think, might be to get an Arduino uno or clone uno board with the socketed Atmega238P chip. You can program it and debug with the Arduino IDE and use it as is, or pop the chip out and use it bare in your other circuits. (some modes need a crystal, but stick to the internal resonator modes to start, just to make it easier)

If you get additional 328p's for the board you might want to start with chips with the Arduino bootloader already on them as they are a drop in replacement on an Uno with a socket. (Some sellers are better than others at reliably indicating if they preload the bootloader, depending on the source...)

But... Buy 2 Arduino uno boards, and one can be loaded with an in circuit serial programing (ICSP) program (an example script distributed with the Arduino IDE) and use it to program bare atmega chips, either with the bootloader (making them useable to load your scripts from within the ide), or your just loading your own scripts directly... (The bootloader code is bundled in with the ide)

There are dedicated ICSP programmers too, but a lot of them amongst hobby community are themselves just atmega based boards... Another uno board works just as well imo, and can do double duty as another Arduino dev board...

There's a series of YouTube videos from a channel called "wifi sheep" where he's making an atmega tiny basic computer, but in the series he modifies an Arduino Uno socketed board with a zif socket so he can swap chips easier as he programs them. Along the way he outlines a decent foundational method of getting started with these chips that you could build on from there... Ymmv , of course :-)

Good luck! They really are a lot of fun!

Wayde Nie VA3NCA
73


-------- Original message --------
From: "wa8yan.radio via groups.io" <wa8yan.radio@...>
Date: 2021-10-30 00:44 (GMT-05:00)
Subject: [QRPLabs] Programming the Atmega238P

Can one of you who do this all the time advise me what minimal hardware and software is needed to do simple programming of the Atmega chip.? I already have the script I want to put in it, my main interest is just to familiarize myself with the basics with a small project and to get a useable chip out of it.

Perhaps a reference to a good beginning (very beginning) tutorial.? Everything I've seen so far assumes way to much about what I already know.? They begin with acronyms and processes that are meaningless to me. Little wonder I haven't learned much yet.? There has to be someone who can teach someone like me who hasn't kept up with the pace of progress, but have a foundation in the rudiments.

73 Phil WA8YAN


Sent from my Verizon, Samsung Galaxy smartphone


 

开云体育

Hi John, and all others answering my plea !

The script I have is for a morse keyer.? I am building the keyer that KL0K Thomas up in Alaska has provided the PCB for.? He is willing to program a 32P for me, but I thought I had a local ham who was knowledgeable and equipped to do it with me.... but then found out he didn't have his own hardware for the job, sooooo..... I decided to call it a learning experience and perhaps a great fall/winter project.? Thus I show up here seeking guidance to get started, first to get my chip programmed with the minimum necessary hardware and software and then to give me a push down the road to creating my own projects.? Maybe even pick up one of the books full of ham projects to try.

I'm pretty sure you can teach this old dog a few new tricks.? However, that is still to be proven.... HI HI.

73 Phil WA8YAN



Sent from my Verizon, Samsung Galaxy smartphone


-------- Original message --------
From: "john.rogers via groups.io" <john.rogers@...>
Date: 10/30/21 4:20 PM (GMT-05:00)
Subject: Re: [QRPLabs] Programming the Atmega238P

Phil,
I sympathize.
This is confusing territory.
Sorry there is not a simple answer.
Your best route depends on your goals:
I understand you already have a script and you want to get it on the Atmega 328P chip.

What type of script is it?

If your script is a .hex file, see Hans' suggestions here:

This is a good place to start if you want to upgrade the QCX firmware, but the same procedure can be used for any .hex file.
I have also seen .elf file extensions and I am guessing Hans' suggestions will work for .elf file types as well as .hex.

If your script is a .ino type, that's an Arduino script. Use the Arduino IDE as Jack W8TEE said. There are LOTS of resources for this.? Use a simple USB cable, Arduino Uno, and? the Arduino IDE.

Good luck,
John
AC2SG


 

开云体育

Phil,

As has been suggested there are a ton of youtube videos and other web pages telling you how to program an AVR (the ATMega328P computer chip sold by Atmel/MicroChip used on Arduino boards) . This is just one of those pages (if you have an Instructables.com? account):



The easiest way is to buy a Arduino Uno (or 2 or 3) and a proto board.? Also load the Arduino IDE (the Windows or Linux program you load on your computer to program AVR chips and boards).? Hook up your Uno (with the programmer you just built on that proto board) and then go to "Files" in the IDE menu and select "Examples" and load the AVR ISP example and upload it to your Uno.? Once you do that then you just made that Uno into a AVR programmer so it will pass your code on through to the chip you have in the proto programmer.? Now you will have had to set the IDE up to know the board is the Arduino Uno and know which comm port (usb picks many virtual comm ports so it is not always the same number) before you could do this.?? Now under "Tools" on the IDE menu (where you checked and set up the Board and the Port) under the "Programmer:" section pick Arduino as ISP.? The when you compile and upload your INO source code (your code you want to upload is a INO isn't it?).? Then under "Sketch" menu heading either pick "Upload using Programmer" or Ctl Shift U or hold shift key down and click on the arrow pointing right located just below the menu bar and that sends your compiled code to the Uno which then passes it on to the target chip in the programmer on the proto board.? I would suggest using a 28 pin narrow dip (0.3" spacing between rows that matches the ATMega328P) on the proto board.

Personally I like the AVR ISP boards like this one:



?I bought several on ebay and when I got them they were about $2 each but think they are up to about $6 (delivered) now.? Anyway that just plugs onto the top of the Uno and eliminates the need to make a proto board programmer (like the Instructables page did).? With that all said,? it also means that you have to have a ATMega328P or other DIP (dual inline package) AVR IC that you are programming.? Either that or you have bought one of the adapter sockets that are say QFN32 (the smt version of the ATMega328P but in smt format) to Dip sockets (not cheap) sold for the TL866 and similar programmers.? Programmers like the TL866 use a Hex file (not an INO) so your INO file has to be "exported" and grab the hex file it made. That hex file from the IDE always makes 2 versions in the IDE.? One is the bare INO and the second is the INO PLUS THE BOOTLOADER both in Intel Hex format.

Speaking of Bootloader,? there are some things to keep in mind. First,? if you buy a bare ATmega328P say from Digikey or Mouser and not the "Arduino chip" or you buy one on Ebay/Amazon then you will have to do one of two things.? The one thing is to upload the Bootloader to the chip.? If that has never been done then it means the fuses were never set.? The important one to me is the one that tells the chip to look for either the onboard 8mhz clock or an external (crystal) clock. Ask me how I know!? You can also burn the bootloader to the chip just using the Arduino IDE by going to the menu and again under "Tools" and at the bottom select "Burn Bootloader." The bootloader only needs to be loaded once (because it sets the fuses) at the start.? If you load your hex file or compiled INO file and then decide to load the bootloader then it will overwrite and erase your sketch so you will have to load that again.

That second thing I mention is that you can use the bare AVRDude (the program that the IDE actually uses to do all the work) or in my case AVRDUDESS (the AVRDUDE gui)to set those fuses you want.? In MOST CASES you do not have to load the bootloader first (or at all) if you have set the fuses.? Be sure not to set the lock fuse though as you may not be able to ever program that chip again. AVRDude is the backend that the Arduino IDE uses to program your chip or your Arduino (Uno, Mega, Nano, etc).? You can just call the AVRDude to do things as you do not have to load the IDE. There are many things that the IDE will not do but can be done with AVRDude (or AVRDUDESS) and one is to read an existing chip (assuming the lock bit was not set).? You can do it with AVRDude but can not use the IDE to do it.? There are many other things that the IDE will not do that AVRDude can do (with the right command line command).

Before I figured out that my particular application did not require the bootloader if I set the fuses (at least the one oscillator fuse) I bought a product from Canaduino which is a stand alone bootloader loader like this one:


It cost about $16 delivered from Canada but I think it is just a refined version of the STandalone programmer that ADafruit sells.? Anyway it needs usb (for power only) and put your ATMega328P (dip) in the ZIF socket and hit program and 6 seconds later the fuses are set and bootloader is loaded. Because the Canaduino board now uses the smt version of the ATMega328P it is no longer a kit but a finished board (no enclosure but none really needed).

Be aware that some sketches will overwrite the bootloader if the bootloader was loaded.? On Arduino.cc forum it says IT WILL Overwrite but that is an exaggeration as it does not necessarily do that but if the sketch is too big it will. Even if that bootloader does get overwritten you do not have to reload the bootloader (normally) again.

Someone mentioned buying Uno clones.? They are not clones. Arduino is open source so anyone can make and sell them. What they can not do is use the Arduino logo on the boards.? Also be very aware that most (if not all) current version Uno's sold now use the 32 pin smt version of the ATMega328 so you can not easily remove and replace the chip with a dip version but with the programmers above you do not need to. The fact that they are now mostly smt version makes it hard to try your sketch and troubleshoot it since you can't just plug your newly programmed chip into the Arduino UNO in place of the stock chip to find out if it worked.

I have never figured out why Atmel/MicroChip made the smt version of the ATMega328P which is a 28 pin dip but the smt version has 32 pins.? Go figure!? But then I found out the hard way that their ATMega16U and ATMega32U are not even in the same family of chips with the ATMega16U2 (and 4) and ATMega32U2 (and 4)!? My TL866 will program ATmeaga16U and 32U ships but not the 16U2 or 4 or the 32U2 or 4!? It will burn them up (ask me how I know).

With all that said,? you did not say what your code is that you want to upload.? Is it an INO sketch or is it a Hex file?

I hope this is helpful and not confusing.

Good luck.

Jim Pruitt
WA7DUY




On 10/29/2021 10:30 PM, Wayde Nie via groups.io wrote:

The best thing about the atmel microcontrollers is that there's so many ways to work with them! The worst thing about the atmel microcontrollers is that there's so many ways to work with them!!! :-) Where to start?

The easiest way ,I think, might be to get an Arduino uno or clone uno board with the socketed Atmega238P chip. You can program it and debug with the Arduino IDE and use it as is, or pop the chip out and use it bare in your other circuits. (some modes need a crystal, but stick to the internal resonator modes to start, just to make it easier)

If you get additional 328p's for the board you might want to start with chips with the Arduino bootloader already on them as they are a drop in replacement on an Uno with a socket. (Some sellers are better than others at reliably indicating if they preload the bootloader, depending on the source...)

But... Buy 2 Arduino uno boards, and one can be loaded with an in circuit serial programing (ICSP) program (an example script distributed with the Arduino IDE) and use it to program bare atmega chips, either with the bootloader (making them useable to load your scripts from within the ide), or your just loading your own scripts directly... (The bootloader code is bundled in with the ide)

There are dedicated ICSP programmers too, but a lot of them amongst hobby community are themselves just atmega based boards... Another uno board works just as well imo, and can do double duty as another Arduino dev board...

There's a series of YouTube videos from a channel called "wifi sheep" where he's making an atmega tiny basic computer, but in the series he modifies an Arduino Uno socketed board with a zif socket so he can swap chips easier as he programs them. Along the way he outlines a decent foundational method of getting started with these chips that you could build on from there... Ymmv , of course :-)

Good luck! They really are a lot of fun!

Wayde Nie VA3NCA
73


-------- Original message --------
From: "wa8yan.radio via groups.io" <wa8yan.radio@...>
Date: 2021-10-30 00:44 (GMT-05:00)
Subject: [QRPLabs] Programming the Atmega238P

Can one of you who do this all the time advise me what minimal hardware and software is needed to do simple programming of the Atmega chip.? I already have the script I want to put in it, my main interest is just to familiarize myself with the basics with a small project and to get a useable chip out of it.

Perhaps a reference to a good beginning (very beginning) tutorial.? Everything I've seen so far assumes way to much about what I already know.? They begin with acronyms and processes that are meaningless to me. Little wonder I haven't learned much yet.? There has to be someone who can teach someone like me who hasn't kept up with the pace of progress, but have a foundation in the rudiments.

73 Phil WA8YAN



 

开云体育

Hello Phil.

I replied to your message but guess the moderator has not released my message yet.

If you are just looking to upload a sketch (what the usual source files are called for the Arduino IDE) to a AVR (ATMega328P) then it is pretty simple.? The internet is full of youtube videos telling you how to do it.? There are also lots of web pages doing and showing the same thing.

The simplest way is to buy a Ardunio Uno (or 2) and either a prototype board or a AVR ISP shield (what the plug in boards are called that go on the Arduino) (ebay) and load the Arduino IDE found at

with the latest being version 1.8.16 for Linux, Windows, or Mac

Then load your sketch (a file with a dot INO file extension) into the IDE.? From that point you can "compile" the file and upload it to the chip.? One thing that often gets new comers is that the INO may "include" a particular file (a header file usually). The "include" as it is listed in your program is telling the IDE to include that file. The issue arises when that library file that a person said to include may not be a file that you have and finding the right one becomes a headache as you will find that a file may be in lots of places on the internet with the same file name but be different files (than the one the author used).? Also you need to be aware of where your IDE puts files (including any library files you have).

One thing I found disconcerting is that the IDE DEMANDS that your sketch file live in a directory with the same name as the sketch.? It will created it and although you have it stored somewhere the IDE will create a directory with that name so the fact that you had it located on say a directory of your C drive called Download it will create a directory in the IDE file path and store the sketch there.? I found that to be behavior different than most programs.

Now if the file you have is a dot hex file which is a compiled version of the IDE sketch then things are done a little different but still easy to do.

It is not complicated but can sometimes seem that way.? There are many on this forum and many other forums that can help you.

Good luck.

Jim Pruitt
WA7DUY


On 10/30/2021 6:25 PM, wa8yan.radio via groups.io wrote:

Hi John, and all others answering my plea !

The script I have is for a morse keyer.? I am building the keyer that KL0K Thomas up in Alaska has provided the PCB for.? He is willing to program a 32P for me, but I thought I had a local ham who was knowledgeable and equipped to do it with me.... but then found out he didn't have his own hardware for the job, sooooo..... I decided to call it a learning experience and perhaps a great fall/winter project.? Thus I show up here seeking guidance to get started, first to get my chip programmed with the minimum necessary hardware and software and then to give me a push down the road to creating my own projects.? Maybe even pick up one of the books full of ham projects to try.

I'm pretty sure you can teach this old dog a few new tricks.? However, that is still to be proven.... HI HI.

73 Phil WA8YAN

-------- Original message --------
From: "john.rogers via groups.io" <john.rogers@...>
Date: 10/30/21 4:20 PM (GMT-05:00)
Subject: Re: [QRPLabs] Programming the Atmega238P

Phil,
I sympathize.
This is confusing territory.
Sorry there is not a simple answer.
Your best route depends on your goals:
I understand you already have a script and you want to get it on the Atmega 328P chip.

What type of script is it?

If your script is a .hex file, see Hans' suggestions here:

This is a good place to start if you want to upgrade the QCX firmware, but the same procedure can be used for any .hex file.
I have also seen .elf file extensions and I am guessing Hans' suggestions will work for .elf file types as well as .hex.

If your script is a .ino type, that's an Arduino script. Use the Arduino IDE as Jack W8TEE said. There are LOTS of resources for this.? Use a simple USB cable, Arduino Uno, and? the Arduino IDE.

Good luck,
John
AC2SG



 

开云体育

Hi Jim,? Jack, Jeff, Wayde , and John....
?I very much appreciate all of your replies to my plea for help with programming the Atmega32P chip.? All of you spent a considerable amount of time to give me detailed information.? I am in the process of studying everything right now and trying to find out if I know enough yet to get started, but you have collectively given me a lot to review and assimilate.?

I have sourced the Uno and will be acquiring the IDE next and continue reviewing your replies.? As soon as I know what to ask I'll be back with more questions I'm sure so Standby for the next cry for help.? Till then, thank you all for your replies and best efforts to get me up to speed, a hard task at best, just ask my wife. HI HI.

73 Phil WA8YAN



Sent from my Verizon, Samsung Galaxy smartphone


-------- Original message --------
From: Jim Pruitt <jpruitt67@...>
Date: 10/31/21 4:44 AM (GMT-05:00)
Subject: Re: [QRPLabs] Programming the Atmega238P

Hello Phil.

I replied to your message but guess the moderator has not released my message yet.

If you are just looking to upload a sketch (what the usual source files are called for the Arduino IDE) to a AVR (ATMega328P) then it is pretty simple.? The internet is full of youtube videos telling you how to do it.? There are also lots of web pages doing and showing the same thing.

The simplest way is to buy a Ardunio Uno (or 2) and either a prototype board or a AVR ISP shield (what the plug in boards are called that go on the Arduino) (ebay) and load the Arduino IDE found at

with the latest being version 1.8.16 for Linux, Windows, or Mac

Then load your sketch (a file with a dot INO file extension) into the IDE.? From that point you can "compile" the file and upload it to the chip.? One thing that often gets new comers is that the INO may "include" a particular file (a header file usually). The "include" as it is listed in your program is telling the IDE to include that file. The issue arises when that library file that a person said to include may not be a file that you have and finding the right one becomes a headache as you will find that a file may be in lots of places on the internet with the same file name but be different files (than the one the author used).? Also you need to be aware of where your IDE puts files (including any library files you have).

One thing I found disconcerting is that the IDE DEMANDS that your sketch file live in a directory with the same name as the sketch.? It will created it and although you have it stored somewhere the IDE will create a directory with that name so the fact that you had it located on say a directory of your C drive called Download it will create a directory in the IDE file path and store the sketch there.? I found that to be behavior different than most programs.

Now if the file you have is a dot hex file which is a compiled version of the IDE sketch then things are done a little different but still easy to do.

It is not complicated but can sometimes seem that way.? There are many on this forum and many other forums that can help you.

Good luck.

Jim Pruitt
WA7DUY


On 10/30/2021 6:25 PM, wa8yan.radio via groups.io wrote:
Hi John, and all others answering my plea !

The script I have is for a morse keyer.? I am building the keyer that KL0K Thomas up in Alaska has provided the PCB for.? He is willing to program a 32P for me, but I thought I had a local ham who was knowledgeable and equipped to do it with me.... but then found out he didn't have his own hardware for the job, sooooo..... I decided to call it a learning experience and perhaps a great fall/winter project.? Thus I show up here seeking guidance to get started, first to get my chip programmed with the minimum necessary hardware and software and then to give me a push down the road to creating my own projects.? Maybe even pick up one of the books full of ham projects to try.

I'm pretty sure you can teach this old dog a few new tricks.? However, that is still to be proven.... HI HI.

73 Phil WA8YAN

-------- Original message --------
From: "john.rogers via groups.io" <john.rogers@...>
Date: 10/30/21 4:20 PM (GMT-05:00)
Subject: Re: [QRPLabs] Programming the Atmega238P

Phil,
I sympathize.
This is confusing territory.
Sorry there is not a simple answer.
Your best route depends on your goals:
I understand you already have a script and you want to get it on the Atmega 328P chip.

What type of script is it?

If your script is a .hex file, see Hans' suggestions here:

This is a good place to start if you want to upgrade the QCX firmware, but the same procedure can be used for any .hex file.
I have also seen .elf file extensions and I am guessing Hans' suggestions will work for .elf file types as well as .hex.

If your script is a .ino type, that's an Arduino script. Use the Arduino IDE as Jack W8TEE said. There are LOTS of resources for this.? Use a simple USB cable, Arduino Uno, and? the Arduino IDE.

Good luck,
John
AC2SG



 

Keep us posted...

Jack, W8TEE

On Sunday, October 31, 2021, 11:31:14 AM EDT, wa8yan.radio via groups.io <wa8yan.radio@...> wrote:


Hi Jim,? Jack, Jeff, Wayde , and John....
?I very much appreciate all of your replies to my plea for help with programming the Atmega32P chip.? All of you spent a considerable amount of time to give me detailed information.? I am in the process of studying everything right now and trying to find out if I know enough yet to get started, but you have collectively given me a lot to review and assimilate.?

I have sourced the Uno and will be acquiring the IDE next and continue reviewing your replies.? As soon as I know what to ask I'll be back with more questions I'm sure so Standby for the next cry for help.? Till then, thank you all for your replies and best efforts to get me up to speed, a hard task at best, just ask my wife. HI HI.

73 Phil WA8YAN



Sent from my Verizon, Samsung Galaxy smartphone


-------- Original message --------
From: Jim Pruitt <jpruitt67@...>
Date: 10/31/21 4:44 AM (GMT-05:00)
Subject: Re: [QRPLabs] Programming the Atmega238P

Hello Phil.

I replied to your message but guess the moderator has not released my message yet.

If you are just looking to upload a sketch (what the usual source files are called for the Arduino IDE) to a AVR (ATMega328P) then it is pretty simple.? The internet is full of youtube videos telling you how to do it.? There are also lots of web pages doing and showing the same thing.

The simplest way is to buy a Ardunio Uno (or 2) and either a prototype board or a AVR ISP shield (what the plug in boards are called that go on the Arduino) (ebay) and load the Arduino IDE found at

with the latest being version 1.8.16 for Linux, Windows, or Mac

Then load your sketch (a file with a dot INO file extension) into the IDE.? From that point you can "compile" the file and upload it to the chip.? One thing that often gets new comers is that the INO may "include" a particular file (a header file usually). The "include" as it is listed in your program is telling the IDE to include that file. The issue arises when that library file that a person said to include may not be a file that you have and finding the right one becomes a headache as you will find that a file may be in lots of places on the internet with the same file name but be different files (than the one the author used).? Also you need to be aware of where your IDE puts files (including any library files you have).

One thing I found disconcerting is that the IDE DEMANDS that your sketch file live in a directory with the same name as the sketch.? It will created it and although you have it stored somewhere the IDE will create a directory with that name so the fact that you had it located on say a directory of your C drive called Download it will create a directory in the IDE file path and store the sketch there.? I found that to be behavior different than most programs.

Now if the file you have is a dot hex file which is a compiled version of the IDE sketch then things are done a little different but still easy to do.

It is not complicated but can sometimes seem that way.? There are many on this forum and many other forums that can help you.

Good luck.

Jim Pruitt
WA7DUY


On 10/30/2021 6:25 PM, wa8yan.radio via groups.io wrote:
Hi John, and all others answering my plea !

The script I have is for a morse keyer.? I am building the keyer that KL0K Thomas up in Alaska has provided the PCB for.? He is willing to program a 32P for me, but I thought I had a local ham who was knowledgeable and equipped to do it with me.... but then found out he didn't have his own hardware for the job, sooooo..... I decided to call it a learning experience and perhaps a great fall/winter project.? Thus I show up here seeking guidance to get started, first to get my chip programmed with the minimum necessary hardware and software and then to give me a push down the road to creating my own projects.? Maybe even pick up one of the books full of ham projects to try.

I'm pretty sure you can teach this old dog a few new tricks.? However, that is still to be proven.... HI HI.

73 Phil WA8YAN

-------- Original message --------
From: "john.rogers via groups.io" <john.rogers@...>
Date: 10/30/21 4:20 PM (GMT-05:00)
Subject: Re: [QRPLabs] Programming the Atmega238P

Phil,
I sympathize.
This is confusing territory.
Sorry there is not a simple answer.
Your best route depends on your goals:
I understand you already have a script and you want to get it on the Atmega 328P chip.

What type of script is it?

If your script is a .hex file, see Hans' suggestions here:

This is a good place to start if you want to upgrade the QCX firmware, but the same procedure can be used for any .hex file.
I have also seen .elf file extensions and I am guessing Hans' suggestions will work for .elf file types as well as .hex.

If your script is a .ino type, that's an Arduino script. Use the Arduino IDE as Jack W8TEE said. There are LOTS of resources for this.? Use a simple USB cable, Arduino Uno, and? the Arduino IDE.

Good luck,
John
AC2SG



 

I started doing these over ten years?ago, and just bought a programmer from Adafruit.? It of course was another AVR internally.? Still use it for 328P bootloaders because it's convenient.?

So really if you are going to make many projects then ebaying a clone programmer for 10 bucks isn't a bad?idea.

But now I buy CH340 based clone Arduino Nanos for those sort of projects instead anyway.? They are only a buck or two more than a bare DIP 328Ps are and have a bootloader on them from the Chinese factory.? ?Still terminate out to a DIP format and have the USB to serial chip and a crystal as a bonus.?

Arduino IDE can just upload your code to one of those, including the programmer code (comes with the development environment) for unprogrammed chips via the ICSP pins.

If you want to learn how to do this, it's a good project.? A $3-5 Nano, a solderless breadboard and a few wires and you can easily burn the bootloader on to a virgin chip.? The Arduino IDE makes all of this nearly trivial.

Don't know what else to tell you, it's not rocket science.

You can also buy 328P DIPs off of Amazon with the bootloader pre programmed.? I did that once at the tail end of an Amazon order to finish off a project and it was fine too.? No serial to USB that way though.

Good luck.?

Fred W0FMS?


On Sun, Oct 31, 2021, 9:38 AM jjpurdum via <jjpurdum=[email protected]> wrote:
Keep us posted...

Jack, W8TEE

On Sunday, October 31, 2021, 11:31:14 AM EDT, wa8yan.radio via <wa8yan.radio=[email protected]> wrote:


Hi Jim,? Jack, Jeff, Wayde , and John....
?I very much appreciate all of your replies to my plea for help with programming the Atmega32P chip.? All of you spent a considerable amount of time to give me detailed information.? I am in the process of studying everything right now and trying to find out if I know enough yet to get started, but you have collectively given me a lot to review and assimilate.?

I have sourced the Uno and will be acquiring the IDE next and continue reviewing your replies.? As soon as I know what to ask I'll be back with more questions I'm sure so Standby for the next cry for help.? Till then, thank you all for your replies and best efforts to get me up to speed, a hard task at best, just ask my wife. HI HI.

73 Phil WA8YAN



Sent from my Verizon, Samsung Galaxy smartphone


-------- Original message --------
From: Jim Pruitt <jpruitt67@...>
Date: 10/31/21 4:44 AM (GMT-05:00)
Subject: Re: [QRPLabs] Programming the Atmega238P

Hello Phil.

I replied to your message but guess the moderator has not released my message yet.

If you are just looking to upload a sketch (what the usual source files are called for the Arduino IDE) to a AVR (ATMega328P) then it is pretty simple.? The internet is full of youtube videos telling you how to do it.? There are also lots of web pages doing and showing the same thing.

The simplest way is to buy a Ardunio Uno (or 2) and either a prototype board or a AVR ISP shield (what the plug in boards are called that go on the Arduino) (ebay) and load the Arduino IDE found at

with the latest being version 1.8.16 for Linux, Windows, or Mac

Then load your sketch (a file with a dot INO file extension) into the IDE.? From that point you can "compile" the file and upload it to the chip.? One thing that often gets new comers is that the INO may "include" a particular file (a header file usually). The "include" as it is listed in your program is telling the IDE to include that file. The issue arises when that library file that a person said to include may not be a file that you have and finding the right one becomes a headache as you will find that a file may be in lots of places on the internet with the same file name but be different files (than the one the author used).? Also you need to be aware of where your IDE puts files (including any library files you have).

One thing I found disconcerting is that the IDE DEMANDS that your sketch file live in a directory with the same name as the sketch.? It will created it and although you have it stored somewhere the IDE will create a directory with that name so the fact that you had it located on say a directory of your C drive called Download it will create a directory in the IDE file path and store the sketch there.? I found that to be behavior different than most programs.

Now if the file you have is a dot hex file which is a compiled version of the IDE sketch then things are done a little different but still easy to do.

It is not complicated but can sometimes seem that way.? There are many on this forum and many other forums that can help you.

Good luck.

Jim Pruitt
WA7DUY


On 10/30/2021 6:25 PM, wa8yan.radio via wrote:
Hi John, and all others answering my plea !

The script I have is for a morse keyer.? I am building the keyer that KL0K Thomas up in Alaska has provided the PCB for.? He is willing to program a 32P for me, but I thought I had a local ham who was knowledgeable and equipped to do it with me.... but then found out he didn't have his own hardware for the job, sooooo..... I decided to call it a learning experience and perhaps a great fall/winter project.? Thus I show up here seeking guidance to get started, first to get my chip programmed with the minimum necessary hardware and software and then to give me a push down the road to creating my own projects.? Maybe even pick up one of the books full of ham projects to try.

I'm pretty sure you can teach this old dog a few new tricks.? However, that is still to be proven.... HI HI.

73 Phil WA8YAN

-------- Original message --------
From: "john.rogers via " <john.rogers@...>
Date: 10/30/21 4:20 PM (GMT-05:00)
Subject: Re: [QRPLabs] Programming the Atmega238P

Phil,
I sympathize.
This is confusing territory.
Sorry there is not a simple answer.
Your best route depends on your goals:
I understand you already have a script and you want to get it on the Atmega 328P chip.

What type of script is it?

If your script is a .hex file, see Hans' suggestions here:

This is a good place to start if you want to upgrade the QCX firmware, but the same procedure can be used for any .hex file.
I have also seen .elf file extensions and I am guessing Hans' suggestions will work for .elf file types as well as .hex.

If your script is a .ino type, that's an Arduino script. Use the Arduino IDE as Jack W8TEE said. There are LOTS of resources for this.? Use a simple USB cable, Arduino Uno, and? the Arduino IDE.

Good luck,
John
AC2SG



 

开云体育

I will Jack.? Thanks again.? I shall return !? Never stop learning !



Sent from my Verizon, Samsung Galaxy smartphone


-------- Original message --------
From: "jjpurdum via groups.io" <jjpurdum@...>
Date: 10/31/21 12:38 PM (GMT-05:00)
Subject: Re: [QRPLabs] Programming the Atmega238P

Keep us posted...

Jack, W8TEE

On Sunday, October 31, 2021, 11:31:14 AM EDT, wa8yan.radio via groups.io <wa8yan.radio@...> wrote:


Hi Jim,? Jack, Jeff, Wayde , and John....
?I very much appreciate all of your replies to my plea for help with programming the Atmega32P chip.? All of you spent a considerable amount of time to give me detailed information.? I am in the process of studying everything right now and trying to find out if I know enough yet to get started, but you have collectively given me a lot to review and assimilate.?

I have sourced the Uno and will be acquiring the IDE next and continue reviewing your replies.? As soon as I know what to ask I'll be back with more questions I'm sure so Standby for the next cry for help.? Till then, thank you all for your replies and best efforts to get me up to speed, a hard task at best, just ask my wife. HI HI.

73 Phil WA8YAN



Sent from my Verizon, Samsung Galaxy smartphone


-------- Original message --------
From: Jim Pruitt <jpruitt67@...>
Date: 10/31/21 4:44 AM (GMT-05:00)
Subject: Re: [QRPLabs] Programming the Atmega238P

Hello Phil.

I replied to your message but guess the moderator has not released my message yet.

If you are just looking to upload a sketch (what the usual source files are called for the Arduino IDE) to a AVR (ATMega328P) then it is pretty simple.? The internet is full of youtube videos telling you how to do it.? There are also lots of web pages doing and showing the same thing.

The simplest way is to buy a Ardunio Uno (or 2) and either a prototype board or a AVR ISP shield (what the plug in boards are called that go on the Arduino) (ebay) and load the Arduino IDE found at

with the latest being version 1.8.16 for Linux, Windows, or Mac

Then load your sketch (a file with a dot INO file extension) into the IDE.? From that point you can "compile" the file and upload it to the chip.? One thing that often gets new comers is that the INO may "include" a particular file (a header file usually). The "include" as it is listed in your program is telling the IDE to include that file. The issue arises when that library file that a person said to include may not be a file that you have and finding the right one becomes a headache as you will find that a file may be in lots of places on the internet with the same file name but be different files (than the one the author used).? Also you need to be aware of where your IDE puts files (including any library files you have).

One thing I found disconcerting is that the IDE DEMANDS that your sketch file live in a directory with the same name as the sketch.? It will created it and although you have it stored somewhere the IDE will create a directory with that name so the fact that you had it located on say a directory of your C drive called Download it will create a directory in the IDE file path and store the sketch there.? I found that to be behavior different than most programs.

Now if the file you have is a dot hex file which is a compiled version of the IDE sketch then things are done a little different but still easy to do.

It is not complicated but can sometimes seem that way.? There are many on this forum and many other forums that can help you.

Good luck.

Jim Pruitt
WA7DUY


On 10/30/2021 6:25 PM, wa8yan.radio via groups.io wrote:
Hi John, and all others answering my plea !

The script I have is for a morse keyer.? I am building the keyer that KL0K Thomas up in Alaska has provided the PCB for.? He is willing to program a 32P for me, but I thought I had a local ham who was knowledgeable and equipped to do it with me.... but then found out he didn't have his own hardware for the job, sooooo..... I decided to call it a learning experience and perhaps a great fall/winter project.? Thus I show up here seeking guidance to get started, first to get my chip programmed with the minimum necessary hardware and software and then to give me a push down the road to creating my own projects.? Maybe even pick up one of the books full of ham projects to try.

I'm pretty sure you can teach this old dog a few new tricks.? However, that is still to be proven.... HI HI.

73 Phil WA8YAN

-------- Original message --------
From: "john.rogers via groups.io" <john.rogers@...>
Date: 10/30/21 4:20 PM (GMT-05:00)
Subject: Re: [QRPLabs] Programming the Atmega238P

Phil,
I sympathize.
This is confusing territory.
Sorry there is not a simple answer.
Your best route depends on your goals:
I understand you already have a script and you want to get it on the Atmega 328P chip.

What type of script is it?

If your script is a .hex file, see Hans' suggestions here:

This is a good place to start if you want to upgrade the QCX firmware, but the same procedure can be used for any .hex file.
I have also seen .elf file extensions and I am guessing Hans' suggestions will work for .elf file types as well as .hex.

If your script is a .ino type, that's an Arduino script. Use the Arduino IDE as Jack W8TEE said. There are LOTS of resources for this.? Use a simple USB cable, Arduino Uno, and? the Arduino IDE.

Good luck,
John
AC2SG



Mike G8GYW
 

The simplest solution I found was to use a laptop with a USBasp adapter cable.

Then I use avrdude to program hex files and the IDE with MiniCore board manager for bootloader and Arduino sketches.
--
Mike G8GYW


 

开云体育

Hi Jack.? ?I was just looking on Amazon for a copy of the book Soldersmoke for a Christmas present.? As I was buying that book I saw a picture of your C programming book that I remembered you recommending to me. Just thought I'd let you know that your book will be my next purchase sometime in 2022. (When the "finance director" forgets about this purchase).? Thanks for recommending it to me and for the copy of chapter 1 which I am still rereading.? Julian N4JO has taken on the daunting task of coaching me in getting the source code I have edited and compiled then loaded into my Atmega328P so my project will be up and running.? After that, I intend to move on to end up writing my own C code and your book will be my on the desk guide.

Just wanted to update you on where I am at and to thank you for your taking an interest in my pursuit into the world of C.

73 Phil WA8YAN



Sent from my Verizon, Samsung Galaxy smartphone


-------- Original message --------
From: "jjpurdum via groups.io" <jjpurdum@...>
Date: 10/30/21 9:02 AM (GMT-05:00)
Subject: Re: [QRPLabs] Programming the Atmega238P

Mornin' Phil:

First, the disclaimer: I've written a number of programming books, so I'm going to suggest my Beginning C for Microcontrollers for consideration. Go to Amazon, look up this title, and click on the Look Inside banner near the upper-right corner of the book. This would allow you to read the Foreword, and look at the Table of Contents. Then read the reviews. I would also read the reviews of several other intro books to see if one better-suits your preferences.

Since the above sounds like an ad more than being helpful, I've attached Chapter 1 from that book. It tells you how to download and install the (free) Arduino Integrated Development Environment (IDE), test the install, and write your first program. Obviously, I'm biased, but I think programming brings a new element of enjoyment to this wonderful hobby of ours.

Give programming a try. I think you'll find it a fascinating tool to add to your hobby tool belt.

Jack, W8TEE

On Saturday, October 30, 2021, 12:43:56 AM EDT, wa8yan.radio via groups.io <wa8yan.radio@...> wrote:


Can one of you who do this all the time advise me what minimal hardware and software is needed to do simple programming of the Atmega chip.? I already have the script I want to put in it, my main interest is just to familiarize myself with the basics with a small project and to get a useable chip out of it.

Perhaps a reference to a good beginning (very beginning) tutorial.? Everything I've seen so far assumes way to much about what I already know.? They begin with acronyms and processes that are meaningless to me. Little wonder I haven't learned much yet.? There has to be someone who can teach someone like me who hasn't kept up with the pace of progress, but have a foundation in the rudiments.

73 Phil WA8YAN


Sent from my Verizon, Samsung Galaxy smartphone


 

Not so daunting, Phil, you're a disciplined, logical thinker, and that's nine tenths of the qualifications for a good software engineer :-) Let me know if you still need that Uno I promised you: I finally found it hiding under a shield (and you now know what that is!) - right where I'd left it a couple of years ago ;-)


--
Julian, N4JO.


 

开云体育

Yes I do.? Afraid to just buy something off amazon then find out I got the wrong thing.? So if you can spare it I will put it to good use.??

Here are a few pics of where the project stands as of now.? Notably a little more soldersmoke to make and a nice looking knob for the speed pot, oh and finally there's the issue of that blank cpu socket needing an Atmega328P.? Then it should work.



Sent from my Verizon, Samsung Galaxy smartphone


-------- Original message --------
From: Julian N4JO <n4jo@...>
Date: 11/19/21 11:53 PM (GMT-05:00)
Subject: Re: [QRPLabs] Programming the Atmega238P

Not so daunting, Phil, you're a disciplined, logical thinker, and that's nine tenths of the qualifications for a good software engineer :-) Let me know if you still need that Uno I promised you: I finally found it hiding under a shield (and you now know what that is!) - right where I'd left it a couple of years ago ;-)


--
Julian, N4JO.