Category: Microcontroller

  • How to use AT24C32 EEPROM with ATmega328PB in Microchip Studio

    AT24C32 is an i2c compatible serial EEPROM which can be programmed using a microcontroller. The AT24C32 provides 32,768 bits of serial electrically erasable and programmableread-only memory (EEPROM). The device’s cascadable feature allows up to 8 devices to share a common 2-wire bus. The device is optimized for use in many industrial and commercial applicationswhere low…

  • How to use DS1307 RTC with ATmega328PB via I2C in Microchip Studio

    The DS1307 Real Time Clock uses I2c communication lines to connect with the microcontroller. I2C uses two lines commonly known as Serial Data/Address or SDA and Serial Clock Line or SCL. The two lines SDA and SCL are standardised and they are implemented using either an open collector or open drain configuration. What this means…

  • How to use UART Receive complete ISR of ATmega328PB using microchip studio

    When you enable the communication using the UART. You have the flexibility to either use the Polling or Interrupt method to continue with your programming. Polling halts the execution of the program and waits for the UART peripheral to receive something so that program execution must continue. But it eats a lot of the computing…

  • 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…

  • STM32F429I-DISC1

    Datasheet for stm32F429ZI https://www.st.com/en/microcontrollers-microprocessors/stm32f429zi.html This board have a 2.4 Resistive touch TFT LCD. which uses the ILI9341  controller. The touch screen which I got with this display is very bad. you have to press down on the screen before you power ON the device. The microcontroller is based on the ARM CORTEX M4F which can…

  • STM32F746IGT6 – An ARM CORTEX M7 Based Microcontroller

    Datasheet It’s an ARM Cortex M7 based microcontroller which has a maximum clock speed of 216Mhz. Well, it has a few peripherals which when combined with its CPU, makes it a very powerful controller. Those peripherals are LTDC, SDRAM Controller. It also has the usual set of peripherals from the ST. But these in particular…

  • How to redirect printf() to USART in STM32f103RB using STM32Cube IDE

    Printf() function can be redirected to USART and also towards SWO. Here you will see how to redirect printf() to USART in STM32f103RB You need to rewrite this code in your main.c file If you have created your project using STM32CubeMX or STM32 Cube IDE, then you can rewrite it in between USER CODE BEGIN…