PD Micro

Arduino Pro Micro functionality and pinout with 5-20 V power delivery through USB-C

Jan 14, 2021

Project update 3 of 7

Improved RAM usage and status logging

by Ma Ho Yuen

Optimize RAM usage by AVR MCU

The recently updated PPS features increased RAM usage to nearly 50%. We’ve found about one-third of RAM is used by const variables. Unlike a 32-bit MCU, the AVR MCU needs specific macros and functions to store and access constants from flash. We carefully implemented those while keeping the library platform-independent. The result is a reduction of RAM usage from 1223 bytes (47%) to 736 bytes (28%).

Log status to the serial port

The status logging feature is now fully functional. It logs the library status, source capabilities, and protocol packet name with timestamps in milliseconds for serial port traffic. The logging mechanism is designed to have minimal impact on PD timing.

For more information about usage, please visit our GitHub repository.


Sign up to receive future updates for PD Micro.

Subscribe to the Crowd Supply newsletter, highlighting the latest creators and projects