Wrong values with COSINE!


Closed Thread
Results 1 to 25 of 25

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    You're not going to get an answer any faster if you post it once or if you post a dozen times... but if you keep doing it, it'll be considered spamming and they'll all be removed!

    PICBasic only handles integers. Like it or not, you won't get a fractional result.

  2. #2
    Eng4444's Avatar
    Eng4444 Guest


    Did you find this post helpful? Yes | No

    Question it's not about integers...

    I wasn't talking about integers... i noticed that you wre only concentrating on me sending many posts.. why not concentrating about the contents of posts?

    the cosine and sine functions are not giving the basic answers...they are giving results in twos's complement!

    for example, instead of giving a "1" for "cosine 0", it is giving 127!!

    i need to go to the normal numbering system... anyone has a hint?

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    >> i noticed that you wre only concentrating on me sending many posts..

    That's what System Admins are supposed to so...

    >> why not concentrating about the contents of posts?

    You'll have a solution about an hour after despositing US$5K in my Bank Account... there's around a couple of dozen people on this forum that also have the skills and could probably get it down to thirty minutes... Somebody may do it for free if you're lucky and post it on the forum, but until then be patient... a lot of people only look at this list once or twice a week.

  4. #4
    Eng4444's Avatar
    Eng4444 Guest


    Did you find this post helpful? Yes | No

    Default Well you must be right..

    Quote Originally Posted by Melanie
    >> i noticed that you wre only concentrating on me sending many posts..

    That's what System Admins are supposed to so...

    >> why not concentrating about the contents of posts?

    You'll have a solution about an hour after despositing US$5K in my Bank Account... there's around a couple of dozen people on this forum that also have the skills and could probably get it down to thirty minutes... Somebody may do it for free if you're lucky and post it on the forum, but until then be patient... a lot of people only look at this list once or twice a week.
    -----------------------------------------------------------------

    Well,

    i'll wait as you advice me but i really need a quick answer...i posted this msg in several websites and even sent a mail to picbasic pro community.. i hope i'll get at least one good answer!

  5. #5
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Talking

    Uuuhhhh...

    Super-Mel is right, don't cry as a angry kid !!!!


    Use your brain, or source it out !

    Transfering a value of 0-360 to 0-255 ?
    What a heavy task !
    perhaps: x*255/360 ?

    And now, the final:
    Converting a number -127..127 to -1..1 ?
    perhaps: x/127 ?

    Have a nice day, coding the FP-math. And after that you will see, it is not necessary, because your real problem has another - slim - solution.

    Or use some of these f******* C-dinos around us.
    PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2

  6. #6
    Eng4444's Avatar
    Eng4444 Guest


    Did you find this post helpful? Yes | No

    Talking But look...

    It's not at all as you thought dear Mr intelligent...

    By the way, thanks for your friendly reply! you're so much sociable and i think all your friends envie you

    there real problem is that i have tried your small equation... maybe befor you were born! but it didn't work at all..... i wonder what is the mistery and this is why i have asked a help....

    THIS EQUATION DOES NOT WORK... just try it and you will see! don't just "talk", try and tell me the result... are you getting real values???

  7. #7
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Please don't insult me if the link below it is not useful to you!

    http://www.emesystems.com/BS2math3.htm#arcCos

    Luciano

  8. #8
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Eng4444
    It's not at all as you thought dear Mr intelligent...

    By the way, thanks for your friendly reply! you're so much sociable and i think all your friends envie you

    there real problem is that i have tried your small equation... maybe befor you were born! but it didn't work at all..... i wonder what is the mistery and this is why i have asked a help....

    THIS EQUATION DOES NOT WORK... just try it and you will see! don't just "talk", try and tell me the result... are you getting real values???

    You don't know to whom you are talking - Stupid!

    I worked with computers long time before there was a PC. We worked with this cases with blinking lights and switches in front...
    I think, I know what bits look like and how to implement calculations ....

    And now - I'm sitting around, waiting for you and all your friends...
    But THEY will not help you!
    PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2

Similar Threads

  1. WRITECODE stores wrong 14-bit word values in FlashMEM
    By BobPigford in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 26th June 2009, 04:35
  2. Looking at pic basic pro symbol values in mplab 8.15a simulator
    By ukemigrant in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 16th May 2009, 13:18
  3. Need help calculating OSC cap values
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 26th June 2008, 21:27
  4. Funny PULSIN values: what is going on???
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 30th April 2008, 08:02
  5. 16F877A problem: "coupled" digital values
    By Lupo83 in forum General
    Replies: 16
    Last Post: - 4th December 2007, 12:46

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