LCD will not start


Closed Thread
Results 1 to 40 of 50

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    What happen if you tie the PORTB.3 to gnd via 10K (or less)?

    Did you tried to enable the BOD (brown out voltage) and disable the LVP (Low voltage programming) mode?

    If nothing work, maybe, you could add a little capacitor (0.1-1uF) between MCLR and GND... maybe.

    Schematic?
    Steve

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

  2. #2
    Join Date
    Mar 2003
    Posts
    41


    Did you find this post helpful? Yes | No

    Default LVP, BOD, etc

    Hi Mister-e.

    The PIC always starts. I know this because I have solenoids and switches and the switches always control the solenoids correctly. I think that rules out BOD or LVP issues. The 2 x 16 LCD always starts with the top row all black boxes and the lower row blank. When it starts properly, the LCD clears in about 500 mS and shortly afterwards the expected characters appear. When it does not start, the top line remains black and nothing appears on the lower line.

    I have tried 100 nf, 1uf and 10 uF as the MCLR capacitor with 10k to +5. Again the PIC always starts.

    The big 12 V 10 amp power supply is relatively slow to start and turning it on/off at the wall shows the LCD problem much more often than leaving the power supply on all the time and make/break the power line to the processor board. A scope shows the +5V rise time as 20-100 mS for on/off at the wall and under 1 mS for make/break to the 12 volt feed to the processor board. dV/dT is clearly part of the problem.

    A web search has turned up www.densitron.com and they have a discussion on timing aspects plus 4 bit and 8 bit modes. They make much of the tight timing restrictions between the Enable, RegisterSelect, data transitions and Read/Write lines and say this is a common problem with faster processors. sadly their app note is shot with typos and they do not define the pin functions (should RS be high or low during write? - they show it as both)

    I have the distinct feeling that PBP may be marginal with some brands of LCD at higher crystal speeds.

    Cheers
    Brian

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


    Did you find this post helpful? Yes | No

    Default

    try...

    Code:
    Start:
        Pause 1000
        LCDOUT $FE,1,"First"
        Pause 1000
        FLAGS=0
        LCDOUT $FE,1,"Second"
        pause 1000
        FLAGS=0
        LCDOUT $FE,1,"Third"
    Loop:
        Goto Loop
    What happen?

    I heard that some LCD may need up to 2 second to start correctly... but i never had one in my hand
    Last edited by mister_e; - 18th October 2006 at 00:34.
    Steve

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

  4. #4
    Join Date
    Mar 2003
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Nope mister-e - that does not do it

    Hi mister-e.

    Your code, after fixing the start/loop and flag issues, does not work on power up. It does work after a MCLR reset but so do all my attempts.

    I am trying now to implement the full reset sequence in code.

  5. #5
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    this might help - untried by me

    EDIT: My uploads do not appear to work?? - I put the file here as well
    http://www.cruxanalysis.com/temp/softwarereset.pdf
    Attached Images Attached Images  
    Last edited by paul borgmeier; - 18th October 2006 at 04:27.
    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

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


    Did you find this post helpful? Yes | No

    Default

    Brian,

    Which model LCD do you have from Densitron? They list 20 diffeent 2x16's.

    How long is the cable to the LCD?

    I looked at a couple of the desitron datasheets, they seem to be within the spec's for PBP's LCDOUT timing.

    And, RS can be either high or low during a write. It would be 0 for a command such as Clear Screen, or 1 to write data to memory.
    <br>
    DT

  7. #7
    Join Date
    Mar 2003
    Posts
    41


    Did you find this post helpful? Yes | No

    Default LCD frustrations

    Hi Darrel,
    I do not have any Densitron LCDs, The LCDs I am using (I have 3) have data sheets viewable at
    https://secure4.vivid-design.com.au/...ed/QP-5515.pdf
    They are Chinese as are most things these days. The supplied documentation is pretty sparse. I only mentioned Densitron as they were the first appnotes I found with any discussion of setup lines and handshake timings.

    I have tried all three LCDs and they all behave the same. I have tried cable lengths from 35 to 400 mm - no difference. The LCD will work most times after a direct MCLR reset. That is, power up, wait a few seconds then manually ground MCLR.

    I tried the following code which sets up the interface with Enable already high, waits a short while then takes Enable low for each of the data states described in the manual. I think I have these correct. This code clears the 'all black' LCD cells shortly after startup but then leaves the LCD bank - as though it is turned off in software despite my having the LCD ON bits enabled (or so I think). I have tried a range of PAUSE times to no avail.

    I also tried setting up the interface with Enable low, strobing Enable high for 100 uSecs then moving on to the next setup state. No joy there either.

    'attention
    for a = 0 to 1 ' call attention mode several times
    portd = %00010011 ' attention request
    pause 1
    portd = %00000011 'drop ENABLE
    pause 5
    next a

    'set 4 bit mode
    portd = %00010010 'set 4 bit mode
    pause 5
    portd = %00000010 ' drop enable
    pause 5

    'set function
    portd = %00010010 'first nibble
    pause 5 'allow setup time
    portd = %00000010
    pause 5
    portd = %00011000 'select 2 lines 5x7 character set
    pause 5 'allow setup time
    portd= %00001000 'low ENABLE
    pause 5

    'display OFF
    portd = %00010000 'first nibble
    pause 5 'allow setup time
    portd = %00000000 'low ENABLE
    pause 5
    portd = %00011000 '
    pause 5 'allow setup time
    portd = %00001000 'low ENABLE
    pause 5

    'display ON
    portd = %00010000 'first nibble
    pause 5 'allow setup time
    portd = %00000000 'low ENABLE
    pause 5
    portd = %00010001 '
    pause 5 'allow setup time
    portd = %00000001 '
    pause 5

    'set entry mode
    portd = %00010000 'first nibble
    pause 5 'allow setup time
    portd = %00000000
    pause 5
    portd = %00010110 '
    pause 5 'allow setup time
    portd = %00000110
    pause 5

    'display ON
    portd = %00010000 'first nibble
    pause 5 'allow setup time
    portd = %00000000
    pause 5
    portd = %00010001 '
    pause 5 'allow setup time
    portd = %00000001
    pause 5

    I will try with another brand of LCD I have at home tonight.

    Driving me crazy.
    Brian

Similar Threads

  1. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  2. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  3. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  4. Gps with 16f628
    By dragons_fire in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 8th June 2006, 03:38
  5. Dedicated LCD Controller question
    By chuckles in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 27th February 2006, 14:44

Members who have read this thread : 1

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