Serial LCD problem


Closed Thread
Results 1 to 38 of 38

Hybrid View

  1. #1
    mind's Avatar
    mind Guest


    Did you find this post helpful? Yes | No

    Default

    Hi Ralph,

    Nope...

    Best regards
    Richard

  2. #2
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Richard,
    could you post a schematic?
    (just the connections between the PIC and LCD)
    Last edited by NavMicroSystems; - 2nd August 2005 at 18:08.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  3. #3
    mind's Avatar
    mind Guest


    Did you find this post helpful? Yes | No

    Default

    Hi Ralph,

    Sorry, but I don't really have the tools to do a quick schematic.

    I have the PIC + LCD + Voltage regulator on a breadboard at the moment.

    The lines are as follows:
    data: pin portb.2 --> LCD data pin
    clock: pin portb.4 --> LCD clock pin
    chip select: pint portb.0 --> LCD CSB pin (LOW = selected)
    command: pin portb.1 --> LCD RS pin (LOW = command, high = data)

    The voltage regulator is a ultra-low dropout 5V +/- 0.025V and can supply
    enough current. It has tant caps on both sides of it of the correct size, and has been used for other projects.

    The LCD backlight is not connected (it is actually a seperate part), and the LCD uses 0.25mA when powered according to the spec sheet.

    Best regards
    Richard

  4. #4
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Richard,

    that looks good so far.

    How about the other pins on the LCD controller?
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  5. #5
    mind's Avatar
    mind Guest


    Did you find this post helpful? Yes | No

    Default

    Hi Ralph

    The other pins are tied to either GND, or 5V as per the circuit drawing that comes with the LCD. The LCD pdf can be downloaded here:
    http://www.lcd-module.de/eng/pdf/doma/dog-me.pdf

    I am using 5V, SPI interface, as every other pin on the PIC will be used (eventaully). At the moment, the extra PIC pins are not connected.

    Best regards
    Richard

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Sorry to butt-in here, but I noticed a few things that might cause you problems.

    Change OSCCON = %01101110 to OSCCON = %01101100. This jives with your particular oscillator configuration.

    You're writing to SSPCON configuring it for "SPI Master", but you're not using this hardware with shiftin/shiftout. Don't setup SPI hardware if you don't use it. This affects RB1, RB2, and RB4.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  7. #7
    mind's Avatar
    mind Guest


    Did you find this post helpful? Yes | No

    Default

    Hi Bruce

    I was originally using SEROUT, but then it was pointed out that for SPI mode, I should be using SHIFTOUT. I have since corrected it, and resposted the code.

    Later, I will attach a A/D on the SPI bus, so it is important to get these things right !

    Best regards
    Richard

  8. #8
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Richard,

    Bruce is absolutely right regarding the OSCCON and SSPCON settings.

    The latest code you have posted still contains incorrect values.

    (I had mentioned OSCCON earlier)

    I'm not sure if writing to SSPCON would have any negative effect, but as you are not using the MSSP module it doesn't help either, so just remove that line.

    To help any further I would have to have a closer look to the datasheet.
    (I will when I find time to)

    P.S.
    There is one more thing you could try:

    run some loops that set "contrast" and "bias" vlaues from $00 to $FF

    at some point "black boxes" should appear on the LCD.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



Similar Threads

  1. LCD problem with 16F628
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 19th September 2016, 08:28
  2. LCD serial backpacks
    By Archangel in forum Serial
    Replies: 67
    Last Post: - 30th December 2010, 04:51
  3. Newbie? Problem with LCD
    By lew247 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 7th December 2009, 19:48
  4. Please help with EDE702 - Serial to LCD interface
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th October 2008, 02:48
  5. LCD Problem
    By karenhornby in forum General
    Replies: 3
    Last Post: - 19th June 2008, 11:43

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