Displaying temperature Setpoints


Closed Thread
Results 1 to 40 of 59

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kalind View Post
    hey guys. i just realised that everything is fine until the actual temperature reaches the respective setpoints. thats when the design starts to really slow down during its operation. i cant seem to understand why this is so.
    Gee....Ya think? You wrote the code (or did you?), you should know why it happens...

    Code:
    ...................
    If tempc>=highpt then
    gosub high_flash
    ....................
    If tempc<=lowpt then
    gosub low_flash
    .....................
    high_flash:
    HIGH highled
    PAUSE 350
    LOW highled
    PAUSE 350
    RETURN
    
    low_flash:
    HIGH lowled
    PAUSE 350
    LOW lowled
    PAUSE 350
    RETURN
    How long do you suppose it takes each of those last 2 chunks of code to execute?
    Better yet...how long does it take for a PAUSE 350 to execute?

  2. #2
    Join Date
    Oct 2008
    Posts
    47


    Did you find this post helpful? Yes | No

    Default

    less than half a second.....what r u getting at ski?

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by kalind View Post
    less than half a second.....what r u getting at ski?
    WHAT HAPPENS EVERY TIME YOUR CODE FALLS THRU TO ONE OF THOSE FLASHING LED SUBROUTINES?
    How long does it take for each one of those subroutines to execute once they're started (i.e. Gosub'd to and returned from)?
    It happens on each time around the loop after the temperature has exceeded the set point.
    How fast can your buttons/lcd/the-rest-of-the-program possibly run if it's tied up in a pause for 700ms on each run through the loop.
    JEEZE MAN!!! READ THRU YOUR OWN CODE FOR ONCE!!!! What did you do? Cut and paste this from somewhere else? How about getting your FRIEND to help you out more...if this friend actually exists...you know, the same one that HELPED you with those buttons earlier...
    Screw it...I'm done...really...this is about as annoying and frustrating as it can possibly get...the only thing that could be worse would be if your name/handle was TED's, but then again, that was more funny than annoying.
    Last edited by skimask; - 23rd October 2008 at 16:05.

  4. #4
    Join Date
    Oct 2008
    Posts
    47


    Did you find this post helpful? Yes | No

    Default

    It's for the same reason that I removed those two routines and decided to just make those pins high instead. the same thing happens...

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kalind View Post
    It's for the same reason that I removed those two routines and decided to just make those pins high instead. the same thing happens...
    I tried, in one last vain attempt to draw your attention to something that might be slowing down your whole project.
    But, I can see that I've failed again, because you've failed AGAIN...or maybe just YOU have FAILED to READ your OWN code...AGAIN!

    You don't think those 2 SOUND statements, with their ~3 seconds of sound making might not have anything to do with anything?

    Ok, now I'm done... Some people you just can't prod into looking at their own stuff closer...because it's all good. Of course it's all good...they wrote it...how can they possibly be wrong or mistaken about anything? Their logic is great...it flows in the code just like it does in their minds...Or does it?!?!?!?!!!!????

    Why don't you go ask your instructor for advise... You've got 48 hours...
    Last edited by skimask; - 23rd October 2008 at 17:07.

  6. #6
    Join Date
    Oct 2008
    Posts
    47


    Did you find this post helpful? Yes | No

    Question

    ski, i removed both of those flashing routines and the problem was still there. then i removed the SOUND statements aswel. seemed to have sorted out the lag issue. the problem is that now i have only a high led and low led when the setpoints are reached but thats not even working

    Code:
    checkdone:
    if adcon0.2=1 then checkdone
    
    adval.highbyte=adresh
    adval.lowbyte=adresl
    
    tempc=50*adval
    tempc=tempc/100
    
    If tempc>=highpt then
    gosub high_flash
    SOUND buzzer, [60, 100, 23, 200]
    relayhigh = 1
    else
    relaylow = 0
    lowled = 0
    buzzer = 0
    endif
    
    If tempc<=lowpt then
    gosub low_flash
    SOUND buzzer, [20, 100, 23, 200]
    relaylow = 1
    else
    relayhigh = 0
    highled = 0
    buzzer = 0
    endif
    
    return

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


    Did you find this post helpful? Yes | No

    Default

    I still see sound in that snippet and the leds are = 0 ???
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Write Onewire data toa I2C memory / read ASCI
    By Eugeniu in forum mel PIC BASIC Pro
    Replies: 67
    Last Post: - 16th November 2008, 20:19
  2. Displaying temperature using a -40 to 185F??
    By jblackann in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th January 2008, 19:45
  3. Conversion problem
    By eva in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 15th March 2007, 19:21
  4. Help for decimal conversion
    By eva in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th March 2007, 19:20
  5. Serout "onewire.bas"
    By puru in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th July 2005, 01:14

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