GHOOT -
I am assuming you are giving the LCD time to Initialize, and that your Define statements are correct for your setup.
I have used similar routines to save code space...Typically, it is a good idea to place your sub-routines after your END statment to avoid possible problems. I will give you a sample that works fine for me...PIC's take a lot of work to learn, but the learning is my favorite part! I am no expert, but I love working with microcontrollers very very much.
Display: 'Header
GoSub LCDClearHome 'Goto SubRoutine, then return
LCDOut "Good Job GHOOT" 'write to 1st line
LCDOut $FE, $C0 'Prepare to write to second line
LCDOut "GoSubs Work" 'Write to 2nd line
Goto Display 'Loop
END 'Always place subroutines after the end statement
SubRoutines:
LCDClearHome:
LCDOut $FE,1 'Clear LCD
LCDOut $FE, $80 'Move to beginning of first line
Return
Hope this helps you. Keep in mind that you can only nest subroutines 4-levels deep. I try to keep track placing headers such as: Sub Routines: .... Sub-Sub Routines: etc. Keep on learning and remember that we are only limited by our imaginations. Also...you can never comment your code too much!Your friend in the USA,
Carl
Bookmarks