Well the PIC's working with those settings - I went back to basics and wrote the following simple basic "hello world" type code.
Code:
ASM ; 18F2550/4550, 20mhz crystal
; __CONFIG CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L
; __CONFIG _CONFIG1H, _FOSC_HSPLL_HS_1H
__CONFIG _CONFIG2L, _PWRT_ON_2L
__CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
__CONFIG _CONFIG3H, _PBADEN_OFF_3H
__CONFIG _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
ENDASM
DEFINE OSC 48
clear
;----[LCD definitions]------------------------------------------------------
DEFINE LCD_DREG PORTB ' LCD Data port
DEFINE LCD_DBIT 0 ' starting Data bit (0 or 4)
DEFINE LCD_EREG PORTB ' LCD Enable port
DEFINE LCD_EBIT 5 ' Enable bit (on EasyPIC 5 LCD)
DEFINE LCD_RSREG PORTB ' LCD Register Select port
DEFINE LCD_RSBIT 4 ' Register Select bit (on EasyPIC 5 LCD)
DEFINE LCD_BITS 4 ' LCD bus size (4 or 8 bits)
DEFINE LCD_LINES 4 ' number of lines on LCD
DEFINE LCD_COMMANDUS 2000 ' Command delay time in us
DEFINE LCD_DATAUS 50 ' Data delay time in us
;---------------------------------------------------------------------------
counter var byte
for counter = 1 to 10
LCDOut $FE,2,"Number = ",dec counter
pause 10
next
This displays "Number = " and counts from 1 to 10 on the LCD
I've looked at the datasheet, but can't see anything obvious other than making the correct pins on Port C input or outputs (something I would of thought would of ported over from the code)
Any suggestions
Bookmarks