| Swordfish Tutorial - LCD |
|
|
| Saturday, 04 April 2009 08:18 | |
|
Swordfish has many built in libraries, one being "LCD.bas". This library allows seemingly easy control of LCD modules, and only requires a few declarations.
Click here to see this circuit in action!
Note that the contrast resistor pot can be anything from 4.7K to 10K, and that the unused data lines on the LCD do not need to be tied to earth. Be sure to allow a small delay before sending data/commands to the LCD module on startup, as its microprocessor has to initialize as well. 150mS should be enough for most devices.
Device = 18F4520 Clock = 20 // some LCD options... #option LCD_DATA = PORTD.4 // Assign the LCD connections #option LCD_EN = PORTD.3 // #option LCD_RS = PORTD.2 // // 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
Video Tutorials
Video tutorial on how to Mod an LCD for breadboards and use them
|
|
| Last Updated ( Friday, 24 April 2009 10:22 ) |
Whos Online
- Jon Chandler
- andyo
Forum Activity
REALISTIC LED candle flicker - mrdeb Wednesday, 10 March 2010 05:48 - [0 replies]
the LCD demo hello world - mrdeb Wednesday, 10 March 2010 05:41 - [29 replies]
USB problem - jon chandler Tuesday, 09 March 2010 11:31 - [3 replies]
Servo Module - andyo Tuesday, 09 March 2010 03:39 - [3 replies]
pic to ps2 communication - roshan Friday, 05 March 2010 01:30 - [7 replies]
Way Off Topic: Worldwide Ignite Week - jon chandler Wednesday, 03 March 2010 20:33 - [4 replies]
PIC USB with C and Visual C++ Project - hop Tuesday, 02 March 2010 21:49 - [0 replies]





I was thinking of battery with powered routers or powered for every...
50 rooms - wow. The XBee modules are very easy to use but I'm not ...
Thanks AndyO. What I have to do is design a device to monitor temp...
The circuit used for the remote sensor can be found here: [url]http...
plz i need help do u know from where i could download it or how cou...
hello everyone i'm trying to finish my final project and i want to ...
Thanks that was helpful
There is a BlueTooth module available. If you used this, you can s...