- This topic has 1 reply, 2 voices, and was last updated 13 years ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
|
Microcontroller › PIC › interfacing 16*2 LCD with pic 18F4550
I am trying to interface PIC 18f4550 with 16*2lcd in 8 bit mode.
I tried to use the same code as given on this site under pic microcontrller projects : http://www.engineersgarage.com/embedded/pic-microcontroller-projects/lcd-interfacing-text-circuit
the backlight is turning on but there is no display (I treid to write the characters “E G”)
I am using a 12Mhz clock for pic. LATB was connected for data transfer to lcd.
I am using mcc18 compiler for compiling the code on MPLAB and the project was successfully build (no errors)
I searched google but to no avail.
anyone who know how to overcome this , plz help.
Thanks in advance!
I think i have replied to this topic before. I wonder why its not showing up
anyway, i think the code is written for Mikro c, not c18.
if you’re using c18, there is a header file called “lcd.h”. this is where you set the required lcd pins.
use correct pragma directives for the configuration bits, oscillator,prescaler,wdt etc…
if you’re using MikroC, set the configuration bits in “project-> edit project”. the configuration bits are in the given code(commented). i’ve tested this code in MikroC and it works fine displaying on the lcd except for some glitches at the beginning.I use a 20Mhz crystal so i have to change the config bits. I add a 100ms delay at the beginning of my main() to overcome this.
pls correct me if i’m wrong and have a nice day