Serial LCD problem
c2h5oh
Posts: 3
Hello everybody,
I have a problem with communication with serial LCD (2x16 non-backlit) from Parallax. I tried to send serial data to this LCD many times, but without good results.
I don't use BS2 (I have two BS2 modules, but I think they are too expencive for beginners like me), I rather use PIC16f84a and PIC16F876a. I write program in MicroCode Studio and compile it with PicBasicPro.
My code for sending data to LCD looks:
serout portb.3, 19200, [noparse][[/noparse]"hello"]
Compiler writes, that code is all right and when I connect pin B3 to oscilloscope, there is a signal.
I tried to use all three bauds (2400, 9600, 19200), but still have no letters or display shows senseless symbols. Where could be a problem?
I usually use 4MHz crystal for timing - could be problem there?
Thanks very much for answer
I have a problem with communication with serial LCD (2x16 non-backlit) from Parallax. I tried to send serial data to this LCD many times, but without good results.
I don't use BS2 (I have two BS2 modules, but I think they are too expencive for beginners like me), I rather use PIC16f84a and PIC16F876a. I write program in MicroCode Studio and compile it with PicBasicPro.
My code for sending data to LCD looks:
serout portb.3, 19200, [noparse][[/noparse]"hello"]
Compiler writes, that code is all right and when I connect pin B3 to oscilloscope, there is a signal.
I tried to use all three bauds (2400, 9600, 19200), but still have no letters or display shows senseless symbols. Where could be a problem?
I usually use 4MHz crystal for timing - could be problem there?
Thanks very much for answer
Comments
Oh, wait, you DO see "senseless symbols", so you ARE getting communication.· So, are you properly selecting inverted vs. non-inverted mode?· Is that "19200" a correct value? (Because typically the "baud-rate selector" isn't a literal baud rate)
I always use same boudrate in program code and on LCD switch panel. I tried all three modes (2400, 9600 and 19200) with almost same results.
How can I choose between inverted and non-inverted mode?
What do you mean with "isn't a literal baud rate"? How can I found out, that for example baud-rate 9600 from code is similar (with adequate accuracy) to 9600 on LCD?
Thank you for answer
Well, in picbasic is necessary to select if I want baudrate n2400 or t2400 and at the top of programe write:
INCLUDE "modedefs.bas"
where are defined constants for symbols. For my LCD was necessary to select true values (noninverted).
Thank you allanlane5 for help.