need serial 20x4 lcd code example


Closed Thread
Results 1 to 10 of 10
  1. #1
    Join Date
    Oct 2013
    Posts
    4

    Default need serial 20x4 lcd code example

    i use pic16f628a or pic16f877a with serial lcd 16x2 or 20x4 (picaxe oled).

    serout PortA.0,0,["Hello"]

    It works OK with 16x2 serial lcd.
    Nothing with serial 20x4.... I see hieroglyphs...
    Also the same with sumalation in ISIS profesional....- 16x2 OK - "Hello", 20x4 - x v f g 5 h ))
    Do i need to make any different settings for serial lcd 20x4 ???

    Thank you for any example how to start serial 20x4.

    Saulius

  2. #2
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: need serial 20x4 lcd code example

    I would be certain there are differences in code. Why not post yours so we can see what needs to be changed?

    OBTW nothing is not same as hieroglyphs.

  3. #3
    Join Date
    Oct 2013
    Posts
    4


    Did you find this post helpful? Yes | No

    Default Re: need serial 20x4 lcd code example

    Here is my code:
    main:
    pause 1000 ' wait for the LCD to startup
    serout PortA.0,0,[$FE,$01] ' clear the screen
    serout PortA.0,0,["Hello world !"] ' send string “Wherever you go”
    serout PortA.0,0,[$FE,$C0] ' move the cursor to the 2nd line
    serout PortA.0,0,[" Here we are "] ' send string “ there you are ”
    pause 1000 ' pause for a second
    goto main ' loop

    Picture what i see is bellow.

    Name:  serial 16x2 and 20x4 problem.jpg
Views: 1642
Size:  776.7 KB

  4. #4
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: need serial 20x4 lcd code example

    I don't see your configs or defines. That's usually where the issue lies.

    This linkhttp://www.picaxe.com/docs/axe134.pdf has a test program. Did that work?
    Last edited by AvionicsMaster1; - 7th October 2013 at 16:53. Reason: eliminated stupid comments by me

  5. #5
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default Re: need serial 20x4 lcd code example

    Saulius,

    That has been done before by Darrel. Check this link

    http://www.picbasic.co.uk/forum/show...=2388#post2388
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  6. #6
    Join Date
    Oct 2013
    Posts
    4


    Did you find this post helpful? Yes | No

    Default Re: need serial 20x4 lcd code example

    It works fine with picaxe 08M2 and 20X2 i use. Also ok in parallel mode with pic. Only a problem conecting 20x4 to pic16f628a or 877a in serial.
    For 16x2 i do not use any config or define settings and it works ok. Maybe you know what settings shoud i try??

  7. #7
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: need serial 20x4 lcd code example

    Have you tried

    main:
    pause 1000 ' wait for the LCD to startup
    serout PortA.0,4,[$FE,$01] ' clear the screen
    serout PortA.0,4,["Hello world !"] ' send string “Wherever you go”
    serout PortA.0,4,[$FE,$C0] ' move the cursor to the 2nd line
    serout PortA.0,4,[" Here we are "] ' send string “ there you are ”
    pause 1000 ' pause for a second
    goto main ' loop

  8. #8
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: need serial 20x4 lcd code example

    Just curious if that actually worked?

  9. #9
    Join Date
    Oct 2013
    Posts
    4


    Did you find this post helpful? Yes | No

    Default Re: need serial 20x4 lcd code example

    • Hello, works with this. Instead of communication speed "4" i used "2" - and ok, works.
      Interesting, but it works only in simulation software i use.
      I programed pic16f628a and pic16f877a with the same sample - still nothing.
      Maybe i use wrong settings for programing pic (watchdog and others) or picaxe oled display inside has something protected....
      A few days ago i ordered serial display from ebay, just to be sure, what is wrong.

      main:

      pause 1000 ' wait for the LCD to startup
      serout PortA.0,2,[$FE,$01] ' clear the screen
      serout PortA.0,2,["Hello world !"] ' send string
      serout PortA.0,2,[$FE,$C0] ' move the cursor to the 2nd line
      serout PortA.0,2,[" Here we are "] ' send string
      pause 1000 ' pause for a second
      goto main ' loop

  10. #10
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: need serial 20x4 lcd code example

    Well, what is nothing. Nothing is not hieroglyphs.

    You do realize the 16f628 and the 16f877a have different footprints? Port a.0 on the 16f877a is pin 2 and on the 16f628 it's pin 17. They both are both analog so must be set to digital. I don't think serout setting it to output sets pin as digital.

    It would be best if you posted entire code and not snippet.

Similar Threads

  1. Pic18f452 with 20x4 LCD Help
    By djmachine in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 6th November 2008, 22:43
  2. 20x4 LCD and P18F2680
    By microuser in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 9th June 2006, 19:26
  3. Serial GPS to 20x4 LCD via PIC16f628-04
    By Almightyrastus in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 8th May 2006, 22:35
  4. having problems with Hantronix 20x4 lcd
    By Rhatidbwoy in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 22nd December 2005, 12:22
  5. LCD 20X4 connect with DS1820
    By jojokatada in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 9th March 2005, 11:04

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts