LCD's with Shift Registers, and LCDOUT


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Re: LCD's with Shift Registers, and LCDOUT

    I did have ANSEL=0 in the code which is shown below...compiled with PBP 2.60c. Is it possible my lcd is just defective?


    Code:
    define osc 4
    intcon=0
    ansel=0
    
    ;----[ Change these to match your LCD ]---------------------------------------
    LCD2x8_CLK VAR gpio.0 ; Clock - Pin 1
    LCD2x8_DAT VAR gpio.1 ; Data - Pin 2
    LCD2x8_E VAR gpio.2 ; Enable - Pin 5
    INCLUDE "PC064PYL.pbp" ; *** Include MUST be AFTER LCD Pin assignments ****
    ;----[ Your Main program starts here ]----------------------------------------
    LoopCount VAR WORD
    Main:
    LCDOUT $FE,$80,"Hello,",$FE,$C0,"From DT!"
    PAUSE 3000
    LCDOUT $FE,1 ; clear screen
    FOR LoopCount = 0 TO 65535
    LCDOUT $FE,$80, IDEC LoopCount
    LCDOUT $FE,$C0, IHEX4 LoopCount
    PAUSE 100 ; Slow it down, if you want
    NEXT LoopCount
    GOTO Main

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: LCD's with Shift Registers, and LCDOUT

    Quote Originally Posted by picone View Post
    Is it possible my lcd is just defective?
    I suppose it's possible, but I'd look for other problems first, like ...

    Do you have a pull-up resistor on the MCLR pin? Or have you disabled MCLR in the configs.
    DT

  3. #3
    Join Date
    Aug 2011
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Re: LCD's with Shift Registers, and LCDOUT

    Quote Originally Posted by Darrel Taylor View Post
    I suppose it's possible, but I'd look for other problems first, like ...

    Do you have a pull-up resistor on the MCLR pin? Or have you disabled MCLR in the configs.
    I set MCLR off and am using INTOSC_NOCLKOUT. I double and triple checked my wiring, and I did have a generic led blinking program running on this board to ensure I had a functioning setup. The lcd backlight comes on when I apply power....but no text.

    Is there anything else in the CONFIG that could prevent this from working besides MCLR and oscillator?

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default Re: LCD's with Shift Registers, and LCDOUT

    Hi,
    I must admit I'm not sure how or if the comparator interfere with the pins when the pins are configured as outputs. However I can't see the comparator pins being set to digital so it might be worth a try to add CMCOM0 = 7.

    I also don't see you setting the pins used to outputs but Darrels original code doesn't do it either so it's probably handles by the LCDOUT statement as normal ir the hijack routine. But again, might be worth a try configuring TRISIO properly.

    /Henrik.

  5. #5
    Join Date
    Aug 2011
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Re: LCD's with Shift Registers, and LCDOUT

    Quote Originally Posted by HenrikOlsson View Post
    Hi,
    I must admit I'm not sure how or if the comparator interfere with the pins when the pins are configured as outputs. However I can't see the comparator pins being set to digital so it might be worth a try to add CMCOM0 = 7.

    I also don't see you setting the pins used to outputs but Darrels original code doesn't do it either so it's probably handles by the LCDOUT statement as normal ir the hijack routine. But again, might be worth a try configuring TRISIO properly.

    /Henrik.
    CMCON0=7 did the trick! Thank you Henrik and Darrell for your help.

    On a separate and unrelated note..........how come Darrell's routines (i.e. Instant Interrupts, Slow PWM, LCDanypin, etc) haven't been incorporated into PBP yet? They must add about 50% more functionality to PBP but I'm surprised they aren't part of the software package.

  6. #6
    Join Date
    Jan 2011
    Posts
    3


    Did you find this post helpful? Yes | No

    Default Re: LCD's with Shift Registers, and LCDOUT

    Is it possible to make naginar's patch to work? I tried the schematic in proteus and I get an error telling me that the "HD44780 controller received command whilst busy".

  7. #7
    Join Date
    Jan 2011
    Posts
    3


    Did you find this post helpful? Yes | No

    Default Re: LCD's with Shift Registers, and LCDOUT

    I've managed to make it work with minor modifications and connecting E separately. Thank you.

Similar Threads

  1. LCDOUT custom commands - how to?
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 68
    Last Post: - 18th April 2015, 16:36
  2. Help with Circuit
    By Art in forum General
    Replies: 14
    Last Post: - 23rd December 2009, 13:21
  3. A/d 16f88
    By Steves in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 31st May 2009, 01:19
  4. PIC16F684 + LCD to use the 256bytes of EEPROM - HELP
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th March 2008, 14:19
  5. LCDout Command causes Interrupt!!??
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 31st March 2005, 04:18

Members who have read this thread : 2

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