Displaying temperature Setpoints


Closed Thread
Results 1 to 40 of 59

Hybrid View

  1. #1
    Join Date
    Oct 2008
    Posts
    47


    Did you find this post helpful? Yes | No

    Exclamation

    myself. Sticking to the basics.

  2. #2
    Join Date
    Oct 2008
    Posts
    47


    Did you find this post helpful? Yes | No

    Unhappy Final Attempt

    Does this make any sense? (Well to me it does) At the moment, nothing appears on the LCD. Please could somebody tell me what I need to add/delete to obtain success from this code.

    Define LCD_DREG PORTB
    Define LCD_DBIT 0
    Define LCD_RSREG PORTB
    Define LCD_RSBIT 5
    Define LCD_EREG PORTB
    Define LCD_EBIT 4
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2

    tempc var word
    tempc1 var word
    Conv1 Con 4
    Conv2 Con 82/100
    mode var byte
    keyin var byte
    adval var word
    highpt var byte
    lowpt var byte
    up var portc.0
    down var portc.1
    sethighp var portc.2
    setlowp var portc.3
    maindisp var portc.4
    trisc=$ff
    trisa=$ff

    adcon1=$82
    adcon0=$c1
    pause 100

    main:

    gosub checkdone

    gosub getkey

    checkdone:
    if adcon0.2=1 then checkdone

    adval.highbyte=adresh
    adval.lowbyte=adresl
    Lcdout $fe, 1
    tempc = adval * Conv1
    tempc1 = adval * Conv2
    tempc = tempc + tempc1
    pause 1000
    return

    getkey:
    pause 50
    keyin = portc
    return

    if maindisp = 1 then
    write 0 , sethighp
    pause 10
    write 1 , sethighp
    LCDOut "TEMP = ", dec(tempc / 10), ".", dec1 (tempc // 100), $DF , "C"
    endif

    if maindisp = 1 then
    write 2 , setlowp
    pause 10
    write 3 , setlowp
    LCDOut "TEMP = ", dec(tempc / 10), ".", dec1 (tempc // 100), $DF , "C"
    endif

    if sethighp = 1 then gosub setsetpointh
    if setlowp = 1 then gosub setsetpointl

    setsetpointh:

    lcdout $fe , $80 , "High Sp=" , $fe , $c0 , dec highpt
    if up = 1 then highpt = highpt + 1
    if down = 1 then highpt = highpt - 1
    return

    setsetpointl:

    lcdout $fe , $80 , "Low Pt=" , $fe , $c0 , dec lowpt
    if up = 1 then lowpt = lowpt + 1
    if down = 1 then lowpt = lowpt - 1
    return

    goto main

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Cool Still not paying attention...

    Quote Originally Posted by Kalind View Post
    Does this make any sense? (Well to me it does) At the moment, nothing appears on the LCD. Please could somebody tell me what I need to add/delete to obtain success from this code.
    i dont know..this isnt the main concern...lets get back to reality
    The reality is that you don't read and/or follow thru your own code (or somebody else's code for that matter)...
    If you did, you'd find at least 2 hard 'breaks' and 5 'bugs'...
    Last edited by skimask; - 21st October 2008 at 15:08.

  4. #4
    Join Date
    Oct 2008
    Posts
    47


    Did you find this post helpful? Yes | No

    Red face

    i've read thru it many times. im no programmer. i'll admit to taking snips from others and to me it makes sense. the main temperature measurement part is mine. the button fuctions is not but i tried to make sense of it all. please just guide me to eliminating the errors

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kalind View Post
    please just guide me to eliminating the errors
    Gimme this...gimme that...gimme gimme gimme...I got a kid on the way and I figured I'd have to wait about 2-3 years before I got to listen to that. Apparently not...

    I tried to do the guiding thing. You told me to get back to reality, so I did...

  6. #6
    Join Date
    Oct 2008
    Posts
    47


    Did you find this post helpful? Yes | No

    Angry

    what joy do u get out of being spiteful? all im askin for is guidance..

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kalind View Post
    all im askin for is guidance..
    If you are wanting to learn, then go back to post #2,3 and 20.
    If you are wanting someone to do the project for you just say so. It will save us all a lot of time.
    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