Using Libc's stdio to Send Formatted Strings

Last modified by Microchip on 2026/10/23 09:39

Overview

In this video:

  • Provide good community tutorials to understand how to use printf()
    1. Use Standard IO streams in AVR® GCC
    2. Use printf with an AVR MCU
  • Set up a file and a stream using FDEV_SETUP_STREAM
  • Copy our existing IRQ-based void USART0_Transmit(unsigned char data) function, then modify the parameter types to match what FDEV_SETUP_STREAM expects to create int USART0_Transmit_IO( char data, FILE *steam ), in the process extending the functionality of our USART_irq driver
  • Test our formatted string
  • Add a loop counter to our formatted string, using Stanford's AVR Programming Wiki to check syntax