Тёмный

#119 

Ralph S Bacon
Подписаться 53 тыс.
Просмотров 16 тыс.
50% 1

We can make life a little easier for beginners to the Arduino world with this Bootloader Shield. It's easy to use, cheap and does the job nicely with ATmega328P DIP chips, ideal for breadboard experiments.
As an added bonus, because we're running at just 8Mhz (using the in-built oscillator) we can dispense with the crystal and two capacitors, which can just get in the way whilst we're experimenting.
Why would you need to upload a bootloader? Some reasons are mentioned in the video, but the most common one is to replace (or repair) a bootloader that has incorrect "fuse" settings and does not allow further sketches to be uploaded, or which runs the Arduino at the wrong speed.
And there's more! By understanding what the Bootloader is doing we can expand on the standard bootloader in future demos, making it really work for us. Or we can perhaps dispense with a bootloader - what does that mean for uploading sketches? Stay tuned!
All links are in my GitHub:
github.com/RalphBacon/Bootloa...
---
If you like this video please give it a thumbs up, share it and if you're not already subscribed please consider doing so :)
My channel and blog are here:
/ ralphbacon
ralphbacon.blog

Наука

Опубликовано:

 

10 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 170   
@MrBelleblaas
@MrBelleblaas Год назад
As a professional designer for 26 years, I would like to state that your videos are always very clear and understandable for everyone. Much appreciation for this approach (this way more hidden techies can be encouraged. 👍👍👍
@RalphBacon
@RalphBacon Год назад
So nice of you to say, thanks for the encouragement!
@OsoPolarClone
@OsoPolarClone 6 лет назад
Ralph. I really appreciate the effort you put into your videos and the educational content that you provide. THANKS!!!
@RalphBacon
@RalphBacon 6 лет назад
Thanks for that, Bruce Peterson, nice to hear from you.
@blic-sx9ix
@blic-sx9ix 6 лет назад
Thanks! This is just the kind of intermediate Arduino content that is hard to find. Keep up the good work.
@RalphBacon
@RalphBacon 6 лет назад
You are most welcome blic19933, I'm glad you like the videos. Nice to hear from you.
@MikeK8LH
@MikeK8LH 5 лет назад
I purchased one of these '328 programmer shields ($2.85) and it works a treat. Thank you for putting together a thoughtful and concise video, Ralph.
@RalphBacon
@RalphBacon 5 лет назад
You are most welcome MikeK8LH, I'm glad you like the video. Nice to hear from you.
@VasilisKarastergios
@VasilisKarastergios 6 лет назад
Very well explained Ralph, looking forward for more educational videos like this one!
@RalphBacon
@RalphBacon 6 лет назад
You are most welcome Vasilis Karastergios, I'm glad you like the video. Nice to hear from you.
@Gritaremos
@Gritaremos 4 года назад
This is awesome. You teach us so much stuff! I am currently working on a project were battery life has pretty much put it on hold, so this helps a ton!
@RalphBacon
@RalphBacon 4 года назад
Glad this is helping. You can also look at the On/Off/Kill series of videos (#176, #173, #172) to shut down other parts of your circuitry as the Arduino goes to sleep.
@interestingspagetti
@interestingspagetti 6 лет назад
Cheers for the video. I'm just starting out with arduino's. Really helpful. Liked
@RalphBacon
@RalphBacon 6 лет назад
Well, Dave, this channel was meant for people like you. Now you only have a further 118 videos (or so) to watch (on this channel). Start slowly, don't try and run before you can walk. I say this because too many noobs try to design Mission Control using an Uno and wonder why they hit obstacle after obstacle - then give up in frustration. I remember my first attempts at PIC programming (in assembler). Painfully slow, many hurdles but boy, what a feeling when I "got it"! Welcome to the Arduinite journey, nice to have you along.
@danljohnston
@danljohnston 5 лет назад
Really useful stuff. Thanks Ralph.
@RalphBacon
@RalphBacon 5 лет назад
Thanks for your post, Danny Johnston, good to hear from you.
@michaelstevens630
@michaelstevens630 6 лет назад
Hi Ralph, thank you for the effort you put into these educational videos. Board ordered as you mention worth having on the off chance could be needed one day. Optiboot is in continual development and an interesting project.
@RalphBacon
@RalphBacon 6 лет назад
At this price, Michael, it's definitely worth it. It's a nice board. It also means you will be able to do the next part of my demo, but no spoilers, sorry.
@avejst
@avejst 6 лет назад
Thanks for sharing Interesting stuff as always
@RalphBacon
@RalphBacon 6 лет назад
You are most welcome Asger Vestbjerg, I'm glad you like the video. Nice to hear from you.
@maxcarter3413
@maxcarter3413 Год назад
Very cool. Thanks!
@RalphBacon
@RalphBacon Год назад
Glad you liked it!
@TheDefpom
@TheDefpom 6 лет назад
Nice in depth explanation, even I found it useful, and I’m not a newby.
@RalphBacon
@RalphBacon 6 лет назад
I think the minute we stop learning we stop living (gosh, that's profound). I learn new stuff every day! Thanks for your post, The Defpom's Repair Channel, good to hear from you.
@OtusAsio
@OtusAsio 6 лет назад
As always...thanks for this one too! (I am currently on 3d printing testing for future Arduino projects). Yes I am an old "baby boy" playing with toys... those videos will help me, in making a rain detector for a good friend who need one very much. Keep it comming, I will be there watching...
@RalphBacon
@RalphBacon 6 лет назад
I'd be interested in knowing how you are detecting rain, Pierre, as I have one on Benny's (my cat's) outdoor run and it works well. However, I have plans to improve it to make it more responsive so any thoughts would be appreciated. Thanks for posting.
@OtusAsio
@OtusAsio 6 лет назад
The module I use is in the link provided. It worked only with a transistor and buzzer on the digital output of the module and had to be put "on" for detection of rain because of batteries depletion. Your video will help me with an Arduino based detection with deep sleep. For now I lack time for doing so, so it could be a while to get into it... The link is :www.ebay.ca/itm/2PCS-Raindrops-Detection-sensor-module-rain-weather-module-Humidity-For-Arduino/400789805168?hash=item5d50ef1870:g:~AgAAOSwUYNaLlwW
@RalphBacon
@RalphBacon 6 лет назад
I use something similar, perhaps with a slightly different module sitting between the rain detector board and the Arduino. You must watch the videos in which I show the terrible corrosion that occurred on my detector because it was on all the time. I fixed it by only switching on the detector module every 30 seconds (approx) driven directly from a GPIO from the Arduino. I then take the (analog) reading and switch it off again. Since then, I've had no problem with corrosion at all. I want to add a small, waterproof heating pad under the rain detector, that is switched on when it rains so that I know when it has stopped raining - I've got the pads (12v) and they do get very warm (hot, in fact) but I've not yet had the time to fit them. Another thing for my retirement days (once the decorating is complete). When I do it I'll do another video anyway, so you may be interested. Stay tuned!
@RalphBacon
@RalphBacon 6 лет назад
The corrosion problem is shown in video #54 at the 10:00 mark: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JLwsaZa0XO8.html
@OtusAsio
@OtusAsio 6 лет назад
I have an idea for the corrosion problem, but as you mention, keeping the arduino not connecting for 30 seconds should do the trick... otherwise, I would try to solder all the tracks (reflow) as an experiment and see the results after a while...
@QCAndre
@QCAndre 4 года назад
Great great job Ralph
@RalphBacon
@RalphBacon 4 года назад
Thanks QC Andre, glad you liked it.
@crayzeape2230
@crayzeape2230 6 лет назад
Yikes, a shout-out, thanks for that. I made my first post before getting to that point in the video. :)
@RalphBacon
@RalphBacon 6 лет назад
Credit where credit is due, Cray Ze Ape. I'm glad to see the back of COM3, whatever it was doing!
@abpccpba
@abpccpba 5 лет назад
THKs got mine to work.
@RalphBacon
@RalphBacon 5 лет назад
Good to know, Paul, thanks for letting us all know. Now you must make it run on a button battery for 5 years. 😬
@beicel
@beicel 6 лет назад
Have it like 1 year and it's excellent shield, designed a few adapter for it and now can burn ATtiny, ATmega MCU series too.
@RalphBacon
@RalphBacon 6 лет назад
Hey, beicel! That's great that you've adapted this to make it even more useful. Thanks for posting.
@DigitLineEletronica
@DigitLineEletronica 11 месяцев назад
Thank you.
@RalphBacon
@RalphBacon 11 месяцев назад
You're welcome!
@iffracem
@iffracem 6 лет назад
Just found your RU-vid "V-log", and all I can say is.............. Thanks!
@RalphBacon
@RalphBacon 6 лет назад
Ooh, you tease! Ha Ha! Thank you for posting, nice to hear from you.
@noweare1
@noweare1 4 года назад
If you are using a linux machine and you can not burn the bootloader onto the bare 328P try using a 10uf cap from reset to ground on your programmer board (the one on the bottom). I spent two days trying to burn a bootloader onto a bare board (not using the shield) and re-built the circuit at least 3 times and changing chips and boards to no avail until I tried it on my windows machine where it worked. I found the solution on a search of the arduino forum. Someone had the exact same problem as I.
@RalphBacon
@RalphBacon 4 года назад
Good to know, Joey, totally useless to me a Windoze user but I'm sure there are many Linux users out there who will appreciate this, poor souls.
@tubeDude48
@tubeDude48 4 года назад
Ralph, at 12:00 you can right-click and change the COM Port. General COM1 & COM2 are reserved. --- At 18:10 how did you get that board in the list?
@RalphBacon
@RalphBacon 4 года назад
Do you mean the "8MHz Arduino on a Breadboard"? I believe the board description is on the Arduino.cc documentation site but I also wrote a board description myself (just requires the speed and some fuse changes). Try Arduino first.
@borayurt66
@borayurt66 6 лет назад
Nice video! One thing I wonder; Is the sketch came with the programmer shield any different from the "Arduino as ISP" sketch that comes built in the Arduino IDE?
@RalphBacon
@RalphBacon 6 лет назад
Probably not, Bora, but they may have tweaked it a bit, I suppose, after all, it's all Open Source so I wouldn't be surprised if they did _something_ to the original code. Does the original one beep like that? I'm guessing that the fundamental functionality is identical, at best they might have added a bell or whistle somewhere! Good question, thanks for posting.
@borayurt66
@borayurt66 6 лет назад
No, it does not beep. There are no pins defined for a buzzer in the original "Arduino as ISP" sketch. That is one thing they've added for sure. And I think it is a nice touch. I generally use standalone ATMega 328's in my projects. I leave the bootloader intact and add a FTDI header on the project PCB. I never tried 8MHz internal clock setting yet, your video inspired me to try that. Looking forward to your follow-up video where you will explain how to install that internal clock board definition to the Arduino IDE. Also, you may consider making a video on how to extract the hex code of a sketch from the Arduino IDE and uploading that into a ATMega 328 that does not have a bootloader using the ISP sketch + programming shield. Take care and thanks!
@jrausa1
@jrausa1 6 лет назад
Thanks for the mention, Ralph! I’m glad it worked out.
@RalphBacon
@RalphBacon 6 лет назад
You are most welcome John. I've still not had time to properly experiment further to get the ideal combination of filters but at least I sort of proved the point in that video. So thank you again for the heads up on the swatches. Good to hear from you.
@belenhedderich3330
@belenhedderich3330 6 лет назад
Thank you for the video! Arduino code is missing at the video description as well as in the github link. Waiting on the USBASP video with this programmer or maybe regular programming :)
@RalphBacon
@RalphBacon 6 лет назад
Ah yes, fun and games with the USBASP. I say "fun". I say "games". Not really, until I discovered --- sorry, no spoilers. As to missing code, I'm guessing you don't mean the DoubleBlink sketch so it must be the Arduino As ISP sketch, from Open Smart. OK, that's now in my GitHub, thanks for pointing that out, my bad.
@michaelhartrey8937
@michaelhartrey8937 4 года назад
Hi Ralph, recently came across your channel and very good it is to (although I've bought far to much from Banggood already!). I've already successfully created a couple of mini projects which involved creating some PCBs and using barebones ATMega328P chips. I've recently ordered a DIYMORE AVR ISP shield and understand how to burn a bootloader. However, I'm a little confused as to the easiest way of uploading a sketch to the ATMega328P sat in the ZIF socket. Do I simply use the "upload using programmer" from the Arduino IDE? Alternatively I have an FTDI board which I've been using to date, should I plug this in the AVR ISP shield? Do I need the underlying Arduino UNO with the shield if using the FTDI plugged in to the shield? Lots of questions I know - I'm just looking for the simplest way to upload a sketch if I'm using the AVR ISP shield. Hope this makes sense. Cheers!
@RalphBacon
@RalphBacon 4 года назад
It's easier than you think, Michael. If you're making a bare bones 328P circuit (aka Arduino UNO-style) then you don't need a bootloader at all, as you will not be uploading a new sketch via the USB port, which is what the bootloader gives you. You *do* need to upload the bootloader *initially* to get all the fuses set correctly (eg chip speed, clock source etc) but that's a one-off. From then on upload your sketch using Arduino as ISP in the programming shield's ZIF socket. If you want to click the Upload Sketch (right arrow) button be sure to press SHIFT so that the programmer is used (otherwise you will overwrite the Arduino you are using as ISP). If, however, you want to put the chip back into an Arduino UNO board then the bootloader can be used to upload your sketch in the usual fashion via USB cable on the Arduino UNO. Whichever route you take, no USB-to-Serial FTDI is required unless you want to upload the sketch whilst the chip is sat on your breadboard - although even then I would still use the ICSP method as it's straightforward (2 power connections, 4 data connections). Funnily enough I'm currently designing an easy way to program an ATTiny85 using ICSP as it's so easy. Stay tuned!
@michaelhartrey8937
@michaelhartrey8937 4 года назад
@@RalphBacon Thanks - got it all working nicely.
@whitefields5595
@whitefields5595 6 лет назад
Ralph, in your quest for minimalisation I think you can discard the second power supply to pin 20. I believe this is for the analog pins only and the digital side will run OK without it. Can you check it out please?
@RalphBacon
@RalphBacon 6 лет назад
I'm pretty sure I covered this in one of the previous videos, actually! Anyway, despite the datasheet insisting both areas need powering up I can confirm they don't, and the chip runs quite happily without the analogue side being powered. Maybe that's why I only got it down to 19 micro amps, would be less without the analogue being powered up. Thanks for posting.
@alistairmurray626
@alistairmurray626 9 месяцев назад
Great video! i'm confused however by the end section, why can't the 8MHz atmega328 chip run below 4.07v? I thought the safe operating range for 8MHz is around about 2.5v minimum? Or does it only not work when trying to running the sleepmode routine?
@RalphBacon
@RalphBacon 9 месяцев назад
Hmm. I can't remember what I said in this video but the maximum speed is dependent on the voltage supply, as you are aware. The minimum is 1.8V at which point it can run at about 4 MHz. At 2.7V it can run at 10 MHz, so 2.5V for 8MHz sounds about right. It then increases pretty much linearly until about 4.5V when it runs at full speed (that's 20 MHz, not the 16MHz when used as an Arduino). I'm not sure Sleep Mode has much to do with it, TBH.
@Eurus721
@Eurus721 6 лет назад
Does running on internal clock rather than the 16MHz xtal present any problems with I2C or serial communications? Great video. Thanks
@RalphBacon
@RalphBacon 6 лет назад
Not as far as I know as the chip "knows" it's running at 8Mhz and hence all the signal timing is adjusted accordingly. But that's a good point, I should test it out. Hmm. Food for thought. Thanks for posting, Ricky.
@inspiredtiny
@inspiredtiny Год назад
Hello Sir!, it was not mentioned and/or demonstrated if this shield can be use to upload firmware to other chip in circuit, use this as ISProgramer. Perhaps burn bootloader on other ATmega328 in another Arduino Uno board or upload .hex files on AVR like AT89S52. Can we use it for that purpose?
@RalphBacon
@RalphBacon Год назад
If this shield (and that's all it is, no processor included) is plugged into an Arduino UNO then that _Arduino_ can certainly be used as an ISP programmer (that is, in fact, the whole purpose of this shield, to make it easy to do that).
@stevex3976
@stevex3976 2 года назад
Hi Ralph, great video. While the chip is awake, what happens if it receives another wakeup switch closure?
@RalphBacon
@RalphBacon 2 года назад
Nothing! Well, the Arduino could detect it (programatically) in the main code but as it is already awake nothing further will happen from a sleep perspective.
@stevex3976
@stevex3976 2 года назад
@@RalphBacon Thank you. That is what I expected, but better to check than put it to sleep forever (sound of brick falling).
@duncanx99
@duncanx99 6 лет назад
Are you planning (or could you be persuaded) to do a follow-up on burning the ATMega328 with direct program code, i.e. without the bootloader, in the very near future? There are many occasions when you want something to just start immediately, without the time loss of it running the bootloader and waiting to see if something appears before continuing - particularly in low-power devices. It would also be goo .d to have something on programming via the ICSP headers - for those of us who want to do embedded devices. Thanks
@RalphBacon
@RalphBacon 6 лет назад
Well, Duncan, I might be persuaded to do this if an envelope of used £20 were to arrive on my workshop desk. Or, failing that (and back on Planet Earth), perhaps it will be included in a near future video on this very subject! Until my decorating duties are complete (getting closer by the day) this will have to wait, but I already have various bits ready for videoing such as the USBasp programmer - but I feel I have already said too much. Keep tuned, you should not be disappointed! Thanks for posting, always good to hear ideas and suggestions from my Arduinite followers.
@duncanx99
@duncanx99 6 лет назад
Sorry Ralph, I'm in Europe, where the British Pound has (somewhat prematurely - or maybe not) been relegated to the list of currencies that were once significant in world commerce. My pension might allow me to run to 20 Venezuelan Bolivars, but as they're currently 4,224,077.43 to the euro, that probably wouldn't be much of an incentive... I'll stay subscribed and expectant... Thanks
@javiersoto570
@javiersoto570 Год назад
En el minuto 28:12 , no tienes puesto el cristal de 16mhz, es que no hace falta? pero si los condensadores cerámicos?.... Gracias
@RalphBacon
@RalphBacon Год назад
Hola Javier. Los condensadores no son para el crystal (normalmente 22pf). Estos condensadores son 0.1μF y para desacoplar las fuentes de alimentación VCC y AVCC. Muy importante incluir estos condensadores para la estabilidad.
@Richie_
@Richie_ 2 года назад
Great video as usual. I also have the same com3 port and I will fix this now. There is another port showing , Communications Port (com 1) . I will have to find out what this is too.
@RalphBacon
@RalphBacon 2 года назад
Thanks for sharing, great hearing from you.
@Richie_
@Richie_ 2 года назад
@@RalphBacon When I try upload the blink sketch to the chip with the new bootloader it gets stuck on "uploading sketch", just hangs.
@RalphBacon
@RalphBacon 2 года назад
You need to choose File, Preferences and tick BOTH boxes on the line that says "Show verbose output during...." compilation and upload. Then you should see what is going on. Let me know!
@Richie_
@Richie_ 2 года назад
@@RalphBacon I posted the error message here but it's disappeared.
@gpTeacher
@gpTeacher 3 года назад
Hi Ralph. I'm taking the dive into bare-bones Arduino. I'm following your tutorial with the OPEN-SMART uno shield and all's okay until I have to pick the Atmega324 on Breadboard, board. I'm using IDE 1.8.13 and it organizes the boards by subgroup in the boards submenu and that 'on breadboard' board description does not come up. Any thoughts on how I should proceed? Thanks for your help Ralph. Gord
@gpTeacher
@gpTeacher 3 года назад
DISREGARD my previous messages Ralph. I got it working! I was missing the 1.6.x breadboard folder. I had to find another laptop and go back to 1.6.13 IDE to use it. Is there a way to get this board definition into 1.8.13? Or is there another way to make 8MHz chips on the shield? Or should I just resign to the world of 16MHz and use crystals. Any insights are welcome. Thank you again Ralph. Now I can get on to a low power app. Very exciting!
@gpTeacher
@gpTeacher 3 года назад
DISREGARD ALL OF MY MESSAGES :-) Hi Ralph. It ultimately came down to find out which particular subfolder went into the hardware folder on 1.8.13. Got it figured out. I can program the 8MHz chip with my main laptop. Thank you as always for your inspiring and great tutorials! Have a safe week and holiday season. Cheers! Gord
@RalphBacon
@RalphBacon 3 года назад
I kept seeing your "Disregard" messages, Gord, and thought I'll have to read these and respond soon but you've done it! Good show!
@gpTeacher
@gpTeacher 3 года назад
@@RalphBacon I have a GREAT teacher! Thank you Ralph! Very exciting now!
@andymouse
@andymouse 6 лет назад
nice one Ralph, I've been looking forward too this series and you didn't disappoint (as if)………….mind you the heat is giving my brain a good kicking...…......…..I'm slouched back (slowly melting) watching this and must have glanced at my watch because next thing I no the bare bones is on the screen (the clear breadboard) and I thought what's going on Ralph?...…….you can ditch the load cap's that's the point ya dummy...…...it honestly took an embarrassing length of time before I realised Oh he just doing things properly and decoupling the rails...………..so its a damm good thing you started an the beginning !...….sorry about calling ya a dummy
@RalphBacon
@RalphBacon 6 лет назад
I've been called worse, Andy, and I've got a thick skin (and brain) so no harm done. But you raise an interesting point; decoupling the chip, _physically close to the chip_ is essential for stability. And as the analog supply is separate from the digital supply we need to decouple both to avoid noise being introduced on the analog side by the digital end. Good post.
@andymouse
@andymouse 6 лет назад
Had forgotten a couple of 0.1uF ceramics on my Kicad project...…...The devil is in the detail
@Ed19601
@Ed19601 6 лет назад
Never mind the "x days left". Not seldom that means that afterwards it is even cheaper
@RalphBacon
@RalphBacon 6 лет назад
Spot on, Ed. When I recorded that bit, it was about a week before I could record the rest and it was then "2 days to go". Funny that.
@andrewward1169
@andrewward1169 2 года назад
Hi Ralph, thanks for another great vid. Got stuck on an error message although I get the two beeps: ***failed; avrdude: WARNING: invalid value for unused bits in fuse "efuse", should be set to 1 according to datasheet This behaviour is deprecated and will result in an error in future version You probably want to use 0xfd instead of 0x05 (double check with your datasheet first). Any ideas?
@RalphBacon
@RalphBacon 2 года назад
Yes, look at, and thoroughly experiment with, the options on the page linked below; it is the definitive fuse calculator for the Arduino. Bear in mind that bits in the fuse that are SET are ZERO; unset bits are "1" (it seems backwards, I know). You should then be able to put the HIGH, LOW and EXTENDED fuse values into the barebones bootloader settings (or the MiniCore bootloader) and not get any values. Take care! You can brick your Arduino with the wrong values so the warning you received must be taken seriously! Your extended fuse settings of 0x05 gives me no errors on that page. 0xFD gives me warnings that the unused bits are not set correctly. the exact opposite of your warning message. Check them all thoroughly and ensure you have selected the correct chip (ATMega328P). www.engbedded.com/fusecalc/
@stewartrv
@stewartrv 6 лет назад
Once you had the boot loader in, why didn't you simply burn the double blink and upload it using the shield? There is no need to own an Arduino with a DIP chip then is there. The shield and Arduino below still work exactly as a normal ISP as is don't they?
@RalphBacon
@RalphBacon 6 лет назад
You mean that by uploading a sketch (as well as the bootloader) from the underlying Arduino (as ISP) board, we don't need an Arduino board with a DIP chip in order to upload the sketch to that chip. Phew! Glad I got that straight. Indeed that is true, but the way I uploaded the sketch (omitted due to time constraints) was just to get the sketch onto the chip (somehow). We'll be using other methods in the future videos that don't require another DIP-based Arduino (I'm sure you can guess how I'm going to do it!). Stay tuned!
@pouncerminned863
@pouncerminned863 2 года назад
how can i flash the bootloader unto my atmega328p using tl866cs mini pro? I know how where the hex file is to program it, but i am not sure how to set the fuses to 8mhz in the config file
@RalphBacon
@RalphBacon 2 года назад
Here's the web site I use to ensure my fuses are properly set when using a command line: rajeshkovvuri.wordpress.com/2012/06/01/usbasp-avrdude-reading-fuse-bits/ This is the interactive fuse calculator: www.engbedded.com/fusecalc/
@yvesdelbrassine6595
@yvesdelbrassine6595 4 года назад
Hello Ralph. At 14:55 you select a programmer and state that this is required. However I assume that at this stage and in this configuration, the programmer can be whatever (?) since you are loading the scetch directly through USB from the PC.
@RalphBacon
@RalphBacon 4 года назад
At that point in the video we are indeed uploading the ISP sketch to an Arduino via USB (in the usual fashion). The programmer setting in this context is not applicable but will be when we program the bare Arduino ATMEGA328P chip on that red programmer shield. That said, it won't be the *AVRISP Mk II* that we will need at that point but *Arduino as ISP* . The reason I set it to the AVRISP Mk II is because that is the default setting out-of-the-box and it reminds me to actually set it to something - but it was confusing in this video, I admit, my bad. Well spotted, Yves, I hope I have not confused others! BTW when you program a bare chip using the red programming board (with the programmer set to *Arduino as ISP* do remember to hold the shift key down before clicking the upload button as otherwise you will load the sketch onto the programmer Arduino - and you'll have to repeat this sequence again. Never done that myself, obviously, cough, cough, sorry can't hear you.
@yvesdelbrassine6595
@yvesdelbrassine6595 4 года назад
@@RalphBacon Hello Ralph, thank you very much for your clear explanations and well made video's. Very inspiring ! I have the intention to program a bare (TQFP32) ATmega328P-AU to be used with internal 8MHz clock, using the red programmer shield and a TQFP32 to DIL28 adapter, in which the ATmega328P-AU will be seated (nl.aliexpress.com/item/32931001149.html?spm=a2g0s.9042311.0.0.294b4c4dIJ12o1). After having set this way the fuses to internal 8 MHz clock and having soldered the ATmega328P-AU in my standalone circuit, I would then upload the program code to it via the ICSP which I have foreseen on my board using an USBAsp. This approach in order to be able to re-program the chip if my program would (need to) be updated. The circuit which I have designed for this (Shared via EasyEDA - also inspired by your videos) will be used to control the opening/closing of a garage door by means of a DY50 fingersensor in combination with an I2C 128x92 OLED display. Programmer shield, ATmega32P-AU's, TQFP32 to DIL28 adapter are on order, as well as the PCB (via JLCPCB - also inspired by your video's). Hope this will work. Keep you informed ??
@andymouse
@andymouse 6 лет назад
A quick question...if using internal OSC...…..ground pins 6,7 or let them float....?
@RalphBacon
@RalphBacon 6 лет назад
Let them have a day off and just float around, Andy. They've worked hard so they deserve some rest. :)
@borayurt66
@borayurt66 6 лет назад
When not used for the external crystal, those pins can be utilised as pin change interrupt pins 6 & 7. This is not possible when they are connected to an external clock.
@RalphBacon
@RalphBacon 6 лет назад
Or, if we use the MiniCore bootloader (see github.com/MCUdude/MiniCore ) then they can be mapped to Arduino pins 20 & 21 - but I'll experiment further before saying more.
@TMRu22311
@TMRu22311 7 месяцев назад
I picked up one of these to update firmware on my GM328 tester. It came with Russian language and I cannot use it, but I am not sure how to go about it. Do I have to put a bootloader on the chip or is there a way to just burn the firmware straight to it? I am using FW that has already been modified for my device, Just need to burn it. I haven't found any videos explaining this process in a simple way.
@RalphBacon
@RalphBacon 6 месяцев назад
The bootloader shield plugs into an Arduino UNO, as you know. The Arduino should be considered ONLY for use in uploading code to OTHER Arduinos. A dedicated Arduino UNO. On this UNO you upload the Arduino-as-ISP sketch that is under the Tools->Examples Then you upload all sketches to other Arduinos using this combined header/Uno but you MUST remember to upload your sketch using *Upload Using Programmer* (or you will burn the sketch onto your new header/Uno instead and have to repeat this whole exercise!)
@TMRu22311
@TMRu22311 6 месяцев назад
@@RalphBacon Thank you Ralph for the info. So, this shield would only be useful for uploading bootloaders or sketches, but not for hex files and eeproms? Having a hard time figuring this out, but I believe a USBASP with something like AVRDudes is a good place to start. Love your content BTW, thank you for sharing and always look forward to new videos.
@LowGrav1ty
@LowGrav1ty 3 года назад
I followed the Video to a T....Uploaded the OPENSMART ISP sketch, Followed all the same Tools Settings for burning the bootloader....but after i upload a sketch of my own to use on the new chip.... nothing works from then on and i keep getting errors or it gets stuck on "Uploading..." can somebody kindly please help me with this...Thank You!
@RalphBacon
@RalphBacon 3 года назад
After you uploaded the OpenSmart ISP sketch to the "host" Arduino board (or adapter) did you remember to press Shift (or Sketch -> Upload Using Programmer) before pressing the upload arrow so that the code was uploaded via the programmer? Otherwise you'll just upload your sketch to the Arduino which had the OpenSmart sketch on it (yes, I've done this quite often)?
@laauservohl5778
@laauservohl5778 3 года назад
The delivery time for the shield is to long. I prefer a second Arduino or the break board solution. It is at the end the same. Thanks for your tutorial. Thomas
@RalphBacon
@RalphBacon 3 года назад
Thanks for the tips!
@TheKetsa
@TheKetsa 6 лет назад
A full arduino board is cheaper than a discrete 328p. So I just breadboard a nano or a mini.
@Ed19601
@Ed19601 6 лет назад
TheKetsa that in fact is very true and I do the same, but I guess as a learning video it is a good one. Checked: at AliExpress the bare atmega328p DIL is now a few dimes cheaper than a promini Still can decide to reprogram the promised as well.
@RalphBacon
@RalphBacon 6 лет назад
Well, not _quite_ true, TheKetsa: a _full_ Arduino Uno (or even a Nano) might be £2.40 but I got some ATmega328P chips for about £1.10 each. But the point is well made,as the Pro Mini is about the same price. Bizarre! But all the processes I show can be applied to a full board - it will still run at 8Mhz even though the 16Mhz resonator is on board, it is just ignored. Good post, nice to hear from you.
@TheKetsa
@TheKetsa 6 лет назад
You are right, either my memory is aging or prices fluctuate. I use Aliexpress and just checked : A single 328P-PU chip is $1.50 Arduino pro mini 328p is $1.68 Arduino nano 328p is $1.90
@andymouse
@andymouse 6 лет назад
@TheKetsa....You made some good points...………..I think its in the "spirit " of Arduino to grow and learn and to move on a bit...………….when I first started using Arduino I never dreamed I would understand enough to extract the Atmega chip out of it and use it as a stand alone device...….now I'm growing in confidence and loving it, and have a rapidly growing interest in Kicad and designing PCB's for my early Arduino projects but now just using the 328p on its own...…….Ralph's channel (and a few others, can't leave out Julian !) WII build your confidence and save you a few pence
@Inertia888
@Inertia888 4 года назад
what size are those two capacitors and why?
@RalphBacon
@RalphBacon 4 года назад
The caps are 100nF (0.1µF), Darrick, and they are there to "decouple" the noise on the VCC line which will cause instability to the chip. As the 328P has two, almost separate sections, one for digital, one for analog signals, we supply VCC to both pins but decouple them both. That stops digital noise entering the analog part of the chip and (sort of ) vice versa. Very important we do this very close to the pins too.
@andymouse
@andymouse 6 лет назад
not having much luck with the "bootloader" directly from the Arduino site, not sure what I'm doing wrong...…..onwards and upwards!.....think I might invest in the "Ziffed" arrangement your using.
@RalphBacon
@RalphBacon 6 лет назад
"If at first you don't succeed, try and try again. Then give up, no use being a damn' fool about it". Or in this case, it should read "... then watch Ralph's video again, very carefully so you succeed". And getting the same Bootloader Shield will, of course, guarantee success. If you get stuck, do post the actual problem you're facing to see whether I (or others) can assist, Andy.
@andymouse
@andymouse 6 лет назад
Hi Ralph…..I'm still having bother with this bootloader upload, beginning to think I'm losing it, tried everything from basics like is there 5v? to beeping out every cable to trying different combos, to reinstalling the IDE still no joy, in board manager there are two breadboard 8mhz options (tried both !) this is the error I keep getting......Arduino: 1.8.5 (Windows 10), Board: "ATmega328 on a breadboard (8 MHz internal clock)" avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check. Error while burning bootloader. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. what is "-f"?.....any thoughts from you or Benny or fellow Arduinite's ? ……...really at a bit of a head scratcher
@RalphBacon
@RalphBacon 6 лет назад
I've had this on occasion (but not whilst doing this demo). the "Yikes!" one means it has found a chip different to the one it is expecting. So it might find an ATmega168P instead of an ATmega328P for example. Double check that the chip you're using really is the "P" version of the ATmega328. I'll continue this in your other post...
@andymouse
@andymouse 6 лет назад
Thanks you two !...………….I've ordered some new chips ( non chineseium) so I can start again with a known datum, as it were...……….let ya how I get on...…..cheers!
@RalphBacon
@RalphBacon 6 лет назад
Please do, there's always a reason computers say No!
@JosephMassimino
@JosephMassimino 6 лет назад
It would be nice if someone would do the same for a nice PIC device. Maybe it would not be possible, but if it was, that could be a whole new type of device to be used in projects.
@RalphBacon
@RalphBacon 6 лет назад
PICs are reasonably easily programmed using a PICkit 2 (well, a PICkit 3, these days) that can be compared to an FTDI USB-to-Serial converter in some ways. But maybe that's an idea for a future video. Thanks for posting.
@JosephMassimino
@JosephMassimino 6 лет назад
You mean PicKit 4 now, and that in no way represents the slick bootloader and hardware of an Arduino Uno, so that is what I am speaking of. I have a PicKit.2
@JosephMassimino
@JosephMassimino 6 лет назад
You do know that they released PicKit-4 now,
@RalphBacon
@RalphBacon 6 лет назад
I didn't know, Joseph, and I hope they have sorted out the instability of the PicKit3. I only have a PicKit 2 (which I love) but it doesn't flash all ATMEL chips which I'm convinced is an artificial barrier to "encourage" us to buy more hardware. If you look at this site it says it can use the PicKit2 for all chips (including the ATmel328P): gcbasic.sourceforge.net/Typesetter/index.php/Home
@willofirony
@willofirony 6 лет назад
As the lead singer of the Houghton Weavers used to say: pure paracetamol.
@RalphBacon
@RalphBacon 6 лет назад
Erm... did this give you a headache? Or stop one? I'm hoping the latter, Michael!
@andymouse
@andymouse 5 лет назад
Hi Ralph, I'm back in the land of the sane...…..turns out my chips had already been configured for external oscillator so when burning bootloader you still need caps and a 16Mhz crystal....(oh I'm a dummy)......but learnt a lot on the way. Of course would not have had the hassle if I had a shield because it has its on crystal on board!................in my defence on Arduino.cc it doesn't make this clear....................(if it does, then not to me !)............also I tried RX TX and RESET (3 wires as Arduino.cc) and that didn't work, so just popped the new 8Mhz into my master Arduino and uploaded as per usual, this is what you did (much better).................. just gonna add the missing entry you told me about (boards.txt) to get rid of annoying warnings and I'm back. Thanks a lot for ya help (and Benny)..............just waiting for another vid now!
@RalphBacon
@RalphBacon 5 лет назад
Doh! I should have mentioned this, I suppose. Once you have loaded a bootloader that requires/expects a crystal to be present then it has to be until you load a different bootloader that does not use it. I did mention, I believe, that having programmed a chip for 8Mhz and then plugging it into a board with a 16Mhz xtal, it will run quite happily - at 8Mhz! Probably best to put a sticker or other identifier on chips programmed for different speeds. A good speed bump to mention here for others, thanks Andy, and glad you got it working (using that shield means that the xtal will be used if required and ignored if not, just as you say).
@andymouse
@andymouse 5 лет назад
no problems Ralph, one more quickie……….can the surface mount version (Atmega328p-AU) also run on internal clock ?.....if yes same bootloader?
@RalphBacon
@RalphBacon 5 лет назад
Yes, indeed, same chip, different physical format, that's all. Just a bit trickier to connect up to our own circuit boards (but there may be PCBs out there for this chip specifically for such purposes).
@stewartrv
@stewartrv 6 лет назад
Just checked eBay if you search "AVR ISP Shield Burning Burn Bootloader Programmer for Arduino UNO R3" and then sort bow lowest price + postage you will see a number of sellers all around $3.20 which is approx GBP 2.44 incl free postage.
@RalphBacon
@RalphBacon 6 лет назад
Ah yes, a good search will always unearth a good bargain! Thanks for the heads up, stewarttv, nice to hear from you.
@elaselas5659
@elaselas5659 4 года назад
atmel 8 16 mhz board how we should.
@RalphBacon
@RalphBacon 4 года назад
Um... is this a question about an Atmel ATMEGA8 chip? Like the first Arduinos from 2008?
@omoivo6525
@omoivo6525 6 лет назад
Please ! Can You Upload Video about Stm32 with Arduino and som Project.
@RalphBacon
@RalphBacon 6 лет назад
That's a little vague, Omo, is there something specific about the SMT32 that is interesting you? Or do you have a project in mind?
@omoivo6525
@omoivo6525 6 лет назад
Ralph S Bacon Yes i mean with Arduino IDE and Any Project Tanx
@andymouse
@andymouse 6 лет назад
hi ralph still got some bootloader problems......maybe you can help, ever since I downloaded the zip file "breadboard" and extracted it to the Hardware file in sketches, I compile and upload any file now (regardless of what it is) I get this warning...……..WARNING: Board Breadboard Arduino :avr: atmega 328bb doesn't define a 'buildboard' preference . Auto-Set to: AVR_ATMEGA328BB...…………………...I now get this warning what ever I'm doing with my Arduino and other sketches compile and upload fine...…...and of course I still get the same warning I posted below...…….the one with "Yikes!" at the beginning when I try to burn a boot loader...………….wonder If you or my fellow Arduinite's have any thoughts...……..I've racked my brain till it hurts and wired it up several times tried different chips ,checked voltages, used capacitors then taken them out, questioned my sanity. I then uninstalled the IDE and removed the hardware file and deleted the Arduino directory as instructed and re-installed the IDE from scratch, and I still get the WARNING: even after all that. Is there still something lurking there that shouldn't be?.....I'm at the point now where dancing naked at midnight while shaking a bag of chicken bones seems a good idea...……..thanks
@andymouse
@andymouse 6 лет назад
sorry to be a bore but have a bit more info about my bootloader issue that might make more sense to you and Benny...…...here goes Arduino: 1.8.5 (Windows 10), Board: "ATmega328 on a breadboard (8 MHz internal clock)" C:\Users\andy\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/bin/avrdude -CC:\Users\andy\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM3 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xE2:m avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53 Copyright (c) 2000-2005 Brian Dean, www.bdmicro.com/ Copyright (c) 2007-2014 Joerg Wunsch System wide configuration file is "C:\Users\andy\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf" Using Port : COM3 Using Programmer : stk500v1 Overriding Baud Rate : 19200 AVR Part : ATmega328P Chip Erase delay : 9000 us PAGEL : PD7 BS2 : PC2 RESET disposition : dedicated RETRY pulse : SCK serial program mode : yes parallel program mode : yes Timeout : 200 StabDelay : 100 CmdexeDelay : 25 SyncLoops : 32 ByteDelay : 0 PollIndex : 3 PollValue : 0x53 Memory Detail : Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00 signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00 Programmer Type : STK500 Description : Atmel STK500 Version 1.x firmware Hardware Version: 2 Firmware Version: 1.18 Topcard : Unknown Vtarget : 0.0 V Varef : 0.0 V Oscillator : Off SCK period : 0.1 us avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.02s avrdude: Device signature = 0x000000 (retrying) Reading | ################################################## | 100% 0.02s avrdude: Device signature = 0x000000 (retrying) Reading | ################################################## | 100% 0.02s avrdude: Device signature = 0x000000 avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check. avrdude done. Thank you. Error while burning bootloader. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences. wow more than I thought!
@RalphBacon
@RalphBacon 6 лет назад
Benny says that the warning about the "build.board" preferences can be ignored - it should not affect the uploading of a sketch to anything. At least, it doesn't in mine. It's a missing entry in the *boards.txt* file. I added it to mine and I've just now uploaded it to my Github for this demo. You'll see the entry as I commented it. Use this file instead if you wish. See my other reply to your previous post regarding the actual chip. Then let me know if you've made any progress!
@Ray-ej3jb
@Ray-ej3jb 6 лет назад
I thought the 328P is a CMOS device - so why are you demonstrating touching the pins with your finger !!! ;-)
@RalphBacon
@RalphBacon 6 лет назад
It is indeed a CMOS device, Ray, but all the inputs are protected (as you might expect for a µController) so it's safe enough to handle. Just don't shuffle your feet on a nylon carpet before or whilst doing so!
@thepvporg
@thepvporg 6 лет назад
I don't like Ali Express and their fees. I have complained at them about their vendors that will list something for £2 but then charge you £5 postage WHEN and not many people know this, the Chinese government subsidises all post to and they get charges pennies and they charge us ££'s. Then there is the issue of "Free postage" and suddenly you find yourself lumped with £15 postage and then if you want to pay by paypal, additional fees... You really are better off sticking to ebay as I have fond that many prices are cheaper.
@RalphBacon
@RalphBacon 6 лет назад
I have no relationship with AliExpress other than as a paying customer, but I have found them quite good, Mark. Free postage, when stated, really does mean that unless you order multiples of the same item in which case it suddenly becomes non-free. What I do then is to just order the minimum I can get with free postage and repeat that order. They even suggest this! I have never, ever paid ££ in postage fees. They do often charge a small fee (about 60p) when using PayPal (especially for small orders) so I guess you have to weigh up PayPal's secure and anonymous payment against giving AliExpress your credit card details, something I hate doing but AliExpress seems very, very secure. I'm pretty sure the payment goes into escrow until the delivery window expires too. The seller never gets to see those payment details (otherwise I would not use them either!) Delivery times are always (stated as) longer on AliExpress than, say, Banggood. Whether that stated delivery time of 30 -50 days is true is difficult to say when you order many items over an extended period (such as I do) but I do find Banggood quicker overall. The same AliExpress sellers also sell on eBay, of course, so you might find the same items there. Whether they are cheaper or not is difficult (for me, at least) to tell right now. But it's a good platform and I've used it to get a refund on two occasions. I guess we all have our favourites os what works for you is good but you could try them again and watch the 'Free Postage' on multiple quantities - I have no connection with them as I said before. Thanks for posting your experiences, perhaps others will chip in too...
@thepvporg
@thepvporg 6 лет назад
Unfortunately I have found different, many times I have added an item to my basket, added quantity then hit with heavy costly shipping fees that the very same product is on eBay and pretty much same price but completely free shipping. Several occasions I have encountered free shipping and had free shipping on items but adding an extra item found that postage fees were added and not cheap either. I have also been hit with additional fees on paypal, not currency fees but additional fees for paying via paypal. When Ali-Express hit the scene a few years back, I was seeing quantity (like WHOLESALE prices and ability to buy job lots) but now, Ali-Express had been morphed in to what it is today. I have found similar issues with Banggood, Light in the box and all the others, they started out with the "Wholesale" thing but quickly the sellers were turning it in to a version of eBay and I do find the occasional Ali seller on eBay offering exactly the same but cheaper on eBay. I do buy from Ali but not much, mainly because if the way the majority of manufacturers are selling their wares, for a site that is meant to be a wholesale outlet, its certainly raking it in now. It still pays to shop around.
@demetriosdemetriou1186
@demetriosdemetriou1186 6 лет назад
Dearest Ralph, Initially I want to thank you that you have promptly answered me I bought 2 moteinos (one USB and one with FTDI)from LowPowerLab.com Mr Felix Rusu asked me to log onto lowpowerlab.com/guide/moteino/programming-libraries/ and this page is active everywhere you point the mouse and enter' it takes over ; I wanted to add all the Moteinos so I clicked on the preferences/additional boards URLs and goes to the second picture which is also an active and as well the third picture but nothing is happened nothing is installed in boards manager. I had some success installing Moteino, and moteino mega using the arduino's hardware , but nothing for moteino mightyhat nor the moteino (8MHz) Could please help me I am stumbled for 4 days now. God bless you and family the very best Demetrios
@RalphBacon
@RalphBacon 6 лет назад
I'm afraid I just don't have the experience of these boards to diagnose what could be going on (or wrong) Demetrios, I'm so sorry. Perhaps you need to speak to Felix Rusu again and let him guide you, step-by-step, through the entire process. It's the best suggestion I can make at this time. Good luck, I hope you get them working.
@wayneski4
@wayneski4 Месяц назад
you guy that make these videos and don't keep them up to date should shut the video down or fix any issue that have arises for example sketch no longer works that come up error no good
@RalphBacon
@RalphBacon Месяц назад
I don't believe there are any issues with the information in this video; it's a barebones ATMega328p chip running in a minimal configuration! What's the problem you're experiencing?
Далее
#118 ESP8266 Deep Sleep 💥 and Bare Bones ESP (easy)
34:18
#117 Bare Bones 💀 Arduino (make your own)
27:34
Просмотров 13 тыс.
#84 Making the ATTiny85 easier to program
27:19
Просмотров 31 тыс.
Gearless Magnet Bike
17:57
Просмотров 6 млн
Custom Keyboard From Scratch Part 2
17:13
Просмотров 38 тыс.
#82 ATTiny85 + I2C  + SPI and more!
35:25
Просмотров 81 тыс.
Best Way to Burn Arduino Bootloaders Tutorial!
13:44
Просмотров 243 тыс.
Make your own Arduino on a breadboard
6:25
Просмотров 4 тыс.