brentonw2004
New Member
Hello everyone. My first question is about my LCD. I have a Truly Brand, 16x1, 44780 compatible LCD screen that I am trying to get working with a PIC 16F628. I can get the LCD to come on whenever I plug the first three pins in and set the contrast, but only the first 8 digits/characters appear to be coming on. I cannot get it to respond to the microchip at all. I am trying to use 8-bit mode just to get the hang of things, and I am trying to program it with Pic Basic Pro with the LCDOUT command. I have the input pins of the LCD, DB0-DB7, hooked up on PORTB of my PIC. I have R/S hooked into PORTA.0, and E is hooked into PORTA.1. Here is the code that I am trying to use:
'************BEGIN SOURCE******************
INCLUDE "modedefs.bas"
DEFINE OSC 4
' Set LCD Data port
DEFINE LCD_DREG PORTB
' Set starting Data bit (0 or 4) if 4-bit bus
DEFINE LCD_DBIT 0
' Set LCD Register Select port
DEFINE LCD_RSREG PORTA
' Set LCD Register Select bit
DEFINE LCD_RSBIT 0
' Set LCD Enable port
DEFINE LCD_EREG PORTA
' Set LCD Enable bit
DEFINE LCD_EBIT 1
' Set LCD bus size (4 or 8 bits)
DEFINE LCD_BITS 8
' Set number of lines on LCD
DEFINE LCD_LINES 2
' Set command delay time in us
DEFINE LCD_COMMANDUS 2000
' Set data delay time in us
DEFINE LCD_DATAUS 50
Lcdout $FE, 1
PAUSE 500
loop:
LCDOUT $FE, 1, "Hello" ' Clear display and show “Hello
goto loop
'************END SOURCE******************
Everything compiles, and loads fine, but it doesn't do anything on the LCD. The only way I even know the LCD is on is to darken the contrast really dark and then you can see the first 8 boxes. Any advice?
Here is my second question. I have a PIC 16F819 that I am trying to program using Pic Basic Pro and MicroCode Studio Plus. I cannot find the 16F819 in the "target processor" menu of MicroCode Studio, but I have the .inc and .bas file for this chip in my Pic Basic Pro directory. Any advice would be greatly appreciated.
Thanks!
Brenton
'************BEGIN SOURCE******************
INCLUDE "modedefs.bas"
DEFINE OSC 4
' Set LCD Data port
DEFINE LCD_DREG PORTB
' Set starting Data bit (0 or 4) if 4-bit bus
DEFINE LCD_DBIT 0
' Set LCD Register Select port
DEFINE LCD_RSREG PORTA
' Set LCD Register Select bit
DEFINE LCD_RSBIT 0
' Set LCD Enable port
DEFINE LCD_EREG PORTA
' Set LCD Enable bit
DEFINE LCD_EBIT 1
' Set LCD bus size (4 or 8 bits)
DEFINE LCD_BITS 8
' Set number of lines on LCD
DEFINE LCD_LINES 2
' Set command delay time in us
DEFINE LCD_COMMANDUS 2000
' Set data delay time in us
DEFINE LCD_DATAUS 50
Lcdout $FE, 1
PAUSE 500
loop:
LCDOUT $FE, 1, "Hello" ' Clear display and show “Hello
goto loop
'************END SOURCE******************
Everything compiles, and loads fine, but it doesn't do anything on the LCD. The only way I even know the LCD is on is to darken the contrast really dark and then you can see the first 8 boxes. Any advice?
Here is my second question. I have a PIC 16F819 that I am trying to program using Pic Basic Pro and MicroCode Studio Plus. I cannot find the 16F819 in the "target processor" menu of MicroCode Studio, but I have the .inc and .bas file for this chip in my Pic Basic Pro directory. Any advice would be greatly appreciated.
Thanks!
Brenton