might be something to do with the memory on lower chips being "paged" ? but 18f is still 8 bit so I can't see how the memory is not paged unless it has bigger registers.
swordfish does not look promissing, no intuitive at all and not much in the way of help
Swordfish will NOT teach you basic! but too say there is not much in the way of help is silly take look at this from the program help menu
LCD Library
Module and Filename
LCD
LCD.bas
Interface
Subroutines and Functions
sub Cls ()
sub Command (pCommand as byte)
sub MoveCursor (pLine, pCol as byte)
compound sub Write (WriteItem)
compound sub WriteAt (pLine, pCol, WriteItem)
Compile Options
LCD_DATA
LCD_RS
LCD_EN
LCD_COMMAND_US
LCD_DATA_US
LCD_INIT_DELAY
LCD_RW
Overview
Supports Hitachi HD44780 LCD controller
Circuit Diagram
Example Code
// LCD...
#option LCD_DATA = PORTD.4
#option LCD_RS = PORTE.0
#option LCD_EN = PORTE.1
// import LCD library...
include "LCD.bas"
include "utils.bas"
// refresh speed...
const UpdateMS = 50
// initialise bit patterns...
// programmable characters are available that use codes $00 to $07.
// Create the bit patterns that make up the bars in the LCD's CGRAM.
// The vertical bars are made up of 8 identical bit patterns
const CGRAM(32) as byte = ($00,$00,$00,$00,$00,$00,$00,$00, // base bar
$10,$10,$10,$10,$10,$10,$10,$00, // 8 x %10000 = |
$14,$14,$14,$14,$14,$14,$14,$00, // 8 x %10100 = ||
$15,$15,$15,$15,$15,$15,$15,$00) // 8 x %10101 = |||
// output byte pRepValue times...
noinline sub Rep(pValue, pRepValue as byte)
dim Index as byte
Index = 0
while Index < pRepValue
LCD.Write(pValue)
inc(Index)
wend
end sub
// display the bar...
noinline sub Bargraph(pLine, pBarValue as byte)
const BASE_BAR = 0 // ASCII value of 0 bar (blank)
const FULL_BAR = 3 // ASCII value of ||| bar
const BAR_WIDTH = 16 // Max width in characters of bar
const MAX_BAR_COUNT = BAR_WIDTH * 3 // Max bar counts
dim NumberOfBars as byte
dim Balance as byte
dim BalanceChar as byte
NumberOfBars = pBarValue / 3
Balance = pBarValue mod 3
MoveCursor(pLine,1)
Rep(FULL_BAR,NumberOfBars)
Write(Balance)
Rep(BASE_BAR,BAR_WIDTH - (NumberOfBars + Min(Balance,1)))
end sub
// loop index
dim Index as byte
dim ValueA, ValueB,FadeA, FadeB as byte
// clear screen...
ADCON1 = $07 // PORTE as digital (LCD)
Write(CGRAM)
// display the bar
while true
for Index = 0 to 48
Bargraph(1,Index)
Bargraph(2,48 - Index)
delayms(UpdateMS)
next
for Index = 48 to 0 step -1
Bargraph(1,Index)
Bargraph(2,48 - Index)
delayms(UpdateMS)
next
Interface
sub Cls()
Clears the LCD display area
--------------------------------------------------------------------------------
sub Command (pCommand as byte)
pCommand - the command to be sent to the LCD. Valid arguments include cmdCGRAM, cmdDDRAM, cmdClear, cmdHome, cmdCursorOff, cmdCursorOn, cmdBlinkOn, cmdBlinkOff, cmdMoveLeft and cmdMoveRight
Issues a command to the LCD display
--------------------------------------------------------------------------------
sub MoveCursor(pLine, pCol as byte)
pLine - the LCD line
pCol - the LCD column
Moves the LCD cursor to position co-ordinates Line, Column
--------------------------------------------------------------------------------
compound sub Write (WriteItem)
WriteItem - a string, char, byte or byte array
Writes a string, char, byte or byte array to the LCD display at the current cursor position.
--------------------------------------------------------------------------------
compound sub WriteAt (pLine, pCol, WriteItem)
pLine - the LCD line
pCol - the LCD column
WriteItem - a string, char, byte or byte array
Moves the LCD cursor to position co-ordinates Line, Column and then writes a string, char, byte or byte array to the LCD display.
Compile Options
#option LCD_DATA
The LCD_DATA option sets the port or port pin for the LCD data bus. If a port name is given, without a pin qualifier, then the library defaults to a 8 bit data bus. Specifying a port pin will force the LCD library into 4 bit data mode. Valid pin qualifiers include 0 and 4. If the LCD_DATA option is not used, it defaults to PORTB.4
--------------------------------------------------------------------------------
#option LCD_RS
The LCD_RS option sets the LCD RS pin. If the LCD_RS option is not used, it defaults to PORTB.3
--------------------------------------------------------------------------------
#option LCD_EN
The LCD_EN option sets the LCD EN pin. If the LCD_EN option is not used, it defaults to PORTB.2
--------------------------------------------------------------------------------
#option LCD_COMMAND_US
The LCD_COMMAND_US option sets the delay value after a command write. Values can be ranged between 1 and 65535. If the LCD_COMMAND_US option is not used, it defaults to 2000.
--------------------------------------------------------------------------------
#option LCD_DATA_US
The LCD_DATA_US option sets the delay value after a data write. Values can be ranged between 1 and 255. If the LCD_DATA_US option is not used, it defaults to 50.
--------------------------------------------------------------------------------
#option LCD_INIT_DELAY
The LCD_INIT_DELAY option sets the delay (ms) before the module is initialised. Values can be ranged between 0 and 1000. If LCD_INIT_DELAY option is not used, it defaults to 100.
--------------------------------------------------------------------------------
#option LCD_RW
The LCD_RW is used to defince an optional device busy flag, rather than using fixed delays
And that's just one Module And the source code is available!! Just how much help do you need?
Plus of course there is the downloadable docs and the user forum.
?