LCDOUT custom commands - how to?


Closed Thread
Results 1 to 40 of 69

Hybrid View

  1. #1
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default Time to go back to basics I think

    There are basically two things that could be stopping you display from working.

    1. a problem with the PIC

    2. a problem with the display.


    To test 1....

    I would assign an entire 8 bit port for the LCD eg PortB (just for test purposes) and connect LEDs to each bit. Also put LEDs on the pins of another port that you will use for the control lines.

    Have a count run from 0-255 and output that to port B and observe that the LEDs count up correctly.

    Likewise output all possible combinations on the pins you use for the control lines just to ensure that all your output pins are correctly configured and can successfully light the LEDs.


    to test 2......

    Once you know that you PIC is capable of driving all the required lines, connect up the LCD display in 8 bit mode and then try all the commands to get it working. Once you have it working it should be simple to change to 4 bit mode.

    As far as I can see the only difference between 4 and 8 bit mode is in the initialisation which tells the LCD how it is connected. All subsequent commands should be the same, the only difference being that instead of sending a byte you have to send two nibbles instead which obviously takes twice as long.

    I have had a further thought about something that caught me out a few weeks ago when changing to a different display. I didnt have the R/W line connected to the PIC, but I also didnt have it tied to anything either. The origianl display must have had some form of internal pullup/pulldown resistor as it didnt mind about the floating pin but the new display would not do anything until correctly terminated.

    The second datasheet you mentioned for the actual controller chip has full examples of initialising in 8 and 4 bit mode so all the actual values you need are listed there. Ignore the fact that it is written in 8051 assembler just use the values in your PBP code. Being 44780 compatable means that it should work fine with LCDout so my bet is a misconfiguration of the PIC or a wiring fault unless you are really unlucky and have killed a piece of hardware.
    Keith

    www.diyha.co.uk
    www.kat5.tv

  2. #2
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default Fuses!!!! yes, it works really :-)

    Wow Joe S!!

    Yes it works; I'm very surprised indeed. I was told it was not possible with ICProg.

    I'm using PBP. Where did you find the correct syntax to use for every fuses?



    Keith,

    You're right. Let's go on with method. I'm starting to check as you suggest. Will come back when done.
    Roger

  3. #3
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default PIC tested = ok

    Hi Keithdoxey,

    I tested the PIC with my logic probe and hope doing so is fine (please let me know if it is not a good practice - I'm not an electronician).

    My PIC looks okay so far.

    Going now to the second step: check the LCD.

    Come back later.
    Roger

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by flotulopex
    I'm using PBP. Where did you find the correct syntax to use for every fuses?
    If you're using PM, open m16f88.inc file in c:\pbp\inc folder, they're located at the top.

    If you're using MPASM, open p16f88.inc file in C:\Program Files\Microchip\MPASM Suite folder. They're located at the bottom.

    There's a huge thread Here about that.
    Steve

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

  5. #5
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default Got so much to learn today...

    Thanks Mister_e,

    Fuse config is now clear to me ;-)

    Back to my display, I did what keithdoxley suggested but still it's not working.

    Finally, I connected my usual display on the PIC with an 8 bit data-bus. It works fine so, for sure, the PIC is not the problem.

    I have contacted ELECTRONIC ASSEMBLY and asked for more informations. I still can't believe I would have broken both displays...

    For normal use, the display must be set in Read or Write (R/W)?

    One last thing about the contrast control: would be the syntax to change the contrast's setting "LCDOUT $FE, $74"? According to the table (Initialise_LCD.bmp) in post #10, it should but how to change the amount of contrast???
    Last edited by flotulopex; - 25th November 2006 at 14:19.
    Roger

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


    Did you find this post helpful? Yes | No

    Default

    Thanks Mister_e,

    Fuse config is now clear to me ;-)
    You're welcome, It's always handy to have theses in your code.

    One last thing: for normal use, the display must be set in Read or Write (R/W)?
    Unless you want to read from your LCD (Wich i still don't understand why anyway) you should set the PIN to 0, low, gnd.
    Steve

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

  7. #7
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default LCD Write?

    Yes, really handy. Thanks a lot again.

    I would appreciate to find some more explanations on how to read (understand) and write to the display the configuration commands such as LCDOUT $FE, xxx.

    Merci encore.
    Roger

  8. #8
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default Contrast to be set - yes, but how?

    I've got an answer from ELECTRONIC ASSEMBLY (EA). They say this display is fully HD4470 compatible.

    So, until the contrast (all the display in fact) is not initialised properly, nothing will happen on the display.

    I've got this table extracted from the PDF file I inserted in my first post:


    This example is for a 8 bits display. I would prefer to use it with 4 bits but if it is easier to start this way...

    Can somebody tell me what syntax I have to use to modify the contrast settings?

    Is it LCDOUT $FE, $74? I tried this already but nothing happened.

    I don't understand how to use this table. Could somebody explain me please?

    BTW, EA also sent me some assembly examples (see attachments); for those who understand this, it may help, maybe. Unfortunately, I don't know assembler...

    Mister_e, see the picture? Thanks you, again ;-)
    Attached Files Attached Files
    Last edited by flotulopex; - 26th November 2006 at 12:34.
    Roger

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 : 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