LCD Serout


Closed Thread
Results 1 to 10 of 10

Thread: LCD Serout

  1. #1
    Join Date
    Nov 2006
    Location
    Murrieta, CA
    Posts
    62

    Talking LCD Serout

    Hello all,

    I am trying to test my LCD. I am using Demo Version of PBP and it will not allow me to use Include Files.

    If someone can compile the program below so that i may test my LCD i would appreciate it...

    Once i test my board Fully and know the PBP works i will purchase...

    also, if someone could even let me know if the program below will even work I would appreciate that too. I am using a Parallax 4x20 LCD @ 9600 Baud. I am using a PIC16F876A device.

    Thanks,
    Gary D.



    INCLUDE "modedefs.bas"

    SEROUT PORTA.5,N9600,["Hello World"]

  2. #2
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    If you look in the Modedefs.bas file or the "Serout" section of the PBP manual you will see that N9600 is defined as

    N9600 = 6 ' Driven Inverted

    Do either of the following

    N9600 CON 6 ' Driven Inverted to declare the constant

    or

    SEROUT PORTA.5,6,["Hello World"]

    Both should compile as you arent using any include files.
    Keith

    www.diyha.co.uk
    www.kat5.tv

  3. #3
    Join Date
    Nov 2006
    Location
    Murrieta, CA
    Posts
    62


    Did you find this post helpful? Yes | No

    Cool RE: LCD Serout

    Ok,

    Awesome...

    i have some activity but i think that the LCD is not getting enough Power.

    Thanks a lot for your help !!

    Gary D.

  4. #4
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by RFEFX
    i have some activity but i think that the LCD is not getting enough Power.
    ???

    If it wasnt getting enough power it wouldnt work.

    Assuming it is displaying the characters you sent then it probably just needs the contrast adjusting.
    Keith

    www.diyha.co.uk
    www.kat5.tv

  5. #5
    Join Date
    Nov 2006
    Location
    Murrieta, CA
    Posts
    62


    Did you find this post helpful? Yes | No

    Question Whoa !! Can Pic even program Parallax LCD?

    Ok.... I have been tying to program this LCD for the last couple days..

    Im using the PIC16F876A on PORTA.5

    The LCD Specs are Here

    when i send

    SEROUT PORTA.5,6,["Hello"]

    or when i send

    SEROUT2 PORTA.5,84,["hello"]


    I get nothing but the Cursor moves around a lot.

    Has anyone got code for the Parallax LCD 4x20 Module.
    There are 10 kinds of people. Those that know binary and those that do not.

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    you have to disable the analog A/Ds

    ADCON1=7

    And probably analog comparator
    CMCON=7
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    Join Date
    Nov 2006
    Location
    Murrieta, CA
    Posts
    62


    Did you find this post helpful? Yes | No

    Default Whoa !!

    Nope... Still nothing....
    There are 10 kinds of people. Those that know binary and those that do not.

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Is the Test mode work?

    If so, set it to 2400 Bauds,, reset the LCD module and try...
    Code:
    ADCON1=7
    CMCON=7
    HIGH PORTA.5
    PAUSE 500
    
    SEROUT PORTA.5,4,["Hello"]
    Z: goto Z
    AND this one
    Code:
    ADCON1=7
    CMCON=7
    
    DEFINE DEBUG_REG PORTA
    DEFINE DEBUG_BIT 5
    DEFINE DEBUG_BAUD 2400 
    DEFINE DEBUG_MODE 0
    
    HIGH PORTA.5
    PAUSE 500
    
    debug "Hello"
    Z: goto Z
    If i refer to their datasheet and the code example, it must be driven TRUE.

    Wich osc speed are your using?
    Last edited by mister_e; - 2nd December 2006 at 21:25.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  9. #9
    Join Date
    Nov 2006
    Location
    Murrieta, CA
    Posts
    62


    Did you find this post helpful? Yes | No

    Default Nope !

    LCD start up test works...

    I am running a 20Mhz Crystal Oscillator in HS mode...

    LCD is receiving data just not what i send it... Just a bunch of characters.



    Regards,
    Gary D.
    There are 10 kinds of people. Those that know binary and those that do not.

  10. #10
    Join Date
    Nov 2006
    Location
    Murrieta, CA
    Posts
    62


    Did you find this post helpful? Yes | No

    Exclamation SEROUT Problem Solved

    since I was using the PIC16F876A in HS mode with a 20Mhz Clock... I failed to define the OSC....

    ADCON1=7
    CMCON=7
    DEFINE OSC 20

    and there you have IT... Serial LCD works like a charm...

    Thanks to all that helped.
    There are 10 kinds of people. Those that know binary and those that do not.

Similar Threads

  1. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  2. Serout to serial servo
    By azmax100 in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 12th August 2009, 16:46
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30
  5. LCD with serout command
    By azispn99 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 6th April 2006, 13:08

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