/* * LCD_Keyb.c * * Created: 7/10/2015 10:18:44 pm * Author : Dimitrios Porlidas */ /* LCD 2x16 with keyboard 4x4 and 8 buttons PC160LRS-QWB-B (with GREEK characters) www.porlidas.gr */ #include "LCD_2x16.h" unsigned char i3; //(Buttons) //unsigned char matrix[] = {} //(LCD) int main (void) { DDRA = 0b00001111; //Port A upper inputs, lower outputs (keyboard) PORTA = 0b11111111; //Enable pull up resistors on inputs, send 1 to outputs (keyboard) DDRB = 0b11111111; //Port B outputs (LCD) DDRC = 0b00000000; //Port C inputs (buttons) PORTC = 0b11111111; //Enable pull up resistors (buttons) InitLCD (); //Start up (LCD) i3 = 0x2F; //Set up button function, 0 or 1 button start write LCD 0 (buttons) while (1) { Keyb (); //Check keyboard Buttons (); //Check Buttons // WrIn (xxxx) //Send instruction, see LCD_2x16.h (LCD) // SeCu (xx) //Send cursor to a specific address 0-80 (LCD) // WrDa (x) //Send ASCII characters, see LCD_2x16.h (LCD) // TypeLogo (matrix); //Send ASCII characters matrix, see LCD_2x16.h (LCD) } }