Driving a 2x16 LCD with only One Pin and 74HC595


Closed Thread
Results 1 to 21 of 21

Hybrid View

  1. #1
    Join Date
    Jan 2014
    Posts
    10


    Did you find this post helpful? Yes | No

    Smile Re: Driving a 2x16 LCD with only One Pin and 74HC595

    Thanks Darrel,

    now I'm wiser, again thanks.

    With the delays......

    To shift out one byte (Data or Command) after LCDInit it needs 4 Steps.
    One Step require a time nearly 910µs - 1ms.
    That makes nearly 4ms. => No extra Delay necessary. Right?

    The First 4 commands in the LCD_Init part needs only 2 Steps, because only the 4 upper bits shifted out.
    There, I'm agree with you that the delay should be longer.

    Could I place them here: ?

    Code:
    LCD_Init:
        ShiftOut_Steps = 1
        Char = $33 : gosub  LCDsendCOM : @  DelayUS 5000
                     gosub  LCDsendCOM : @  DelayUS 600
                     gosub  LCDsendCOM : @  DelayUS 600                
        Char = $22 : gosub  LCDsendCOM : @  DelayUS 600  ; Start 4-bit mode
        .........
        .........
        .........

    Further I tested again with other frequencies.
    I use 8 Mhz and a 20 Mhz quarz.
    Also there are, no problems. It runs stable.

    What I find out is that it is absolute necessary, to add an capacitor between +V and GND of the 74HC595.
    I use an 100nF.
    Otherwise you get sometimes error in displaying the right things.

    The capacitor for the Latch Pulse, I would change back to 2.2nF. And the capacitor for the 1 or 0 Pulse should be left at 4.7nF.

    Here are some picture make with my mini DSO.

    Clock Pulse
    Name:  Clock.jpg
Views: 24325
Size:  54.7 KB

    Pulse 1 or 0 with 2.2nF
    Name:  1_0 2.2nF.jpg
Views: 24445
Size:  57.6 KB Name:  1_0 2.2 nF.jpg
Views: 24274
Size:  55.7 KB

    Pulse 1 or 0 with 4.7nF
    Name:  1_0 4.7nF.jpg
Views: 24321
Size:  57.3 KB Name:  1_0 4.7nF_2.jpg
Views: 24191
Size:  55.6 KB

    Latch 2.2nF & Latch 4.7nF
    Name:  Latch 2.2nF.jpg
Views: 24378
Size:  57.3 KB Name:  Latch 4.7nF.jpg
Views: 24436
Size:  56.4 KB

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


    Did you find this post helpful? Yes | No

    Default Re: Driving a 2x16 LCD with only One Pin and 74HC595

    Quote Originally Posted by struppi81 View Post
    To shift out one byte (Data or Command) after LCDInit it needs 4 Steps.
    One Step require a time nearly 910µs - 1ms.
    That makes nearly 4ms. => No extra Delay necessary. Right?
    No, each byte whether it's a command or data requires two nibbles at 910 uS or 1.82 mS total.

    You need the delays!

    And I would leave the initialization timing the same.
    It only happens once per power-on, so you're not saving any time during normal operations.
    DT

Similar Threads

  1. 2x16 LCD Graphics :)
    By Art in forum General
    Replies: 51
    Last Post: - 13th June 2015, 12:02
  2. Need advice with LCD 2x16
    By fratello in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 26th April 2011, 07:58
  3. LCD via 74HC595
    By helloo in forum General
    Replies: 7
    Last Post: - 31st October 2010, 21:49
  4. 2x16 lcd problem
    By k3v1nP in forum mel PIC BASIC
    Replies: 11
    Last Post: - 30th October 2008, 05:46
  5. small 2X16 LCD
    By Ron Marcus in forum Off Topic
    Replies: 2
    Last Post: - 26th October 2007, 21:37

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