after much more reading I came up with the following, but it still doesn't do anything.
I tested the board and pic by using the blinking led program and it works, and then modified that to alternativly turn on then off each led on port B (cycle through them) and that works, so the board works fine
I just cant figure out how to get the lcd working.
Anyone?Code:define device pic16F887,HS_osc Define OSC 8 adcon1 = 7 trisb=%00000000 '**************************************************************** '* Name : Test.BAS * '* Author : Lewis * '* Notice : * '* : All Rights Reserved * '* Date : 07/12/2009 * '* Version : 1.0 * '* Notes : * '* : * '**************************************************************** 'LCD DEFINATION DEFINE LCD_DREG PORTB ' Set LCD Data port DEFINE LCD_DBIT 0 ' Set starting Data bit (0) DEFINE LCD_RSREG PORTB ' Set LCD Register Select port DEFINE LCD_RSBIT 4 ' Set LCD Register Select bit, Port B.4 DEFINE LCD_EREG PORTB ' Set LCD Enable port DEFINE LCD_EBIT 5 ' Set LCD Enable bit, PORTB.5 DEFINE LCD_BITS 4 ' Set LCD bus size 4 bits DEFINE LCD_LINES 2 ' Set number of lines on LCD to 4 Lines DEFINE LCD_COMMANDUS 2000 ' Set command delay time in us DEFINE LCD_DATAUS 50 ' Set data delay time in us '******************************************************************************* pause 500 ' Wait for LCD to startup loop: Lcdout $fe, 1 ' Clear LCD screen Lcdout "Hello" ' Display Hello Pause 500 ' Wait .5 second Lcdout $fe, 1 ' Clear LCD screen Lcdout "World" Pause 500 ' Wait .5 second Goto loop ' Do it forever




Bookmarks