Define LCD_BITS = 8
Define LCD_DREG = PORTB
Define LCD_DBIT = 0
Define LCD_RSREG = PORTC
Define LCD_RSBIT = 1
Define LCD_EREG = PORTC
Define LCD_EBIT = 3
Define LCD_RWREG = PORTC
Define LCD_RWBIT = 2
Define LCD_COMMANDUS = 1000 'delay after LCDCMDOUT, default value is 5000
Define LCD_DATAUS = 50 'delay after LCDOUT, default value is 100
Define LCD_INITMS = 2 'delay used by LCDINIT, default value is 100
'the last three Define directives set the values suitable for simulation; they should be omitted for a real device
Dim x1 As Single
Dim x2 As Single
Dim y1 As Single
Dim y2 As Single
Define SINGLE_DECIMAL_PLACES = 4
AllDigital 'configure all pins as digital I/O's
Lcdinit LcdCurBlink
'WaitMs 1000
x1 = 2.2
x2 = 2.2
loop:
y1 = Sin(x1)
y2 = Cos(x2)
Lcdcmdout LcdClear
Lcdout "Sin(", #x1, ")=", #y1
Lcdcmdout LcdLine2Home
Lcdout "Cos(", #x2, ")=", #y2
WaitMs 10
x1 = x1 + 0.1
x2 = x2 + 0.1
Goto loop 'loop forever