LCD -- melabs sample program


Results 1 to 16 of 16

Threaded View

  1. #9


    Did you find this post helpful? Yes | No

    Default Re: LCD -- melabs sample program

    Ok, I give up. Hours spent on this. Maybe someone could be so kind as to look at the code and see why this doesn't function. Something simple perhaps. I realize the 16C72 is an antiquated part but I have a ton of them. I even used another LCD (yes hd44780's) -- even tried another xtal etc. Mclr is high to Vdd, ADCON1 is making pins digital. Changed the defaults because A4 isn't TTL on the 16C72 so used B7 and C7 for RS and E to avoid conflicts -- even did a TRIS on all the pins. Power supply is fine -- this is crazy.

    DEFINE OSC 4 '16C72
    ADCON1 = 7
    TRISA = %00000000
    TRISB = %00000000
    TRISC = %00000000

    DEFINE LCD_DREG PORTA
    DEFINE LCD_DBIT 0 'a0 thru a3
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 7
    DEFINE LCD_EREG PORTC
    DEFINE LCD_EBIT 7
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2

    Pause 1000 ' Wait for LCD to startup

    mainloop:
    Lcdout $fe, 1 ' Clear LCD screen
    Lcdout "Hello" ' Display Hello
    Pause 500 ' Wait .5 second

    Lcdout $fe, 1 ' Clear LCD screen
    Lcdout "World"
    Pause 500 ' Wait .5 second

    Goto mainloop ' Do it forever

    End
    Last edited by Michael; - 10th June 2017 at 22:49.

Similar Threads

  1. Lcd 16x2 circuit and sample program...
    By larzazral in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 22nd July 2012, 11:21
  2. melabs U2 programmer won't program 12F675
    By BrianT in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 21st November 2011, 01:14
  3. meLabs Program Header aid
    By boroko in forum General
    Replies: 0
    Last Post: - 13th November 2009, 09:37
  4. CTCSS Tone Decoder Sample Program
    By sozkarabacak in forum General
    Replies: 0
    Last Post: - 20th October 2009, 06:15
  5. DS1307 sample Program
    By Mark in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 29th September 2004, 02:25

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