Hi,
I wrote a program and wanted to run it on the pic16F876. Is there any special features needed to deactivate ?
My crystal is not even oscillating. I put the Vdd and the 2 Vss as the specsheet including MCLR to high with a resistor. Is that enough to make it oscillate, assuming it has a crystal and capacitor ?
DEFINE OSC 20 'use external 20mhz crystal
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 1 ' Set LCD Register Select bit
DEFINE LCD_EREG PORTB ' Set LCD Enable port
DEFINE LCD_EBIT 0 ' 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 2500
DEFINE LCD_DATAUS 250
DEFINE CHAR_PACING 2000
Pause 1000 ' Wait 1 second
TRISB=0
loop:
lcdout $FE,1, "Number ", dec 55
pause 500
goto loop
end
Bookmarks