Hi all,
After some recommendations from people here I got an LCD display and tried to program it. My program (attached below) is designed to write "Hello World!" to the top left corner of the display. It works in a simulator but not in real life -my 2x16 LCD display displays just one line (top) of black boxes, while the bottom line remains completely blank.
This is with the contrast voltage (pin 3) connected to 0V. I also tried a potential divider (as I don't own a variable resistor) with the two resistors equal (contrast voltage 2.85V, supply is 5V) but the entire display stays blank in this case.
The datasheet for the LCD display is **broken link removed**.
On power-on, the top line of the display fills "slowly" with boxes (it takes about 0.5sec - the boxes "fade in"), then nothing else happens. As part of the testing I increased the delay in the "artificial_delay" procedure (from 20 to 250, so up to about 375ms) to see if the display needed more time to switch on, but this doesn't seem to do anything.
I'd be grateful for any help, even if it is "your display is broken"
ahydra
lcd_sendcommand_nobusycheck
; sends a command to the LCD but doesn't check for busy status (used at initialisation)
; in: W = command
BCF STATUS, RP0
BCF STATUS, RP1
BCF D_LCDPORT, D_RS ; instruction input
BCF D_LCDPORT, D_RW ; write mode
MOVWF D_DATAPORT ; send data
BSF D_LCDPORT, D_EN ; prepare write command
CALL artificial_delay
BCF D_LCDPORT, D_EN ; execute write command
CALL artificial_delay
RETURN
hi,
Look at this image. Sorry about the quality, its a copy from my notes
Check the phase sense of the signals. RW.????
clear RS
-loop start-
set RW
wait a bit
set EN
wait a bit
clear EN
clear RW
read DB7
if DB7 set, go back to start of loop, else display is ready for another command
The code in my post above is my "send command" code, not my "check busy" code. The "check busy" code has RW high (check the ASM).
I'll try checking the busy status before and after, see if that makes any difference.
ahydra
... and inserted a bunch of NOPs in the program after each change of state of the Enable line. However, I still get the same thing..........ahydra
Post you code betweenhello to every one
well i problem with my code for lcd. i am using pic to drive the lcd
and using flash ram of pic to hold the data and the reading the ram and sending data
to lcd now the problem is that it is only displaying 'a' and 'b' for other char. lcd display is
blank.
so pls help me.....
sorry for delay
i am attchng the code
let me remind my problem
i am using pic16f877a
for drivng lcd
but the problem is that it is not displayng if buffer size increase 6 char
and no displyng 'c'
so help me
Error[113] C:\00000000.ASM 99 : Symbol not previously defined (DELAY5MSEC)
Error[113] C:\00000000.ASM 103 : Symbol not previously defined (DELAY1MSEC)
hi,
That dealy subroutine is not creating the prblm thats why i have not attach it so if u find any pblm in code so pls let me know
movlw clr_dis
call sendcmd
movlw ram_addr
call sendcmd
inc:
incf fsr,f ;increment fsr add.
incf test ;increment test reg. value
incf highram,f ;increment highram value
incf lowram,f ; increment lowram value
goto dis_string
incf lowram, f
btfsc status, c
incf highram, f
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?