Lcd pin out help


Closed Thread
Results 1 to 16 of 16
  1. #1
    smeghead's Avatar
    smeghead Guest

    Default Lcd pin out help

    Not sure if this is the right part of the forum fer this , i recently purchased some lcd displays from evilbay, and wondered if anyone has the connection pinouts, ive searched for a datasheet all to no avail, im waiting for the seller to email the diagrams but dont hold out much hope

    the markings on the modules are as follows

    1st one 4DMC-2021 STLDN D020S

    2nd one 4GLM-12232

    many thanks in advance

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Does it look anything like the one in the manual under LCD, 14 or 16 pins?

    If so then just try that set up???
    Dave
    Always wear safety glasses while programming.

  3. #3
    smeghead's Avatar
    smeghead Guest


    Did you find this post helpful? Yes | No

    Default

    16 pin, 2 rws of pins 1 row numbered odd other row numbered even, will try the pins as in the manual and see if that works


    many thanks for your prompt responce

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


    Did you find this post helpful? Yes | No

  5. #5
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    4DMC-202-1

    Datasheet is from the same place Darrel points to.
    http://www.esnips.com/doc/c88ddf19-9...d83cfe251/4dmc

    20X2 character display. KS0076B controller.
    Wisdom is knowing what path to take next... Integrity is taking it.
    Ryan Miller

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    I don't know about G-LCD's but recenty I had an issue with an 2x16 LCD from Winstar.

    All known LCD's I 've used up to this moment had the #1 pin as GND and #2 pin as Vdd. The Winstar has the power supply in the opposite order! So read the manuals and Data Sheet is still valid!

    Also I used to ground the contrast pin as it was not necessary to adjust it. All LCD that I got this month need to be adjusted through a trimmer! And I did not put that thing on the PCB... :-(

    Ioannis

  7. #7
    smeghead's Avatar
    smeghead Guest


    Did you find this post helpful? Yes | No

    Default

    many thanks again everyone, i have now got the top one connected and it displays 1 row of black squares, i tried the lcd test code but am getting no joy,
    so i reprogrammed a simple light an led code which works in the velleman programmer/test board but doesnt seem to work on breadboard, I think this is down to my stupidity,i think the lcd test is written using an external xtal, i've reread the manual but cant seem to work out how to use the internal oscillator on the 16f628a, will have another play when i've calmed down :lol:

    Oh and i exploded a pic earlier, got a new power supply from maplins, read the destructions ,dialed in 5v lcd was blank so turned up the current and the voltage dropped to 3v so adjusted the voltage to get 4.5v, then adj the current a bit , the voltage shot up to 25v and bang.

    still these thing happen

    again many thanks to everyone for replying

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Do you have a pot/trimmer connected to the contract pin of the LCD?

    Oh and i exploded a pic earlier, got a new power supply from maplins, read the destructions ,dialed in 5v lcd was blank so turned up the current and the voltage dropped to 3v so adjusted the voltage to get 4.5v, then adj the current a bit , the voltage shot up to 25v and bang.
    I have said it before and I will say it again.
    Always have safety glasses on while programming
    Dave
    Always wear safety glasses while programming.

  9. #9
    smeghead's Avatar
    smeghead Guest


    Did you find this post helpful? Yes | No

    Default

    nope had the contrast pin to 0v


    Quote Originally Posted by mackrackit View Post
    Do you have a pot/trimmer connected to the contract pin of the LCD?


    I have said it before and I will say it again.
    Always have safety glasses on while programming
    think i will from now on :lol: even the dog jumped

  10. #10
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    So, do you think that using an 7805 is an option? So even if you have a 100Volt/100 Amp Power supply, your PIC circuit will be a bit safer.

    Ioannis

  11. #11
    smeghead's Avatar
    smeghead Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis View Post
    So, do you think that using an 7805 is an option? So even if you have a 100Volt/100 Amp Power supply, your PIC circuit will be a bit safer.

    Ioannis
    i had one on the board but didnt connect it, simply a case of stupidity on my part :lol:

  12. #12
    smeghead's Avatar
    smeghead Guest


    Did you find this post helpful? Yes | No

    Default

    with the help from forum members and a lot of reading i managed to get the lcd working, again my stupidity came into play ,i defined the 16f628a to use the internal osc but it would not work ,so put an external xtal in the circuit and it worked. so thanks again

    a new question i want to use a 1 wire temp sensor as per the example code, now i know i can define the lcd to port b, but the bit i cant seem to get my head around is how to move the lcd pins db7 this shows as porta.3 in the sample code so i assume it will want portb.3 if i move the lcd to portb, also the e line shows as portb.3 in the sample code, so am i right in thinking i can move the e line by using the following and specifing an unused pin say portb.5 i.e

    Define LCD_EREG PORTb
    Define LCD_EBIT 5

    another thing i cant get to grips with is displaying 2 seperate pieces of info one a line ,

    say
    fan1 on fan2 off
    i plan on using 4 different gosubs with an lcdout to show the 4 states of the fan,

    is there any way to make the on and off words appear as say

    fan1 (a) fan2 (b)

    where (a) and (b) say off or on by using only 1 lcdout command

    can i use something like
    lcdout $fe, 1
    pause 500
    lcdout fan1 (a) fan2 (b)
    if temperature =21 then let (a)=on and (b)=off
    if temperature =23 then let (a)=off and (b)= on

    lastly how can i display a custom character more than once on a line ie if i make a smiley and want to use it 6 times (its say written to the lcd in the first memory slot)

    LCDOUT $fe,$c0,0,0,0,0,0 'write smiley six times
    when i tried it it just wrote it the once

    i hope this makes sence to someone
    many thanks in advance

  13. #13
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Code:
    LCDOUT $fe,$c0,0
    LCDOUT $fe,$c1,0
    LCDOUT $fe,$c2,0
    LCDOUT $fe,$c3,0
    LCDOUT $fe,$c4,0
    LCDOUT $fe,$c5,0
    LCDOUT $fe,$c6,0
    What does "smeghead" mean?
    Dave
    Always wear safety glasses while programming.

  14. #14
    smeghead's Avatar
    smeghead Guest


    Did you find this post helpful? Yes | No

    Default

    many thanks for the reply ,erm me username i'll pm you :lol:

  15. #15
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    The four data lines (4 bit mode) have to be on the same port going from 0-3 or 4-7.
    The othe two lines can be anywhere.
    Example:
    Code:
    DEFINE LCD_DREG     PORTC
    DEFINE LCD_DBIT     0
    DEFINE LCD_RSREG    PORTD
    DEFINE LCD_RSBIT    1
    DEFINE LCD_EREG     PORTD
    DEFINE LCD_EBIT     0
    DEFINE LCD_BITS     4
    DEFINE LCD_LINES    2
    DEFINE LCD_COMMANDUS    2000
    DEFINE LCD_DATAUS   50
    This is all standard.
    Darrel has a trick called LCD AnyPin that does as the name implies. Non standard

    can i use something like
    lcdout $fe, 1
    pause 500
    lcdout fan1 (a) fan2 (b)
    if temperature =21 then let (a)=on and (b)=off
    if temperature =23 then let (a)=off and (b)= on
    Try something like
    If temperature is whatever gotsub a subroutine.
    Dave
    Always wear safety glasses while programming.

  16. #16
    smeghead's Avatar
    smeghead Guest


    Did you find this post helpful? Yes | No

    Default

    cheers again have already wrote 4 subroutines for the various temperature fan states . just wondered if i could do it the other way will have a search for darrels ant pin routine

Similar Threads

  1. Is this a K Type sensor?
    By jessey in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 21st November 2009, 13:55
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  3. DS1820 with 16f688
    By jessey in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 23rd May 2009, 05:07
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  5. Another RTC, DS1287
    By DavidK in forum Code Examples
    Replies: 0
    Last Post: - 12th December 2006, 17:07

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