text.skipToContent text.skipToNavigation


Microchip Bare Metal Programming

Aligning key support tools with the optimal MCU

Often, the support of a familiar ecosystem is a significant impact on MCU selection. To keep the focus on choosing the optimal MCU and peripherals for their design, over the last couple years great efforts have been made to align the tools support for the PIC and AVR MCU product families. Microchip remains committed to supporting new AVR devices in the Atmel Studio 7 and Atmel START ecosystem. In addition to this, AVR MCUs have been added to both MPLAB X Integrated Development Environment (IDE) and MPLAB Code Configurator (MCC), unifying the development experience between these MCU families.

The support of a common tool’s ecosystem is designed to get you going very quickly with new MCU families, significantly lowering the barrier to exploration. However, for an embedded developer, comfortable development with an MCU goes deeper than the tools ecosystem, all the way down to register-level, or bare-metal, coding.

Microchip’s series on bare metal programming with the AVR®Tiny2 (ATtiny1627 and AVR DD families of MCUs) covers what bare metal programing is, how to add device family packs to MPLAB® X IDE, find the right datasheet using MPLAB X IDE and use tech briefs and macros for human readable bare metal code.

ATtiny1627 and AVR DD

The ATtiny1627 and AVR DD families of MCUs are a powerful 12-bit diff ADC with PGA featuring the AVR® CPU with hardware multiplier. With a 16 KB Flash, 2 KB SRAM, and 256B EEPROM, it can handle demanding tasks with ease. The latest Core Independent Peripherals with low-power features, including the Event System, intelligent analog and advanced peripherals, make this device a superior choice in the industry.

The new 12-bit ADC offers true differential measuring capabilities with optional hardware accumulation of up to 1024 samples successfully delivers up to 17-bits resolution. With fast sampling rates of up to 375 ksps, analog data is available rapidly. The Programmable Gain Amplifier (PGA) allows for efficient measurement of small amplitude signals, making it a versatile option for a wide range of applications.

Key Features of the Microchip AVR DD Family of Microcontrollers

  • Internal 24 MHz oscillator
  • Up to 8 KB SRAM
  • Up to 22-channel, 130 ksps 12-bit differential Analog-to-Digital Converter (ADC)
  • 10-bit 350 ksps Digital-to-Analog Converter (DAC)
  • Analog Comparator (AC) with scalable reference input
  • Cyclic Redundancy Check (CRC) scan
  • Clock Failure Detect
  • 16-bit Real Time Clock (RTC) and periodic interrupt timer
  • Configurable Custom Logic (CCL) peripheral
  • Up to 6-channel Event System peripheral
  • Configurable, internally generated reference voltage
  • USART/SPI/dual-mode Two-Wire Interface (TWI)
  • Multi-voltage I/O on Port C
  • 1.8V tolerant inputs selectable for all input pins

Key Features of the Microchip ATtiny1627

  • 6 channels Event System
  • Configurable Custom Logic (CCL)
  • 12-bit Differential ADC with Programmable Gain Amplifier (PGA)
  • Analog Comparator with internal DAC reference
  • 2x 16-bit Timer/Counter type B (TCB)
  • Serial communication interfaces: 2x USART, SPI, I2C


Introduction to Bare Metal Programming with Microchip
Episode 1:
How to Get Started
Episode 4:
(Non)-Blocking Functions and Timers
Episode 7:
Lowest Power Blinky
Episode 2:
Creating a New Project
Episode 5:
Interrupt Driven Blinky and Sleep Modes
Episode 3:
Blinking an LED with I/O Ports and Bitmask
Episode 6:
Low Power Measurements