'dustin 'converted to Oshonsoft Basic by Eric Gibbs 23Mar2010 Define CONF_WORD = 0x3f30 Define CLOCK_FREQUENCY = 4 'PIC Defines '----------- '@ device intrc_osc_noclkout '@ device wdt_off '@ device pwrt_on '@ device mclr_on '@ device bod_off '@ device lvp_off '@ device cpd_off '@ device protect_off 'Define SIMULATION_WAITMS_VALUE = 1 '---------------VAR's-------------------------------- Dim eng As Word Dim mem1 As Word Dim unitsecs As Byte Dim tensecs As Byte 'Define Hardware '--------------- Define LCD_LINES = 2 Define LCD_CHARS = 16 Define LCD_BITS = 4 Define LCD_DREG = PORTA Define LCD_DBIT = 0 Define LCD_RSREG = PORTA Define LCD_RSBIT = 4 Define LCD_EREG = PORTB Define LCD_EBIT = 3 Define COUNT_MODE = 1 Define LCD_COMMANDUS = 500 ''delay after Lcdcmdout statement(default value is 5000) Define LCD_DATAUS = 200 ''defines the delay after Lcdout statement(default value is 100) Define LCD_INITMS = 200 ''defines the delay For Lcdinit statement(default value is 100) 'TRISA = %00000000 TRISB = %00000111 'Initialise Hardware '------------------- CMCON = 7 mem1 = 0 Lcdinit WaitMs 100 loop: Lcdcmdout LcdLine1Pos(1) Lcdout "LED Test " Lcdcmdout LcdLine2Pos(1) Lcdout "Line #2" Toggle PORTB.7 WaitMs 500 Lcdcmdout LcdClear Goto loop End