Category: AVR

  • How to use internal temperature sensor of ATmega328pb

    ATmega328PB is a new semiconductor microcontroller from Microchip semiconductors. I have used its previous generation which is ATmega328 and ATmega328P. They were usually found on Arduino Uno and Arduino nano. This new IC has a temperature sensor built into it. Which is handy for measuring the die temperature. Which can make device stable in high-temperature…

  • How to add USBASP as External Tool in Microchip studio

    Download microchip studio from here https://www.microchip.com/en-us/tools-resources/develop/microchip-studi Install the program. I use USBASP to program AVR ATmega328pb. Go to Tools > External Tools > ADD Command: location of avrdude Arguments: Check the Use Output window to be able to see the output of the avrdude inside the microchip studio terminal.

  • How to set up UART of ATmega328pb in Atmel Studio 7.0

    To set up uart in Atmel studio 7.0. Firstly you will need a common baud rate. Then you go to section 24.11 of the datasheet. You will find common calculated values for the UBRRn register. UBRRn register is comprised of high and low registers. First, you have to initialise the Data direction registers for the…

  • How to ATMega328PB to avrdude.conf

    I recently bought a few Arduino Uno clones. They were not cheap. They utilise the ch34 IC, which is a USB to UART solution. They all have SMD atmega328pb soldered on them. The problem is that two of them stopped working with the Arduino ide. On inspection, i found out that my software was not…

  • How to make ATmega GPIO work as Input or Output

    AVR Input Output Port programming means you have to program its GPIO pins. GPIO – General Purpose Input and Output The GPIO is a very important peripheral of the microcontroller. Using the GPIO we can use the same exact pin for Input or Output. To make the PIN input or output we need to set…

  • Analog Modulation based Transmitter using ATmega16a

    Analog Modulation is the very basic form of modulation that can be produced using very basic components. The ATmega16a is used to generate a square wave. The frequency can be generated by carefully adjusting the 8-bit PWM Timer. Using the above method a Carrier Signal is generated. You can hear the carrier pulses on AM…

  • Memory Space in ATmega16A

    To effectively program AVR based microcontroller you must have knowledge about its memory space. Since there is not just one memory space. There are three different address spaces. They are: Data memory (SRAM) Here all your the intermediate results are stored and all the run time calculation get carried in this memory space. Program memoryIt…

  • Compile AVR Code in Raspberry Pi

    I have recorded a video showing the steps to compile AVR code. In this video, you will see how to compile AVR led blinking code for the atmega32 microcontroller is being compiled using AVR-GCC in raspberry pi 3 b+. Step 1. : Create a file and put your avr c code in that file. Save…

  • How to install AVR-GCC Compiler in raspberry pi

    In this video, you will see that how avr compiler can be installed in raspberry pi model 3 b+. For steps on how to install avrdude in raspberry pi you can go here. AVR compiler and avrdude together on raspberry pi make it a development environment for embedded systems involving Avr microcontroller.

  • Using USBASP V2.0 AVR Programmer with Raspberry Pi 3

    Raspberry pi or Rpi can be used for programming certain AVR microcontrollers. I have made a video showing you the steps. Step 1: you have to install AVRDUDE Step 2: You can check if the avrdude is installed properly or not using step 3: connect your USBASP v2.0 to your microcontroller Microcontroller Programmed: Atmega32, atmega32a,…