10 steps to start AVR microcontrollers

Sdílet
Vložit
  • čas přidán 3. 07. 2024
  • If you can make a simple project like blinking LED based on AVR microcontrollers, you have achieved great success in learning microcontrollers. By completing this simple project, you can ensure that you have correctly chosen, installed, and operated software and equipment. Additionally, you can verify that the equipment you are using is fully functional and working properly. After that, you just need to focus on enhancing your skills in design and programming. In this video, I will help you in successfully completing your very first project with AVR microcontrollers. In addition I will show you some of tools and instruments needed to start making microcontroller based projects and finally I will make a “Hello World” program using AVR ATmega32 and test it.
    Download Link for CodevisionAVR:
    www.hpinfotech.ro/cvavr-downlo...
    Download Link for Microchip Studio:
    www.microchip.com/en-us/tools...

Komentáře • 65

  • @zmarssojourner7435
    @zmarssojourner7435 Před 9 měsíci +1

    Can u please tell us the exact code for the chip you are using? Are u using a ATMEGA328P-PU? I want to buy the exact chip u got and follow your videos and program it. Ty

    • @elewizard
      @elewizard  Před 9 měsíci +1

      I will use atmega8a, atmega32a and atmega128a.
      You can buy these parts to follow my works.
      I must say that atmega32a and atmega16a are almost the same and their main difference is their memory size.
      The same point is true for atmega64a and atmega128a

  • @dimitrioskalfakis
    @dimitrioskalfakis Před 9 měsíci +7

    good work. there might be a problem though with beginners when examining the SPI interface connections between the ISP programmer and the MCU. it is true that MOSI connects to SDI and MISO to SDO (input of slave to output of master and the reverse), however, when using the same notation for both it is always shown as MOSI to MOSI and MISO to MISO.

  • @jboy6944
    @jboy6944 Před 9 měsíci

    Wizard, you've made my day again, Thank you!

  • @eddiepires3998
    @eddiepires3998 Před 4 měsíci

    Well explained , very clear. Also clearly showed where further knowledge will be required. 👌

    • @elewizard
      @elewizard  Před 4 měsíci

      Wow, thank you for your kind words 😃

  • @Embeded_Geek
    @Embeded_Geek Před 9 měsíci +1

    Your Lab setup looks great 👍 keep it up.

  • @howu8103
    @howu8103 Před 6 měsíci

    excellent video!

  • @dmisi1
    @dmisi1 Před 9 měsíci +1

    You make a big Step , now on we can be on another level in electronics Thanks To You ! ,...

  • @abdulsami7042
    @abdulsami7042 Před 9 měsíci +1

    Thank you so very much. I am learning a lot.

  • @scienceoftheuniverse9155
    @scienceoftheuniverse9155 Před 9 měsíci

    We really appreciate your great effort. Thanks indeed can't wait to see more

  • @mmg.mousavi5613
    @mmg.mousavi5613 Před 9 měsíci

    عالی مهندس👍 خیلی لذت بخش بود❤

  • @zmarssojourner7435
    @zmarssojourner7435 Před 7 měsíci

    Hi. Ty for the vid. I just made my LED blink. I was thinking of purchasing a ATMega chip but I instead DIRECTLY programmed the chip that is already on my Arduino Nano. The Nano has an ICSP port and I connected the USBasp to it and downloaded the hex file onto the chip. I blinked the LED with 500 ms first. Later I changed the C code to 5000 ms. It works great. Ty and looking forward to build and learn more on this embedded topic.

    • @elewizard
      @elewizard  Před 7 měsíci

      Awesome, so glad to hear that. Keep watching. More videos are coming 👍

  • @fouadzerdoumi9524
    @fouadzerdoumi9524 Před 4 měsíci

    thank you good work

    • @elewizard
      @elewizard  Před 4 měsíci

      And you for watching 😊

  • @agustinpanichini7630
    @agustinpanichini7630 Před 9 měsíci

    Hi Electronic Wizard greetings from La Plata Argentina, thank you!

    • @elewizard
      @elewizard  Před 9 měsíci +1

      Hi my friend from Argentina. Thank you so much for watching!

  • @rameshwarshelke4633
    @rameshwarshelke4633 Před 9 měsíci

    Thank you sir 🙏...

  • @zmarssojourner7435
    @zmarssojourner7435 Před 8 měsíci +2

    Thank you for the video. I am familiar with C++. I have a few questions for you. Thank you for your replies!
    @21:12, You were trying to define Pin PB0 as a digital output. To achieve this, you wrote DDRB = 1;
    1) Where did you learn/ find out that you are supposed to write DDRB and not ABCD or XYZ?
    2) How did you make the connection that PB0 is somehow connected to DDRB? Did u see that in a datasheet or ATMega manual?
    3) Why did you set DDRB equal to 1? Obviously setting it to 1 defines the PB0 as a digital output, but who told you or where did you see that this is how you are supposed to set the pin?
    4) Why is DDRB set to 1 and not to 0? Where did you see that it needs to be set to 1? Did u find it in the datasheet?

    • @elewizard
      @elewizard  Před 8 měsíci +2

      These are explained in datasheet.
      To answer such questions, I have to publish a Playlist to explain all basics and details.
      Goal of this video is to introduce AVR not programming AVR chips. I will give more detail about this subject

    • @prakashdutt1520
      @prakashdutt1520 Před 6 měsíci

      ​@@elewizardSir, please make video how to program in c programming for microcontrollers...

  • @frostysnowdog
    @frostysnowdog Před 7 měsíci

    I’d like info on your storage drawers. I like them because they are clear.

  • @RatonEEE-bp2my
    @RatonEEE-bp2my Před 6 měsíci

    can make more avr and stm32 video. It was excellent.

  • @zmarssojourner7435
    @zmarssojourner7435 Před 8 měsíci +1

    Thank you for the video. I am familiar with C++. I have a few questions for you. Thank you for your replies!
    @21:29, you were trying to control the ON /OFF states of the PB0 pin, you wrote PORTB = 1 etc.
    1) Why did you switch from DDRB to PORTB? Why didn’t you use DDRB =1?
    2) Where exactly did you find the info that you were supposed to write PORTB = 1 and not ABCD =1 or XYZ = 1? Did u find that in the datasheet also?

    • @elewizard
      @elewizard  Před 8 měsíci +1

      DDRB.0=1 makes pin 1 on port B output 😉
      PORTB & DDRB are registered in AVR which are explained in datasheet

  • @zmarssojourner7435
    @zmarssojourner7435 Před 8 měsíci

    Thank you for the video. I am familiar with C++. I have a few questions for you. Thank you for your replies!
    @22:00, you used the library #include
    1) Out of the hundreds of libraries out there, why did you choose this library? I am sure the final goal of blinking the LED told you to pick this library, but I want to know what was going on in your head and why you chose this library? If someone is stuck on an Island, I am sure you wont be there to tell them to pick this library right? LOL (Joking)
    2) You also used the syntax _delay_ms().....how did you figure that out??? It is very hard to guess this exact syntax. You got it from some special book or place. Where did you get it from LOL?

    • @elewizard
      @elewizard  Před 8 měsíci +1

      You are right, explaining these concepts is not easy.
      Actually in this video my goal was not to educate programming. My goal was to introduce AVR to who have programming skills and is interested in learning AVR.
      I can't remember where exactly I have learned these syntaxes but I am sure it was a website or forum 🙃

    • @bayareapianist
      @bayareapianist Před 6 měsíci

      You can open the header file and find the API and see you you have like any other c/c++ library. After over 40 years of programming, my answer to you these days is just Google it ;). Older days: you would look at the examples which came with the ide or read manuals, etc.

  • @mrtanaka475
    @mrtanaka475 Před 3 měsíci

    Where do i find more about the code? Like other libraries and more functions?

  • @ChandrashekarCN
    @ChandrashekarCN Před 9 měsíci

    💖💖💖💖

    • @elewizard
      @elewizard  Před 9 měsíci

      ❤️❤️❤️❤️❤️
      Thanks for the hearts

  • @dboyd462
    @dboyd462 Před 9 měsíci +1

    Could the Arduino IDE be used to write and compile the code and then the generated file be sent to the microcontroller or is there a difference in how the Arduino IDE uses libraries and creates the code that is specific to the Arduino family of boards?

    • @elewizard
      @elewizard  Před 9 měsíci +1

      Arduino ide can be used to generate executable file for AVR, then you can use programmer device to flash the MCU.

  • @marcelkubanek6798
    @marcelkubanek6798 Před 9 měsíci

    Can't we use Microchip Studio build in programmer to flash the hex code to ic?

  • @millionaire_iraq4675
    @millionaire_iraq4675 Před 9 měsíci

    Please,could you make a course about AVR

  • @DefaultFlame
    @DefaultFlame Před měsícem

    FYI: The best microcontroller for a flashing LED project is not using a microcontroller, just a 555 timer IC, one capacitor, three resistors, and an LED, with two additional capacitors optional since they are more for using it as a CPU clock and not as an LED timer circuit. No programming required, only math you can do on a calculator.

    • @elewizard
      @elewizard  Před měsícem

      Why you are not using two transistors instead? If the problem is only blinking an LED. here the problem is not to blink an LED. The problem is to setup and configure the MCU

    • @DefaultFlame
      @DefaultFlame Před měsícem

      @@elewizard It was meant as a joke. It seems I am bad at jokes.

  • @zmarssojourner7435
    @zmarssojourner7435 Před 9 měsíci

    I found one on Amazon, that says ' ATMEL 51 AVR USB ISP ASP Microcontroller Programmer'. It doesn't have the 'S' in front of the 51. Will this work as a programmer?
    Also, I already have a ' A Set AVR ISP USBtinyISP Programmer for Arduino Bootloader'. Could I use it to program the Arduino? I ask this because, from its name, it seems like this programmer is for loading a bootloader only and not for loading regular programs like blinking an LED.

    • @elewizard
      @elewizard  Před 9 měsíci

      Yes, you can use first on.
      I am not sure about the second one

  • @thomasmv5986
    @thomasmv5986 Před 27 dny

    can you send me the link to download PRG USB software

  • @mediamisfits3805
    @mediamisfits3805 Před 7 měsíci +3

    Ah... basically Arduino is just an expensive fancy microcontroller

    • @elewizard
      @elewizard  Před 7 měsíci +1

      Exactly

    • @mediamisfits3805
      @mediamisfits3805 Před 7 měsíci

      Why did you not come into my life earlier 🤣 @@elewizard

    • @bayareapianist
      @bayareapianist Před 6 měsíci +1

      So as Apple computers and iPhones. People pay for convenience. I never see smart people in Ssilicon Valley use iPhones.

    • @anonymouseniller6688
      @anonymouseniller6688 Před 3 měsíci

      Not really. Arduino is an application (hardware boards and software) that uses the AVR microcontroller. In a way it's a semi finished product that you reconfigure. The additional prices is your convenience fee.

    • @magicsmokeescapist4069
      @magicsmokeescapist4069 Před 17 dny

      Arduino UNO to say one utilise Atmega328P, you can buy these and program them in your Arduino board and move them to your project.
      You must install the bootloader before.
      Last I checked they cost 5-6EUR for one, in DIP package.

  • @zmarssojourner7435
    @zmarssojourner7435 Před 7 měsíci

    @21:28, why did you write PORTB = 1; ? Aren't you supposed to write PORTB0 = 1; ? ( The port you used is officially PORTB0 on the datasheet). Why didn't you include the 'zero' at the end of the syntax? Were you trying to set ALL the ports in 'B' to a 1 and thats why you didnt write a 'zero'? Ty!

    • @elewizard
      @elewizard  Před 7 měsíci

      It doesn't matter in this example. The command PORTB=1 will set PB.0=1 and other pins of PORTB equal to 0.