Delay without using pause


Closed Thread
Results 1 to 40 of 43

Hybrid View

  1. #1
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: Delay without using pause

    Guys, thanks for your continued input.

    I've hit a hurdle and it's doing my head in. In the original code the readings from the 4 sensors were displayed constantly on the LCD, so within the main program loop there is a for next loop which runs through and reads the 4 DS18B20's and puts the results into a 4 line array. This results in a fast response in updating the display when temperatures change. Now that I'm also reading an AM2302 and want to display data from that too, the LCD looks cluttered if I follow the same method, hence my idea of displaying the readings from each vivarium on a single line, which would overwrite the values for each vivarium every few seconds. The problem is that if I opt to change this so the for next loop which reads the sensors is changed so that it reads sensor 1 and then goes to a subroutine to display the results for two or three seconds it means that it can take 8 - 12 seconds to go round the loop to read all four sensors, which defeats the object of having fast response times, and in 12 seconds the temp in the vivarium could become dangerously high as this would effect the PID timings.

    I think to only option is to use two 20 x 4 LCD's or one 40 x 4 LCD, or possibly a GLCD

  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

    Can you post a mockup of your display in text and how you use it and how you see using it?
    Regards,
    TABSoft

  3. #3
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: Delay without using pause

    This was the best match, but I have no room to display the time.

    Name:  oldlcd.jpg
Views: 3342
Size:  38.4 KB

    This is what I'm trying to achieve

    Name:  newlcd.jpg
Views: 2681
Size:  30.4 KB

    With line 2 being updated with data for Viv2, Viv3 etc

  4. #4
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Delay without using pause

    "which would overwrite the values for each vivarium every few seconds. “

    It sounds like you just need to overwrite the appropriate value into the 4 line buffer instead of updating the whole display buffer for every variable,
    or update the LCD location directly, but I would do the former, and write a complete screen every time.

  5. #5
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Delay without using pause

    Does viv mean vivarium? Before you listen to me you should see how professional my setup is
    I like the way the LCD doesn’t have a backlight so I faked it with an LED.




  6. #6
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: Delay without using pause

    Nice Beardie -

    yes Viv is for vivarium, currently have a custom unit of three vivs, plus an incubator as my to royals have been locked several times over the past few months. Here's the incubator, and the existing controller, which is a bit neater than your set up - but hey if it works for you that's the main thing


  7. #7
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Delay without using pause

    Well it did six yrs ago

    Can you post the main code that prints to LCD?

    There are a lot of ways to solve it.
    I think I only now properly understand the issue.

    Padding has already been suggested and is one good way.
    Using a word variable you could mean average quite a few
    temperature readings.

Similar Threads

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

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