after being able to initialise my LCD, I want to send data to it. The thing that I dont understand is that , when I send data it it displayed for a short amount of time and then it's gone. If I use a loop with a delay it is being displayed but refreshed often and it gives an overlay effect.
after being able to initialise my LCD, I want to send data to it. The thing that I dont understand is that , when I send data it it displayed for a short amount of time and then it's gone. If I use a loop with a delay it is being displayed but refreshed often and it gives an overlay effect.
My question is how I can make a stable view of data on the display? View attachment 45560
hi,
The LCD has inbuilt memory, it does not require refreshing.?
If its going blank, make sure you are not going back to the origin at 0x0000 and reinitialising the LCD.
hi,
My problem is I dont have a model for your PIC type.
I'll try to figure out a solution...
EDIT:
I changed the include file in your listing to 18F452 so that I can run it.
Without any other changes I get an LCD display as shown in this image from the Simulator.
hi,
Its a 2 line display, 1st line has 0 to 39 and second 40 to 79 RAM locations for the characters you write to the display.
Look at this clip from the d/s.
I have been checking thru your code, it looks OK. The only minor point is this.
Code:
bcf RS ; RS low
MOVLW 0x02 ; Clear displ,,, [B]this is HOME not CLR[/B]
movwf ctemp
call writeLCD
movlw 0x01 ; 1*100µs=100µs
movwf delay2
call delay
Thanks for the information , I tried to apply it :
Code:
; write sneaksz to the LCD
figure
;set DDRAM location
bcf RS ; write an instruction
call endelay ; this is necessary !
movlw 80h ; function set DDRAM address : " 00h , position 1" is this correct?
movwf ctemp
Call writeLCD ;write is to the LCD
; the start of the word
bsf RS ; send data
call endelay
MOVLW 53h ; send S
movwf ctemp
Call writeLCD
Hello ,
Well I can display data on the LCD now , as you said once before I need a negative voltage for the contrast. Well I found a program that creates a negative voltage from a PWM signal. I tested that and I get that negative voltage. The only thing is that the PWM pin CCP1(RC5) is for this and I use it to send data to the LCD ( I use PORTC).
PWM :
I'm going to rewrite the program for a 4 bit and use the RC5 as CCP1 supplied to the contrast input.
The only thing is that If i move data to the output , I only use 4 bits of PORT C and I don't want to use bsf/ bcf , it will take ages .
Is there some kind of trick for that? I opened another post for this .
Hello ,
Well I can display data on the LCD now , as you said once before I need a negative voltage for the contrast. Well I found a program that creates a negative voltage from a PWM signal. I tested that and I get that negative voltage. The only thing is that the PWM pin CCP1(RC5) is for this and I use it to send data to the LCD ( I use PORTC).
PWM :
I'm going to rewrite the program for a 4 bit and use the RC5 as CCP1 supplied to the contrast input.
The only thing is that If i move data to the output , I only use 4 bits of PORT C and I don't want to use bsf/ bcf , it will take ages .
Is there some kind of trick for that? I opened another post for this .