How to simulate in EXCEL ?


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2007
    Posts
    56

    Default How to simulate in EXCEL ?

    I'd like to simulate PBP's SIN function in MS Excel
    How to do that ? Is it as simple as x = x * 360/256 ?

    Johan

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Wink

    Hi, Johan

    May be like this ... ???


    http://www.electronic-engineering.ch...generator.html

    some more features here ... but one day, you'll appreciate !!!

    Regards

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Jun 2007
    Posts
    56


    Did you find this post helpful? Yes | No

    Default

    Alain,

    What I need is much simpler than that, I just want to know the result of simple sine calcluation (PBP :8bit) like this:
    SIN 0 = ?
    SIN 64 = ?
    SIN 255 = ?

    In the PBP manual it says the result is -127 to 127, does that mean SIN 0 = -127 SIN 255 = 127 ?

    Johan

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    Hi, Johan

    values are "normally" given

    0 gives 0
    64 gives 127
    128 gives 0

    ... 192 gives 129 ... but as High bit set ... means - 127 (use SDEC for printing)

    255 might give ... 253 which means ..-3 ( 2's complement )

    and , of course back to 0 for 256

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    Join Date
    Jun 2007
    Posts
    56


    Did you find this post helpful? Yes | No

    Default Sine Table

    I found out I just had to interpolate the values to find the right result.
    Thanks for your help.


    PBP Sine table ( intrpolated ) 0,16,32,48,64,80,96,112,128,144,160,176,192,208,22 4,240,256 = 0,32,64,96,127,96,64,48,32,0,-32,-48,-64,-96,-127,-96,-64,-48,-32,0

Similar Threads

  1. Capturing EEPROM data into excel spreadsheet?
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 21st October 2009, 02:22
  2. Serial Data to Excel
    By tonyfelloni in forum Serial
    Replies: 4
    Last Post: - 31st March 2009, 20:59
  3. Flash Memory Cards, USB sticks and Excel
    By timmers in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 4th October 2008, 22:46
  4. how can I simulate my code?
    By fadibasic in forum General
    Replies: 3
    Last Post: - 25th May 2008, 10:18
  5. Simulate a mouse with a PIC
    By peterdeco1 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 21st September 2006, 00:13

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