LCD display icon


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Oct 2007
    Posts
    8


    Did you find this post helpful? Yes | No

    Default lcd display blinking word non stop

    thanks for the help....:-)
    by the way, i got something don't understand
    why my display on second keep fresh and fresh in LCD and it made it look like blinking?
    is the any problem with my LCD display or need to add extra component?
    i using standard connection according to picbasic manual book.
    my LCD model:BONA MC1602-17
    Last edited by cyber88; - 24th October 2007 at 04:30.

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


    Did you find this post helpful? Yes | No

    Default

    I would guess a PAUSE of 100 some place after the LCD updates will stop the blink.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Oct 2007
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    here is my programe
    '4Mhz Crystal is use

    DEFINE LCD_LINES 2

    hour VAR BYTE
    dhour VAR BYTE
    minute VAR BYTE
    second VAR BYTE
    scaler VAR BYTE
    i VAR BYTE


    Pause 100 'wait lcd startup

    hour = 0
    minute = 0
    second = 0
    scaler = 0



    OPTION_REG = %11010101
    INTCON = %10100000

    display:

    LCDOut $fe,1

    dhour = hour
    IF (hour//12) = 0 Then
    dhour = dhour + 12
    EndIF
    IF hour < 12 Then
    LCDOut DEC2 dhour,":",DEC2 minute,":",DEC2 second, "AM"
    LCDOut $fe,$c0,"Simple Test"
    Else
    LCDOut DEC2 (dhour - 12),":",DEC2 minute,":",DEC2 second, "PM"
    LCDOut $fe,$c0,"Simple Test"
    EndIF



    GoSub timing

    GoTo display

    timing:
    scaler = scaler + 1

    IF scaler > 61Then
    scaler = 0
    second = second + 1

    IF second > 59Then
    second = 0
    minute = minute +1

    IF minute > 59Then
    minute = 0
    hour = hour + 1

    IF hour > 24 Then
    hour = 0

    EndIF
    EndIF
    EndIF
    EndIF

    Return
    End

    where should i put the pause 100 and how i can display simple test in second line?
    it seem it run only time but didn't display simple test in second line

  4. #4
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cyber88 View Post
    here is my programe
    '4Mhz Crystal is use

    DEFINE LCD_LINES 2

    hour VAR BYTE
    dhour VAR BYTE
    minute VAR BYTE
    second VAR BYTE
    scaler VAR BYTE
    i VAR BYTE


    Pause 100 'wait lcd startup

    hour = 0
    minute = 0
    second = 0
    scaler = 0



    OPTION_REG = %11010101
    INTCON = %10100000

    display:

    LCDOut $fe,1

    dhour = hour
    IF (hour//12) = 0 Then
    dhour = dhour + 12
    EndIF
    IF hour < 12 Then
    LCDOut DEC2 dhour,":",DEC2 minute,":",DEC2 second, "AM"
    LCDOut $fe,$c0,"Simple Test"
    Else
    LCDOut DEC2 (dhour - 12),":",DEC2 minute,":",DEC2 second, "PM"
    LCDOut $fe,$c0,"Simple Test"
    EndIF

    pause 100 ' pause for .1 sec

    GoSub timing

    GoTo display

    timing:
    scaler = scaler + 1

    IF scaler > 61Then
    scaler = 0
    second = second + 1

    IF second > 59Then
    second = 0
    minute = minute +1

    IF minute > 59Then
    minute = 0
    hour = hour + 1

    IF hour > 24 Then
    hour = 0

    EndIF
    EndIF
    EndIF
    EndIF

    Return
    End

    where should i put the pause 100 and how i can display simple test in second line?
    it seem it run only time but didn't display simple test in second line
    Add pause 100 before GoSub timing

  5. #5
    Join Date
    Oct 2007
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    display:

    LCDOut $fe,1

    dhour = hour
    IF (hour//12) = 0 Then
    dhour = dhour + 12
    EndIF
    IF hour < 12 Then
    LCDOut DEC2 dhour,":",DEC2 minute,":",DEC2 second, "AM"
    LCDOut $fe,$c0,"Simple Test"
    Else
    LCDOut DEC2 (dhour - 12),":",DEC2 minute,":",DEC2 second, "PM"
    LCDOut $fe,$c0,"Simple Test"
    EndIF

    pause 100 ' pause for .1 sec

    GoSub timing

    GoTo display

    thanks for the help. but i still cannot get display Simple test in LCD second line.
    is it my coding problem or my connection to LCD(i use last 4 bit to connect).
    if i use
    LCDOUT "hello"
    LCDOUT $fe,$c0,"simple test"
    it come out as i want.but with the above coding, it didn't show out.

  6. #6
    Join Date
    Jun 2006
    Location
    Greece
    Posts
    302


    Did you find this post helpful? Yes | No

    Default

    display:

    dhour = hour
    IF (hour//12) = 0 Then
    dhour = dhour + 12
    EndIF
    LCDOut $fe,1
    IF hour < 12 Then
    LCDOut DEC2 dhour,":",DEC2 minute,":",DEC2 second, "AM"
    Else
    LCDOut DEC2 (dhour - 12),":",DEC2 minute,":",DEC2 second, "PM"
    EndIF
    LCDOut $fe,$c0,"Simple Test"
    pause 100 ' pause for .1 sec

    GoSub timing

    GoTo display

  7. #7
    Join Date
    Oct 2007
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    thanks for the help
    here are my code for day

    symbol mon = 0
    symbol tue = 1
    symbol wed = 2
    symbol thu = 3
    symbol fri = 4
    symbol sat = 5
    symbol sun = 6

    hour var byte
    day var byte
    day = 0 ' initial day at mon when program run

    if hour > 24 then
    day = day + 1
    endif

    if day > 7 then
    day = 0
    endif

    lcdout $fe,$c0, dec3 day

    *the display only show 000, not mon.
    how i write the code to display date:month:year

Similar Threads

  1. LCD Display
    By lambert in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th January 2010, 22:18
  2. LCD display not working properly
    By dilpkan in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 2nd February 2008, 07:43
  3. Replies: 14
    Last Post: - 26th September 2007, 05:41
  4. LCD Display not working - PIC heating...
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 24th September 2006, 07:35
  5. A/D display result on LCD
    By winsthon in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 10th January 2004, 10:09

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