LCDOut Woes


Closed Thread
Results 1 to 13 of 13

Thread: LCDOut Woes

Hybrid View

  1. #1
    Join Date
    Jun 2008
    Location
    Arizona
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie View Post
    I see no LCD defines in your code... please put them in.

    They are in the PICBASIC manual and tons of examples on this forum. Set them up for the way you've got your LCD wired.

    Yes, contrast works on three different (brand new) LCD's. All LCD defines are now at default which is:

    PORTA.0 =Data bit 4
    PORTA.1=Data bit 5
    PORTA.2=Data bit 6
    PORTA.3=Data bit 7
    PORTA.4=R/S
    PORTB.3=Enable
    R/W is grounded

    I Disabled MCLR to eliminate the need for pull-up and hassle. I also tried TRISA=%00000000 and TRISB=%00000000. I will post anything you need. Pictures, or anything else. I can even switch to a breadboard and eliminate possibility of circuit board issues (proto board) although I have spent literally 20 hours soldering and de-soldering an looking at every little solder joint, then using PWM and other commands to make sure the chips are good and working properly.

    Thanks for your help on this. Very, very much appreciated...
    Last edited by LetTheSmokeOut; - 7th June 2008 at 07:21.

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Melanie is asking to see the part of your code that looks something like this;
    Code:
    DEFINE LCD_DREG     PORTB
    define LCD_DBIT     4
    DEFINE LCD_RSREG    PORTB
    DEFINE LCD_RSBIT    1
    DEFINE LCD_EREG     PORTB
    DEFINE LCD_EBIT     0
    DEFINE LCD_BITS     4
    DEFINE LCD_LINES    2
    DEFINE LCD_COMMANDUS    2000
    DEFINE LCD_DATAUS   50
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Jun 2008
    Location
    Arizona
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Melanie is asking to see the part of your code that looks something like this;
    Code:
    DEFINE LCD_DREG     PORTB
    define LCD_DBIT     4
    DEFINE LCD_RSREG    PORTB
    DEFINE LCD_RSBIT    1
    DEFINE LCD_EREG     PORTB
    DEFINE LCD_EBIT     0
    DEFINE LCD_BITS     4
    DEFINE LCD_LINES    2
    DEFINE LCD_COMMANDUS    2000
    DEFINE LCD_DATAUS   50
    Yes indeed. I am using the defaults explained in the PicBasicPro manual. It states that you don't need any defines if you are going to accept the defaults which are what I stated above. Is this not the case? I've used the program with LCD defines and without, but I can put them back into the program just to make sure. I have also used defines for a different pin setup that allowed PORTB.3 to be used as PWM output while the other pins ran the LCD.

  4. #4
    Join Date
    Jun 2008
    Location
    Arizona
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    This should be what I have setup at the moment:

    (CODE)
    DEFINE LCD_DREG PORTA
    define LCD_DBIT 4
    DEFINE LCD_RSREG PORTA
    DEFINE LCD_RSBIT 4
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 3
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 1
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50
    (/CODE)

  5. #5
    Join Date
    Apr 2008
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    try using with the configuration bits as watchdog timer off and brown out detect off, power up timer on and oscillator as XT

  6. #6
    Join Date
    Jun 2008
    Location
    Arizona
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by abidr View Post
    try using with the configuration bits as watchdog timer off and brown out detect off, power up timer on and oscillator as XT
    Ok thanks I will try that. I am still working on it. I wound one coil by keeping track of counts in memory and I already have problems, I missed about 30 turns out of 900 lol! My backpack LCD (Seetron) was purchased back in 1999 and I found it works but the 16C54 it uses is bad (sends out garbage on the 3rd character placement and further) so I will have to get back on the LCDout unit using 16F628.

    I will try this tomorrow and get back to you. Thanks very much for the input it is very much appreciated.

  7. #7
    Join Date
    Dec 2005
    Posts
    46


    Did you find this post helpful? Yes | No

    Default

    Hey LetTheSmokeOut,
    I'm still pretty newbie to this stuff, but I had 2 issues that drove me nuts for a while that you never kbnow, could be one of your problems. One was that, for some reason, no matter how many times I read the PBP manual for the LCDOUT command, my mind never saw the "Flags = 0" part. Some one here pointed that out to me and that fixed one issue. The other issue was that I was getting garbage displayed sometimes and I could not display a number ending in "0" or "P". It turns out that the voltage rating fro the LCD was a minimum of 4.7 V and with the resistor I was using, it was about 4.62 or so. I changed that resistor to get the voltage up in range and that solve my bizarre problems.
    Gary

Similar Threads

  1. Timer + rc5
    By naga in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th November 2009, 07:56
  2. need help in coding..
    By daphne8888 in forum mel PIC BASIC
    Replies: 1
    Last Post: - 19th March 2008, 07:31
  3. Help GPS read with serin
    By leinske in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 5th September 2007, 02:33
  4. Crystalfontz LCD
    By jman12 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 9th February 2007, 15:04
  5. having problems with Hantronix 20x4 lcd
    By Rhatidbwoy in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 22nd December 2005, 12:22

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