Home > Uncategorized > Printing/Display in C on a 8051 Emac board.

Printing/Display in C on a 8051 Emac board.

February 8th, 2009

Printf is defaulted to be displayed to the serial port on an 8051 board.  Printf works by calling putchar repeatably in order to display a string.  In order to change the location that printf prints to one needs to override the putchar function.  This can be done by adding putchar.c to your project, and then customizing the function to send the character to a different serial port, or to the LCD display.

Attached is a demo version of putchar to display to the LCD.

putchar.c

admin Uncategorized

  1. No comments yet.
  1. No trackbacks yet.