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


Results 1 to 21 of 21

Threaded View

  1. #4
    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

    Ok, you also have a multiplication in your code, which has the same problem of using System variables.

    Change it to this ...
    Code:
    ;    B = Char * 16               ' Lower 4 Bits Shift
        B = Char << 1
        B = B << 1
        B = B << 1
        B = B << 1
    Added:

    Name:  1-wire_LCD.jpg
Views: 25554
Size:  64.7 KB

    The 16F628A only has a 4Mhz internal oscillator, yours was running at 8Mhz, and your circuit wouldn't work at 4Mhz.
    I had to increase the capacitors to 4.7nF

    Code:
    @ DEVICE pic16F628A, intOSC_osc_noclkout, WDT_OFF, PWRT_OFF, BOD_OFF, MCLR_OFF
    DEFINE OSC 4
    
    Serial_Pin var PortA.3
    
    B0 var byte
    B1 VAR Byte
    
    OUTPUT Serial_Pin
    CMCON = 7
    B0 = 0
    B1 = 255
                          
    INCLUDE "One_Wire_74HC595.pbp" ; *** Include MUST be AFTER LCD Pin assignments * 
    
    ;----[ Your Main program starts here ]---------------------------------------- 
    LCDOUT $FE, 1
    LCDOUT $FE, 1, IHex 255
    Pause 2000
    
    Main:
        LCDOUT $FE,$80,"B0 = ",DEC B0,"    "  
        LCDOUT $FE,$C0,"B1 = ",DEC B1,"    "
        B0 = B0 + 1
        B1 = B1 - 1
        PAUSE 1000
    GOTO Main
    Last edited by Darrel Taylor; - 25th January 2014 at 19:52.
    DT

Similar Threads

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