Compare value ...


Closed Thread
Results 1 to 40 of 69

Hybrid View

  1. #1
    Join Date
    Apr 2020
    Posts
    30


    Did you find this post helpful? Yes | No

    Default Re: Compare value ...

    Hi, Forgive me, your questions are legitimate, I tried to post a surrogate code so as not to stretch too much, but I think I have created confusion.


    anyway :


    DatoEE is never defined
    i see that no data is stored to eeprom therefore tmax and tmin = 255



    ' EEPROM Locations
    '================================================= ==========================
    DATA @0,16 ' 16 Tenp min.
    DATA @1,30 ' 30 Temp Max.
    '================================================= ==========================


    then temp is 20 to 24 °C (ambiental)
    Tmax is set 30°C




    the configuration is


    ' -------- bit a bit controllo 0=output 1=input


    INTCON = 0 ' NO INTERRUPT
    ADCON1 = 001110 '
    ADCON0 = 000101 'Disable Converter Module
    ANSEL = 000001 'Disable Inputs Tranne AN0
    OSCCON = 100000 'Internal RC set to 4MHZ
    CMCON = 7 '
    '76543210
    TRISA = 111111 ' impostazioni INP/OUT
    TRISB = 000000 ' delle porte
    '----------------------------------------------------


    the string
    PAUSE 50 ' Wait 1/4 seconds per reading


    only reports an incorrect comment




    so my problem is, i believe:
    temperature is a word
    Tmax is a byte


    and I don't understand how compare the values

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Compare value ...

    That's weird behaviour. I don't had on hand 16F88, I run it on 16F690, but it doesn't matter.
    OK, one more chance try this:
    Attached Files Attached Files
    Last edited by louislouis; - 9th April 2020 at 23:33.

  3. #3
    Join Date
    Apr 2020
    Posts
    30


    Did you find this post helpful? Yes | No

    Default Re: Compare value ...

    Quote Originally Posted by louislouis View Post
    That's weird behaviour. I don't had on hand 16F688, I run it on 16F690, but it doesn't matter.
    OK, one more chance try this:

    OK ! NOW WORK !

    Where was the problem ?
    Can you explain to me ?

    can you also show me how you managed to show the hexadecimal value 665 on the display?

    I am truly grateful to you for taking the time. Thank you very much.

Similar Threads

  1. How to compare two temperatures
    By SKOLS1 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 10th April 2012, 10:07
  2. how to hserin compare with known value?
    By aa222k in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 23rd November 2010, 19:48
  3. Is there a faster way to compare?
    By RussMartin in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 8th February 2010, 20:48
  4. how to compare data
    By Mus.me in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 1st November 2009, 23:30
  5. Compare Data
    By Pesticida in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 14th February 2008, 21:40

Members who have read this thread : 1

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