I have a doubt and would be grateful if you could suggest something. Im interfacing PIC18f4550 with uln2803 to drive relays which turns on suction pumps and solenoid valves. My problem is that LCD display messes up with display after switching relays. Ex i turn on relays for pumps and display “TEST IN PROGRESS” sometimes its fine other times it shows “UD50 ” in second line or “IN PROGRESS” in second line. where as im displaying test in prog in first line. Please help me out and reply today itself. Thanks
Hello it may be caused due to EMI (Electromagnetic Interference) problems.
If you are using same power supply for relay and LCD, make sure that you are using proper filtering capacitors.
Add proper power supply decoupling capacitors near to the VDD and VSS of PIC, LCD etc. Try with parallel combination of 10uF and 0.1uF. If it doesn’t works use 1nF, 100nF and 4.7uF in parallel.
If you are using long wires to LCD, reduce its length.
Make sure that there is sufficient delay after each LCD write.
Also check whether the clock frequency in the project settings and hardware / simulator is same.