The fuses are set right and the program performs exactly the same if I set it up for internal RC.
Here is the code with everything removed except the LCD related stuff. I cant show the actual code used in the product. It appears to be none code related though as this is a very stripped piece of code that should have no problems.
DEFINES are the same, ports are the same.
DEFINE OSC 10
DEFINE LCD_DREG PORTB ' Set LCD Data port
DEFINE LCD_DBIT 4 ' Set starting Data bit (0 or 4) if 4-bit bus
DEFINE LCD_RSREG PORTB ' Set LCD Register Select port
DEFINE LCD_RSBIT 2 ' Set LCD Register Select bit
DEFINE LCD_EREG PORTB ' Set LCD Enable port
DEFINE LCD_EBIT 3 ' Set LCD Enable bit
DEFINE LCD_BITS 4 ' Set LCD bus size (4 or 8 bits)
DEFINE LCD_LINES 2 ' Set number of lines on LCD
DEFINE LCD_COMMANDUS 2000 ' Set command delay time in us
DEFINE LCD_DATAUS 50 ' Set data delay time in us
DEFINE ADC_BITS 10
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 50
ADCON1 = %01000000
ADCON2 = %10111111
TRISA = %11111111 'All inputs
TRISB = %00000000 'PORTB.1 is output to flash heartbeat LED
PAUSE 1000
LCDOUT $FE, 1
LCDOUT $FE, 2, "HELLO"
LCDOUT $FE, $C0, "WORLD"
Loop:
PORTB.1 = 1
LCDOUT $FE, 1
PAUSE 500
LCDOUT $FE, 2, "LED 1"
LCDOUT $FE, $C0, "I=123456"
PAUSE 1000
PORTB.1 = 0
PAUSE 500
Goto loop
Bookmarks