// ************************************************************** // *** LCD Demo V1.0 *** // *** Written By P. Fletcher-Jones 9/5/01 *** // *** Last MOD 9/5/01 *** // *** Compiled with ImageCraft C compiler Version 6.21E *** // **************************************************************
#include <iom103.h>
#include "LCD.h" static void test(const char *s);
void main (void) { int i; test("Hello World"); for (i = 0; i < 1000; i++) ; // delay /* Override the ports (using the default values!) */ LCD_EN_PORT = &PORTC; LCD_DIR_PORT = &DDRA; LCD_IP_PORT = &PINA; LCD_OP_PORT = &PORTA; LCD_RS_PORT = &PORTC; LCD_RW_PORT = &PORTC; test("I am Alive"); }
static void test(const char *s) { Init_LCD(); // Setup the LCD LCD_Cursor_On(); // Turn Cursor ON
// *** These use store the text in RAM *** // //LCD_DisplayString(1,5,"Imagecraft"); // Display text on line 1 Character 2 //LCD_DisplayString(2,6,"LCD Demo"); // Display text on line 2 Character 2 Test_LCD.c
// *** These use store the text in FLASH *** // // *** !! Must have strings in flash option set in Project options *** //
LCD_DisplayString_F(1,5,"Imagecraft"); // Display text on line 1 Character 2 LCD_DisplayString_F(2,6,"LCD Demo"); // Display text on line 2 Character 2 LCD_DisplayString_F(3,6, s); }