How are the pin 3 (Contrast adjustment) connected?
Have you tried to change the LCD defines?
Code:‘ Set command delay time in us DEFINE LCD_COMMANDUS 1500 ‘ Set data delay time in us DEFINE LCD_DATAUS 44
How are the pin 3 (Contrast adjustment) connected?
Have you tried to change the LCD defines?
Code:‘ Set command delay time in us DEFINE LCD_COMMANDUS 1500 ‘ Set data delay time in us DEFINE LCD_DATAUS 44
The 628A has comparators on portA. Not sure about the 628. If it does look at this.
http://www.picbasic.co.uk/forum/showthread.php?t=561
Dave
Always wear safety glasses while programming.
hoi,
this works with 628 and Sharp LM16A211 at 4Mhz
2 rows of black squares if disp is not initialised ( at power up)
init the display first at startup
rgds
tb
pause 2000
DEFINE LCD_DREG PORTD 'dataport select'
DEFINE LCD_DBIT 0 'first databit
DEFINE LCD_RSREG PORTA 'lcd register port
DEFINE LCD_RSBIT 3 'register select bit'
DEFINE LCD_EREG PORTA 'enable poort'
DEFINE LCD_EBIT 1 'enable bit'
DEFINE LCD_BITS 4 'lcd bus size'
DEFINE LCD_LINES 2 'lcd lines'
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50 'data delay in µs'
'init display
LCDOUT $FE,1 ' clear LCD
pause 100 ' pauze 0,1s
LCDOUT $FE,2 ' cursor home
LCDOUT $FE,$0C ' cursor off
pause 1000 ' pauze 0,1s
' message
LCDOUT $FE, $80, " hello "
LCDOUT $FE, $C0, " ready "
pause 1000 ' pauze 0,1s
go on
I have try that code, and I cant get it work.
I have try to switch to a new LCD display, and still same problem.
Now i have try with PIC16F676, almost the same problem there, but this time the first row is showing black squares on initializing and then clear screen 1 sec later...
Here is the code for pic16f676:
@ device INTRC_OSC_NOCLKOUT
DEFINE LCD_DREG PORTC 'dataport select'
DEFINE LCD_DBIT 0 'first databit
DEFINE LCD_RSREG PORTC 'lcd register port
DEFINE LCD_RSBIT 4 'register select bit'
DEFINE LCD_EREG PORTC 'enable poort'
DEFINE LCD_EBIT 5 'enable bit'
DEFINE LCD_BITS 4 'lcd bus size'
DEFINE LCD_LINES 2 'lcd lines'
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50 'data delay in µs'
CMCON = 7
VRCON = 0
Pause 1000
'init display
LCDOut $FE,1 ' clear LCD
Pause 100 ' pauze 0,1s
flags = 0
LCDOut $FE,2 ' cursor home
LCDOut $FE,$0C ' cursor off
Pause 1000 ' pauze 0,1s
' message
LCDOut $FE, $80, " hello "
LCDOut $FE, $C0, " ready "
Pause 1000 ' pauze 0,1s
loopme:
Pause 1000
High PORTA.0
Pause 1000
Low PORTA.0
GoTo loopme
The 676 has ADC on port C. Might help to turn that off.
How do you have the LCD contrast pin connected?
Dave
Always wear safety glasses while programming.
you are using 4bit datatransfer to display.
are the 4 bits connected to DB4 to DB7 on display side ???
rgds
tiger_bel
Wiring diagram:
This is how the LCD display looks like for about 1sek before the screen goes blank again..
Thanks for all help so far![]()
Bookmarks