1 /*********************************************
2 * vim: set sw=8 ts=8 si :
3 * Author: Guido Socher, Copyright: GPL
4 * This is a test program which will write "LCD works"
6 * This program is also used to test the keypad. It
7 * displays the button last pressed.
9 * See http://www.tuxgraphics.org/electronics/
12 * Clock frequency : Internal clock 8 Mhz
13 *********************************************/
16 #define F_CPU 8000000UL // 8 MHz
17 #include <util/delay.h>
24 void delay_ms(uint16_t ms)
25 /* delay for a minimum of <ms> */
27 // we use a calibrated macro. This is more
28 // accurate and not so much compiler dependent
43 lcd_puts("LCD works");
52 lcd_puts_P("U+ pressed");
57 lcd_puts_P("U- pressed");
64 lcd_puts_P("I+ pressed");
69 lcd_puts_P("I- pressed");
72 if (check_store_button()){
76 lcd_puts_P("pressed");
84 lcd_puts_P("a button");