Skip to content

Instantly share code, notes, and snippets.

@orymate
Created December 21, 2010 12:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orymate/749867 to your computer and use it in GitHub Desktop.
Save orymate/749867 to your computer and use it in GitHub Desktop.
/* based on http://goo.gl/ArZG6 */
#define X )*2+1
#define _ )*2
#define s ((((((((0 /* 8 parens for 8 bit, 16 for 16, etc) */
unsigned char lcd_char_P[] =
{
s X X X X X X _ _,
s X _ _ _ _ _ X _,
s X _ _ _ _ _ _ X,
s X _ _ _ _ _ X _,
s X X X X X X _ _,
s X _ _ _ _ _ _ _,
s X _ _ _ _ _ _ _,
s X _ _ _ _ _ _ _
};
#undef X
#undef _
#undef s
#include <stdio.h>
int main()
{
int i, j;
for (i = 0; i < 8; i++) {
for (j = 7; j >= 0; j--) {
putchar((lcd_char_P[i] >> j) & 1 ? 'x' : ' ');
}
putchar('\n');
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment