LCD cable length?


Closed Thread
Results 1 to 28 of 28

Hybrid View

  1. #1
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: LCD cable length? > 40 feet.

    Will do, thanks
    I think I'll have to.

  2. #2
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: LCD cable length? > 40 feet.

    A little problem...
    Installed the hijack routines and the two files in PBP directory.
    When I use the include file for lcdanypin, I get an error (using MPASM)
    for line 87 which is this line:
    LOW LCD_RS : HIGH LCD_E

    If I comment that out I then get a lot of errors

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


    Did you find this post helpful? Yes | No

    Default Re: LCD cable length? > 40 feet.

    LCD_RS and LCD_E should be declared in your program, along with the other LCD pins.
    Something like ...
    Code:
    ;----[ Change these to match your LCD ]--------------------------------------- 
    LCD_DB4    VAR PORTA.0 
    LCD_DB5    VAR PORTB.3 
    LCD_DB6    VAR PORTB.7 
    LCD_DB7    VAR PORTC.1 
    LCD_RS     VAR PORTD.4 
    LCD_E      VAR PORTA.1 
    LCD_Lines  CON 2 ' # of Lines on LCD, 1 or 2 (Note: use 2 for 4 lines) 
    LCD_DATAUS CON 50 ' Data delay time in us 
    LCD_COMMANDUS CON 2000 ' Command delay time in us 
    INCLUDE "LCD_AnyPin.pbp" ; *** Include MUST be AFTER LCD Pin assignments ****
    
    DT

  4. #4
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: LCD cable length? > 40 feet.

    Oops!

  5. #5
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: LCD cable length? > 40 feet.

    Bah! Still not having much luck here,
    I have the LCD routines working, and changed the LCD_anypin file as follows:
    Code:
    ;===============( DO NOT Change anything below this line )====================
    ;----[Virtual LCD Port --- 4bit mode]-----------------------------------------
    ASM
    LCD_Port_HNIB  macro           ; Port definition for LCD High Nibble
        Vbit   LCDCDFLAG, _LCD_RS  ; Select Command/Data register
        Vpin   4, _LCD_DB4         ; Put the High Nibble on the bus
        Vpin   5, _LCD_DB5
        Vpin   6, _LCD_DB6
        Vpin   7, _LCD_DB7
        PulseLow  _LCD_E, 5        ; pulse the Enable Pin for 2 us
      endm
    ;-----------------------    
    LCD_Port_LNIB  macro           ; Port definition for LCD Low Nibble 
        Vpin   0, _LCD_DB4         ; Put the Low Nibble on the bus
        Vpin   1, _LCD_DB5
        Vpin   2, _LCD_DB6
        Vpin   3, _LCD_DB7
        PulseLow  _LCD_E, 5        ; pulse the Enable Pin for 2 us
      endm
    ENDASM
    Since I'm only using a single display, hopefully that's all that is needed to enable the E pin for 5us.
    Still the display coming on at all after startup is hit & miss.
    It seems to come on straight after programming with the pickit2 (when powered by the pickit2,
    but doesn't want to come on when powered by any other means (or even by the pickit2 when not being programmed).

  6. #6
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: LCD cable length?

    Seems the problem is hardware Darrel!

    I wanted the pic to be able to switch on & off power to the LCD, so I used a BD649 transistor to switch the ground pin of the LCD display.

    The base is connected via 2.2K resistor to a spare pic pin, collector to the LCD ground, and emitter connected to the circuit ground.
    Then the idea was to set the pic pin connected to base high, and then wait the "PAUSE 1000" delay time for the LCD to be ready each time I used it.
    If I now short the emitter and collector of the BD649 while powering up, the display works every time (with LCD_anypin).

    I can then release the short between the transistor pins, and the display stays on! What's happening there?

    It's probably become obvious it's for a car circuit.
    The idea is to have the LCD (VFD) powered only when the car is started, but the pic circuit should be running all the time.

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


    Did you find this post helpful? Yes | No

    Default Re: LCD cable length?

    Maybe ...

    If the data/RS/E pins are not tri-stated while the power to the VFD is OFF, it could be trying to power it from those pins.
    Then when the transistor turns on, it doesn't activate the power-on reset in the display.

    When programming with the PICkit, those pins will always tri-state during programming.

    Just turning off the transistor without tri-stating all the pins first may not be enough.
    Then remember to clear the FLAGS variable, so PBP will re-initialize the display.
    DT

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