' DB024 with LCD-19 ' Operating on 10 MHz. ' Using the GRAPHIC LCD with an internal FONT Device = 18F252 XTAL = 10 ALL_DIGITAL = TRUE @CONFIG_REQ @__CONFIG config1h, OSCS_OFF_1 & HS_OSC_1 @__CONFIG config2l, BOR_ON_2 & BORV_20_2 & PWRT_ON_2 @__CONFIG config2h, WDT_OFF_2 & WDTPS_128_2 @__CONFIG config3h, CCP2MX_ON_3 @__CONFIG config4l, STVR_ON_4 & LVP_OFF_4 & DEBUG_OFF_4 ' LCD spec and pins LCD_TYPE = SAMSUNG LCD_DTPORT = PORTB LCD_RSPIN = PORTA.4 LCD_ENPIN = PORTA.5 LCD_RWPIN = PORTA.3 LCD_CS1PIN = PORTA.0 LCD_CS2PIN = PORTA.1 INTERNAL_FONT = On FONT_ADDR = 0 ' reset the display controller TRISA = %00000000 PORTA.2 = 1 DelayMS 10 PORTA.2 = 0 DelayMS 10 ' clear screen and print some text Cls Print At 0,0, "VOTI LCD-19 : " Print At 1,4, "- 128 * 64 pixel" Print At 2,4, "- Samsung KS0108" ' show a sine and a cosine Dim X As Byte, Y As Byte, Q As Float For X = 0 To 127 Q = X * 0.049 Plot 46, X Y = 46 - 16 * Sin ( Q ) Plot Y, X Y = 46 - 16 * Cos ( Q ) Plot Y, X Next Stop Include "FONT.INC"