Multi-digit word variable to string


Closed Thread
Results 1 to 40 of 44

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,690


    Did you find this post helpful? Yes | No

    Default Re: Multi-digit word variable to string

    Its hard to work with crappy information


    Name:  LEO.jpg
Views: 2549
Size:  86.1 KB

    i2cread SDA, SCL,$b4,7,[temp.lowbyte,temp.highbyte,PEC] will do exactly that


    i just realized that what code you posted is in fact a snippet .
    addr and reg are never defined , osc is unknown ,i2c defines unknown, pin settings and i2c pull ups ...........

    could be another waste of time
    Warning I'm not a teacher

  2. #2
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Multi-digit word variable to string

    Richard,

    i have thanked you so many times for your effort and help.

    I think i have attached in the code most of the information required.

    You have helped me in the first major issue i had with the right values and the command needed inside the HSEROUT.

    Then we moved to I2C command. I think there i have shared the reg and addr values. For the SCL and SDA i dont think that is necessary at all to post which port is or not.

    Anyway, now the code is working just fine and i need once again to thank you all for your help and time.

    Once again Richard. Life is simpler and shorter than we all think. Smile because you have the knowledge in this field to help people.

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,690


    Did you find this post helpful? Yes | No

    Default Re: Multi-digit word variable to string

    I think i have attached in the code most of the information required.

    Then we moved to I2C command. I think there i have shared the reg and addr values. For the SCL and SDA i dont think that is necessary at all to post which port is or not.
    wrong on all counts

    the i2c defines and osc speed can be crucial to i2c bus problems
    pin and port settings can also play a vital role
    the type of vars defined for reg and addr are also important ,for instance if reg is a word var then all bets are off

    sorry i tried
    Warning I'm not a teacher

  4. #4
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Multi-digit word variable to string

    Richard,

    your help is always appreciated. You were right once again.

    I had the

    Code:
    reg var Word
    I think i've seen it as a comment somewhere here in the forum.

    Now i have changed the code and used byte insted of word for the reg and used only the code line you suggested and taaaadaaa, it worked.

    Apart from that......

    i think i have the original from melexis the IR module as it cost here in Europe around 25 Euros.

    The link of the Datasheet is the following.

    https://www.melexis.com/en/documents...sheet-mlx90614

    and this is the part of the datasheet shown the revision and the date.

    Name:  melexis.png
Views: 2590
Size:  136.8 KB
    Last edited by astanapane; - 20th December 2021 at 11:25.

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,690


    Did you find this post helpful? Yes | No

    Default Re: Multi-digit word variable to string

    Quote Originally Posted by richard View Post
    Its hard to work with crappy information
    could be another waste of time
    and it was

    I had the
    reg var Word
    I think i've seen it as a comment somewhere here in the forum.
    a classic case of monkey see monkey do programming error hidden away by use of snippets
    days wasted, hundreds of posts to solve an elementary error.

    i would not be surprised to find there is still one more major issue for the i2c settings still not addressed
    for this precious secret code . i hope this is not a medical diagnostic device

  6. #6
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Multi-digit word variable to string

    ------------------------

    is there a point to answer to such a negative behavior and bad attitute? I think you have a problem man. Get a girl.
    Last edited by astanapane; - 20th December 2021 at 23:03.

  7. #7
    Join Date
    May 2013
    Location
    australia
    Posts
    2,690


    Did you find this post helpful? Yes | No

    Default Re: Multi-digit word variable to string

    is there a point to answer to such a negative behavior and bad attitute
    i don't mind your attitude so much, its just a wonder to me that anyone could come to this forum looking for free programming help.
    help for a problem they cannot solve themselves , then refuse or begrudgingly supply the detail identified as potentially problematic.
    you expect solutions from code snippets that only bring a problem to light not actually cause it.
    solutions are offered , pitfalls exposed even though the necessary info had to be painstakingly extracted over numerous posts.
    then only to be met with anger and indignation , you have to laugh

    but there is a point. snippets have been shown to be a waste of time over and over again
    Warning I'm not a teacher

  8. #8
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Multi-digit word variable to string

    fix your inside first.

    You share a proof data document to me from 2009, and you are trying to tell me that i have a fake module.

    You still do not listen. Forget about me and my monkey programming. Forget everything! You may be a good programmer, but a very very bad teacher or someone that could help in a forum.

    Check the answers from DT in the past. Check and learn from his kidness and for his possitive behaviour. LEARN man LEARN.

    YOU NEED HELP MAN anyway.....from medical side. I cannot help you from here, but still, listen to me at least and ask for a help soon.

    Hope you will find your way. You need help.

    I will be here if you need to talk to someone, but medically i cannot help you.

    Thanks once again for all the help and time you spent.

  9. #9
    Join Date
    May 2013
    Location
    australia
    Posts
    2,690


    Did you find this post helpful? Yes | No

    Default Re: Multi-digit word variable to string

    let be clear here the address doubt set in from the very link you submitted
    https://www.waveshare.com/wiki/Infra...erature_Sensor

    you are trying to tell me that i have a fake module.
    i never said that at all, but yes i had picked up an old datasheet , i let your address go unchallenged so what's the issue here, it needed clarification.

    all said and done since you are so reticent to post your code i was left with seeking a reason why the device did not respond as expected
    to a seeming valid i2c transaction , a quick look on the web led to reasonable doubt that the device was as described.
    i make no apology for that . i enjoy a challenge and was prepared to investigate adding a smbus request signal if warranted
    it would have been interesting.

    proof conclusive snippets are a waste of time , my case rests

    oh yeah
    a very very bad teacher or someone that could help in a forum.
    its hard to soar with eagles when you are working with turkeys

    i'm not going to spend a pile of time writing nice flowery prose and go about smoothing egos on a technical forum for simple issues

    good luck with your endeavors i'm done
    Warning I'm not a teacher

  10. #10
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default Re: Multi-digit word variable to string

    No need for flames here please.

    We are on this forum to help and not hurt each other.

    Especially with the season coming...

    Ioannis

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