coundown problem on LCD


Results 1 to 7 of 7

Threaded View

  1. #1
    Join Date
    May 2005
    Posts
    49

    Red face coundown problem on LCD

    Hi everybody.
    i again have problem with pic
    i am trying to countdown the hours minutes and seconds
    like 01:19:49 and lcd will show the countdown
    if i press button1 i want to add 30 minute
    i start like this
    second VAR BYTE [59] 'I WANT TO LIMIT THE TIME
    minute VAR BYTE[59]
    hour VAR BYTE[59]
    second=0 'start with 0
    minute=0 'start with 0
    hour=0 'start with 0
    button porta.4 ,0,0,0,b1,1,plus_the_count
    simlpy my codes re like these but the compiler allways give error
    (unable to fit second)
    after then i try it basicly
    '''''''''''''''''''''''''''''''''''''''''''''''''r eal codes for 16F628'''''''''''''''''''''''''''''''''''''''''''' '
    DEFINE LCD_DREG PORTB
    DEFINE LCD_DBIT 4
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 0
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 3
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50
    saniye var byte[59]
    dakika var byte[59]
    saat var byte[59]
    saniye=0
    dakika=0
    saat=0
    loop:
    saniye = saniye -1
    if dakika =00 then saat= saat-1
    LCDOut $FE,1 'ekranı temizle
    lcdout "KALAN SURE"
    LCDOut $Fe,$C0
    LCDOUT #saat,":",#dakika,":",#saniye
    pause 1000
    goto loop
    end
    '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''end'''''''' ''''''''''''''''''''''''''''''''''''
    and still have problem "unable to fit variable saniye"
    how can i limit the numbers when reverse counting?
    Last edited by SuB-ZeRo; - 6th June 2005 at 15:39.
    Asking is not a shame but not learning is a SHAME!!!

Similar Threads

  1. LCD problem with 16F628
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 19th September 2016, 08:28
  2. Newbie? Problem with LCD
    By lew247 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 7th December 2009, 19:48
  3. LCD problem
    By Andre_Pretorius in forum General
    Replies: 8
    Last Post: - 27th January 2009, 15:47
  4. LCD Problem
    By karenhornby in forum General
    Replies: 3
    Last Post: - 19th June 2008, 11:43
  5. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07

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