AtomSoft
Well-Known Member
Just installed Swordfish and tried this:
Works!!! and counts up
Ensure the EN and RS lines are correct... i didnt and it wasnt working until i swapped the port numbers for them
Code:
Device = 18F2525
Clock = 10
// some LCD options...
#option LCD_DATA = PORTB.0 // Assign the LCD connections
#option LCD_EN = PORTB.4 //
#option LCD_RS = PORTB.5 //
// import LCD library...
Include "LCD.bas"
Include "convert.bas"
Dim Variable As Word
// Start Of Program...
DelayMS(150) // Let the LCD warm up
LCD.Cls // Clear the LCD screen
LCD.WriteAt(1,1,"Hello World") // Send some text to the LCD
Variable = 0 // Clear the "Variable" register
While True
Inc(Variable) // Increment the "Var1" register
// Convert to a string,
// and always display 5 characters
LCD.WriteAt(2,1,Convert.DecToStr(Variable,5))
DelayMS(1000) // Delay for 1 second
Wend
Works!!! and counts up
Ensure the EN and RS lines are correct... i didnt and it wasnt working until i swapped the port numbers for them