I am using 18F452, 8 MHz crystal.
The LCD is connected as follows on my tutor board:
RS: RE0, EN: RE2, WR: RE1
D7 to D0: RD7 to RD0.
Accordingly I have changed the example line to:
LCD8_Config(PORTE,PORTD,0,2,1,7,6,5,4,3,2,1,0)
I have retained the rest of the program as it is.
Only squares on the 1st line appear. NOT the text message.
Kindly help.
bimbla.
8 bit LCD interface problem
Re: 8 bit LCD interface problem
Have you tried the example which comes with the compiler?
8 bit LCD interface
Yes, I have tried it with the example that comes with the compiler. The only line that I changed is the LCD8_Config line. The rest is retained the same.
Any suggestions are welcome.
bimbla.
Any suggestions are welcome.
bimbla.
8 bit LCD interface
Thank you. But I have gone through the basic.
I have taken to BASIC (for PIC development) and I am determined to get all my modules working.
(Blinking alternate LED is just complete.)
bimbla.
I have taken to BASIC (for PIC development) and I am determined to get all my modules working.
(Blinking alternate LED is just complete.)
bimbla.
Re: 8 bit LCD interface
PORTE is a rather strange port, I would not recommend users to use it for LCD. Have you tried PORTB, PORTD combination?
LCD problem
It is not all that strange. John Peatman also has done it using PORT E and PORT D. Besides it works with 'C' and should work with mikroBASIC also
Any way, since I have my hardware, can anyone post the code I should try , for my hardware config? PLEASE!
Thanks in advance.
bimbla.
Any way, since I have my hardware, can anyone post the code I should try , for my hardware config? PLEASE!
Thanks in advance.
bimbla.
8-bit LCD interface- Custom hardware
Code: Select all
' This code demonstrates the use of LCD library procedures and functions for
' displaying text on LCD (8- bit intrface)
' Custom hardware config: RS--> RE0, RW--> RE1, EN--> RE2, D0 to D7--> RD0 to RD7
'******************************************************************************
program LCD8_custom_test
im Text as char[20]
main:
ADCON1 = $07 ' PORT A & E as digital I/o's
TRISE = 0 ' PORTE is output
TRISD = 0 ' PORTD is output
LCD8_Config(PORTE,PORTD,0,2,1,7,6,5,4,3,2,1,0) ' Initialize LCD at PORTE and PORTD
LCD8_Cmd(LCD_CURSOR_OFF)
Text = "Welcome to:"
LCD8_Out(1,1,Text) ' Display Text 1st ROW, 1st Col
Text = "bimbla.com"
LCD8_Out(2,1,Text) ' Display Text 2nd ROW, 1st Col
end.
bimbla.