Quote Originally Posted by HenrikOlsson View Post
...
Analog functions on PortE perhaps?
...
Hi Henrik,

Tried ADCON1=7 with no success.


Quote Originally Posted by HenrikOlsson View Post
...
Also, you say that you have a 20Mhz x-tal but then you DEFINE OSC 48, is that correct? I know the oscillator on the USB devices are a bit different and I'm not saying you've got it wrong but since it doesn't work perhaps it's worth looking into.
...
That's the way Darrel does it in his DT HID260 example.


Quote Originally Posted by HenrikOlsson View Post
...
Do a simple blink-a-led with a PAUSE 500 or whatever and verify that the timing looks OK.
...
That was the first thing I did with this chip when I couldn't get the LCD working.
Quote Originally Posted by Demon View Post
...
The LCD works fine, I used it for the Lab X1 examples I just added in Code Examples. I can get LEDs to blink back and forth, so I know the PIC can be programmed properly, but that's about it.
...

Quote Originally Posted by spcw1234 View Post
...
You may need to initialize the display by sending a clear screen command, then pause 500ms or more before trying to write to it.
...
Tried, still nothing on LCD.


Current code:
ASM
__CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
__CONFIG _CONFIG1H, _FOSC_HSPLL_HS_1H
__CONFIG _CONFIG2L, _PWRT_OFF_2L & _BOR_ON_2L & _VREGEN_ON_2L
__CONFIG _CONFIG2H, _WDT_OFF_2H
__CONFIG _CONFIG3H, _CCP2MX_OFF_3H & _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _MCLRE_ON_3H
__CONFIG _CONFIG4L, _STVREN_OFF_4L & _LVP_OFF_4L & _ICPRT_OFF_4L & _XINST_OFF_4L
ENDASM
DEFINE OSC 48
DEFINE LCD_DREG PORTD
DEFINE LCD_DBIT 4
DEFINE LCD_RSREG PORTE
DEFINE LCD_RSBIT 0
DEFINE LCD_EREG PORTE
DEFINE LCD_EBIT 1
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50

ADCON1 = 7
TRISD = 0
TRISE = 0

WSLOOP var byte ' Loop counter

PAUSE 1000
LCDOUT $FE,1
PAUSE 2000
LCDOUT $FE,1,"LabX1 18F4550"

PORTD = %00000001 ' Turn 1st LED on
pause 100 ' Short delay

CYCLE:
for wsloop = 1 to 7 ' Turn on next LED from right to left
PORTD = PORTD << 1
pause 100
next
for wsloop = 1 to 7 ' Turn on next LED from left to right
PORTD = PORTD >> 1
pause 100
next
GOTO CYCLE
END
The LEDs blink back and forth but still no love from the LCD.