Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 5 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:
1 Answer
8 years, 5 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 08 Jun 2016Try 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 09 Jun 2016Following 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 09 Jun 2016Well 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 10 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 2016Its 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