Shop OBEX P1 Docs P2 Docs Learn Events
Sin Table Printout — Parallax Forums

Sin Table Printout

KyeKye Posts: 2,200
edited 2009-11-09 03:59 in Propeller 1
Anyone have a propeller chip sine table print out from the ROM?

Thanks,

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-11-08 22:38
    It's easy enough to produce one whenever you need it:

    [b]CON[/b]
    
      [b]_clkmode[/b]      = [b]xtal1[/b] + [b]pll16x[/b]
      [b]_xinfreq[/b]      = 5_000_000
    
    [b]OBJ[/b]
    
      io    : "FullDuplexSerial"
    
    [b]PUB[/b] start | i
    
      io.start(31, 30, 0, 9600)
      [b]repeat[/b] i [b]from[/b] $e000 to $f000 step 2
        io.hex([b]word[/b][noparse][[/noparse]­i], 4)
        [b]if[/b] (i & 31 == 30)
          io.tx(13)
        [b]else[/b]
          io.tx(" ") 
    
    
    


    -Phil
  • Tracy AllenTracy Allen Posts: 6,667
    edited 2009-11-09 03:59
    Kye,

    See:
    errors in sine table (Not)
    http://forums.parallax.com/showthread.php?p=840653
    and PhiPi's followup in
    renormalizing the sine table (Maybe)
    http://forums.parallax.com/showthread.php?p=841875

    I'm attaching my exploratory xls file that compares the Prop table with the normalizations (65535=unity versus 65536=unity). The Prop actually uses the former, and Phil looked at 65536 as an alternative. Possible interpolation came up. Note that at the high end, there are six angles that all map to 65535, so there is no grist there for easy interpolation.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
Sign In or Register to comment.