Well, good news/bad news. I finally solved my timing issue - I had to set OSCON in order for the clock to work properly. Turns out the PIC was running at about 4 Hz. (???)
Bad news is that after the LCD initializes I get no output. I tried the same program on a F628 and it worked fine. Back to the F88 and I get nothing. There must be something that's impeding the data flow to RB0-4, but I can't find anything.
Here's where I stand. Any suggestions?
Code:Define LCD_DREG PORTB ' Port for LCD Data Define LCD_DBIT 0 ' Use LOWER 4 bits of Port Define LCD_RSREG PORTB ' Port for RegisterSelect (RS) bit Define LCD_RSBIT 5 ' Port Pin for RS bit Define LCD_EREG PORTB ' Port for Enable (E) bit Define LCD_EBIT 6 ' Port Pin for E bit Define LCB_BITS 4 ' Using 4-bit bus Define LCD_LINES 2 ' Using 2 line Display Define LCD_COMMANDUS 2000 ' Command Delay (uS) Define LCD_DATAUS 50 ' Data Delay (uS) define osc 8 osccon = %11111100 option_reg = %11111000 intcon = %00000000 TRISB = 0 CMCON = 7 ' Turn Off Comparators ADCON1 = 6 'Turn Off Analogue (ALL DIGITAL) Check your data sheet to make sure this is the right number Pause 2000 ' Wait for LCD to startup Loop LCDOUT $FE,1,"Hello" Pause 500 LCDOUT $FE,1,"World" Pause 500 Goto Loop




Bookmarks