Delay without using pause


Closed Thread
Results 1 to 40 of 43

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Delay without using pause

    Hi Malcom,
    Real time in Human terms is as fast as you can read. Who cares if the machine detects something faster, you cannot respond that fast, so the LCD is much like watching the evening news. What you "might" do is allow "the machine" to run several cycles and then report via LCD the average of those cycles.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  2. #2
    Join Date
    Jan 2013
    Location
    Texas USA
    Posts
    229


    Did you find this post helpful? Yes | No

    Default Re: Delay without using pause

    Malcolm,

    I think you're on the right track.

    something like this?

    Code:
    LCDCount_Max con 3000   'Set to what you want
    
    LCDCount var word
    LCDUpdate var bit
    
    goto Main
    
    UpdateLCD:
        'do your LCD Update stuff here
        
        return
    
    Main:
        LCDCount = 1    'Used to display the first time        
    
    CycleLoop:
        if LCDUpdate then
            gosub UpdateLCD
            LCDUpdate = 0
        endif
        
        ''do your normal polling stuff here
       
       '' Then do the LCD test stuff here
        LCDCount = LCDCount - 1
        if LCDCount = 0 then
            LCDCount =  LCDCount_Max
            LCDUpdate = 1
        endif 
    
    
        goto CycleLoop
    Regards,
    TABSoft

  3. #3
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: Delay without using pause

    Cheers Ken,

    I'll have a play..... failing that I'll look for an 40 x 4 LCD which might make things easier

  4. #4
    Join Date
    Oct 2014
    Location
    Lagos Nigeria
    Posts
    10


    Did you find this post helpful? Yes | No

    Default Re: Delay without using pause

    Thanks so much amgen, i want to give this a try, looks much simpler. i am trying to convert the flowchart you posted to code, i will let u know how it turns out.

    i will see if my original trial will even compile at all :-), then i will make comparisms

    i want to be able to write more efficient code. one nice tool that has helped me to compare execution times of various methods of coding is DARREL TAYLOR's instruction time calculation code...

Similar Threads

  1. Replies: 6
    Last Post: - 28th October 2014, 06:08
  2. Do I need a pause?
    By tazntex in forum Serial
    Replies: 21
    Last Post: - 29th August 2008, 04:32
  3. 1 us delay
    By Pedro in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th February 2006, 17:28
  4. Pause
    By blue in forum General
    Replies: 7
    Last Post: - 29th December 2005, 14:24
  5. pause 0.5
    By detail in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th June 2005, 11:32

Members who have read this thread : 2

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