Wrong values with COSINE!


Results 1 to 25 of 25

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Eng4444
    all my work is that i am getting Power. It is given as you know by:

    P = V x I x Cos alpha.
    And out of this silly task you are able to make such a lot of dust ?

    P=V*I 16 Bit
    X=COS(Alpha*255/360) 8 Bit 2-komplement
    Minus=X.7
    P=P*(X and %01111111) 32 Bit !!!
    P=Div32 127
    It's quick-n-dirty, maybe there is an error inside....

    And all the way without using this boring 0,xxx, only integers !
    Ha, the good old times are back, where programmers must understand what they are doing and counting the bits...

    Just USE YOUR BRAIN, not your mouth !



    Hello Mel,
    Yes, I ruin you prices and your time....
    but I inserted 1 mistake, so this code will not work right. But some postings ago, there was the right hint. Maybe we could train his brain....
    Last edited by BigWumpus; - 7th May 2006 at 22:21.
    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