'*************************************************************************** ' Title : Example-Application using Luna evel Class "evel" ' Last updated: 19.10.2013 ' Author : rgf ' Target : EVE evel ' Compiler : LunaAVR 2013.r6 or newer '*************************************************************************** #library "Library/Spi.interface" #library "Library/FT800.interface" const F_CPU = 20000000 avr.device = atmega328p avr.clock = F_CPU avr.stack = 128 'first define alias names for the important pins #define SpiSckPin as Portb.5 #define SpiMisoPin as Portb.4 #define SpiMosiPin as Portb.3 #define ft800PdPin as Portb.1 #define ft800SsPin as Portb.2 'setup the pins SpiSckPin.mode = output ' SCK SpiMisoPin.mode = input ' MISO SpiMosiPin.mode = output ' MOSI 'initialize the spi hardware interface spi.master spi.clock = 4 spi.SpeedDouble spi.enable 'config the ft800 base values ft800.Setup.Pin.PD = ft800PdPin ft800.Setup.Pin.SS = ft800SsPin ft800.Setup.Callback.ReadByte = Spi.Master.ReadByte().Addr ft800.Setup.Callback.WriteByte = Spi.Master.WriteByte().Addr 'initialize the ft800 and display ft800.Init() 'the ft800 is ready to accept commands 'Note: The display backlight is off! 'fade in the backlight ft800.FadeIn(5) 'begin a new screen ft800.CoPro.Start() ft800.CoCmd.Color(0xffffff) ft800.CoCmd.Text8x8("Hello World!",0,0) ft800.CoCmd.Text8x16("Hello World!",1,0) ft800.CoCmd.Text("Hello World!",0,30,24,0) 'end of screen, make it visible ft800.CoPro.Display() do loop