Shop OBEX P1 Docs P2 Docs Learn Events
serial parallax LCD pannells? — Parallax Forums

serial parallax LCD pannells?

msiriwardenamsiriwardena Posts: 301
edited 2021-06-06 17:48 in Propeller 2

I am trying to use old parallax 2 and 4 line pannels using P2.
I am able to send data via serial port but only "strings work".The command set using dec and hex
do not work.
example: when I send dec17 - the number 17 appear but command set it used "Turn back light on"

Any help to using command set appreciated.

PS: I am using jm_fullserialduplex and jm-serial P2objects.

Thank you.
Siri

Comments

  • I am in the middle of a very large P1 project that is due this week, so I didn't have a lot of time for this (about 5 minutes, tops). I took my old P1 object for the Parallax serial LCD and converted it to the P2. It doesn't use smart pins -- it bit-bangs the serial inline, so serial output blocks other code while running. This may get you going.

  • @JonnyMac
    Thank you very much for the new P2 lcd object.
    I did not expect such a quick reply.I am indeed very thankful for your help.

    siri

  • It compiles, but I did not have time to test it. Buyer beware.... :)

  • @JonnyMac

    I tried the p2lcd object and it did not work. I tried fix it but was not successful.
    I understand you are in the midst of a large project , after the completion of
    your project (no hurry, at your leisure, Iam just playing with the P2) ,please try to resolve the issues.

    Thank you very much.

    siri
    Ps- There were some P1 operators and tried fixing them but no luck.
    siri

  • mojorizingmojorizing Posts: 249
    edited 2021-06-09 17:28

    I converted the P1 Spin version of serial_lcd driver to Spin2 and used it in the attached project "ka_data block_to_serial_lcd_demo.spin2 ". It works on the Parallax 4x20 backlit LCD SKU 27979 Rev. E

  • @mojorizing
    Thank you, I will try your the P2 conversion of the serial.lcd.

    Thanks again,
    siri

  • @mojorizing

    Your conversions works well but why does it open a "debug screen"

    I have attached screen print.

    siri

    PS: using P2 edge board

  • This is a setting. You can compile without debugging, and then these screens won’t show up.

  • @deets

    Thank you.

    Siri

  • Good catch on the errant debug statements - I posted a new version of the "data block to serial lcd" code in post #6

    In this post is an example for using the Parallax Serial terminal to output to the LCD.

  • msiriwardenamsiriwardena Posts: 301
    edited 2021-06-25 11:22

    @JonnyMac
    The " jm_serial_lcd.spin2 " which you tried to help out did not compile in P2. -" with Buyer be aware precaution"
    I tried to fix the syntax with the ? appropriate P2 syntax. I got it to compile
    but the object is not working.
    I think I got some syntax wrong. I would appreciate if you take a look at it
    at your leisure so I can figure out what i did wrong.

    I am in no hurry just playing with old LCD' s, so look at it whenever you have time.

    Thank you very much

    Siri

  • JonnyMacJonnyMac Posts: 9,102
    edited 2021-06-26 21:41

    Sorry about that -- my fault for trying to be helpful when I was very busy and didn't have a serial LCD handy to test with.

    This version (23 JUN 2021 in the header) -- is updated and includes my latest numeric formatting routines. Give it a try. I found an old, SX-based serial LCD and verified that the attached code works.

    Attached is the object as it stands now after my effort to fix it.

    If you modify anything I've written, please take my name off of it before reposting. Thank you for understanding.

    Driver and support code updated -- see below.

  • @JonnyMac

    Thank you very much. The lcd object works great.
    I will try to remove the altered object.

    I am very sorry for posting the object with your name on it.
    I should have known better, I thought about putting my name
    but then I thought people will say I sole your code.
    If there is a next time I will take your name off any reposted material.

    Once again thank you very much for taking the time to help me.

    Siri

  • @JonnyMac

    I am trying to use the dec function in the jm-serial_lcd.

    i cannot find what i am doing wrong.
    I know this is a trivial issue but I cannot figure it out.
    Please look at the the program and show me the error.

    Thank you.

    siri

  • JonnyMacJonnyMac Posts: 9,102
    edited 2021-06-26 16:54

    Sorry... my fault. Again. Please replace jm_serial_lcd.spin2 and jm_nstr.spin2 on your system with the updated versions in this archive. I also beefed up your demo a bit.

    Reminder: Keep your formatting neat and orderly. It may not seem important for small programs, but it's (messy formatting) a bad habit that will make your life miserable when your programs grow to a couple thousand lines.

  • @JonnyMac

    Thank you very much for the new lcd object.
    I would have never found what the issue was, I
    now I can use the old LCD I have with the P2.

    Thank once again,

    Siri

  • @JonnyMac

    The jm_serial_lcd works great.
    I am using my old parallax lcd's - i have 3 of them
    programmed into the P2 edge board. I have learned from
    your animations how to write to the CGRAM and play
    animations.
    I learned to put a degree symbol to the temp readings of
    the old lcd displays.

    Thank you very much for all your help.

    Siri

  • I'm pleased to hear that things are going well.

Sign In or Register to comment.