3 years, 6 months ago.

can I use same library on a RX TX pin instead of usb?

IN your library can I use normal TX pin too for just by writing SERIAL EXAMPLPE(TX, RX) ?

Question relating to:

Following is the link to the serial LCD which I want to use in my project:

https://www.sparkfun.com/datasheets/LCD/SerLCD_V2_5.PDF

posted by jayendra mishra 09 Jun 2016

Its an interesting interface because you're not really talking to the LCD directly, the PIC on the interface board takes care of stuff like initialization, splitting bytes etc.

posted by Oliver Broad 10 Jun 2016
Comment on this question

1 Answer

3 years, 6 months ago.

The library doesn't actually use USB rx or tx. The only reason the example program declares Serial pc(USBTX, USBRX); is so it has somewhere to send test results.

It could be rewritten to send test results to the actual display but that is unhelpful when setting up an unfamiliar dispay.

You could import the example program and point the "pc" serial somewhere else but it wouldn't do anything apart from sending the test results to a different destination.

If you take out the lines beginning "pc." then the example won't use serial at all but it will still operate a LCD.

I have a a one wire serial text LCD. So, I was wondering if I can use your library for that. If so, do I just need to change (USBTX, USBRX) to (TX, RX).

posted by jayendra mishra 08 Jun 2016

Try posting a link to the display datasheet. I haven't seen that option, I know of some display modules that support async serial but they are VFD not LCD and aren't supported by TextLCD.

Wim Huiskamp could probably give a definite answer.

posted by Oliver Broad 09 Jun 2016

Following is the link to the serial LCD which I want to use in my project:

https://www.sparkfun.com/datasheets/LCD/SerLCD_V2_5.PDF

posted by jayendra mishra 09 Jun 2016

Well I think the LCD lib could be extended to support it, but given the size of the base class it would be quite an undertaking. You shouldn't need it though as the PIC on the adapter PCB does most of the work so if you just declare a "serial" device on a suitable pin you can output text to it using printf, and all the LCD commands can be encoded as strings.

posted by Oliver Broad 10 Jun 2016