Ok still working on the same pic.
I finally got the oscillation going.
I wrote this program: (I have two questions)
1) why does the DEFINE OSC 20 not work in this case
2) In the program i wrote, NOTHING appears on the LCD
Can I put all the ldout pin on the B port ?
Pin 11 LCD on to PIN 25
Pin 12 --> Pin 26
Pin 13 --> Pin 27
Pin 14 --> Pin 28
anything software for the lcd that i dont have to do with the Pic 16f88 ?
@ DEVICE PIC16F876A , HS_OSC , WDT_OFF , PWRT_ON , BOD_ON , LVP_OFF , PROTECT_OFF
'HS 20mhz, watchdog off, powerup timer on, mclr external, brown out detect on, low volt program off , code protect off
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
loop:
lcdout $FE,1, "Number: ", dec 55
pause 100
goto loop
end
Have you got PGM (RB4? RB5?) pulled up or down, whichever it is?
I use them for my LCDout....




Bookmarks