Shop OBEX P1 Docs P2 Docs Learn Events
New User Questions — Parallax Forums

New User Questions

JohnPJohnP Posts: 15
edited 2008-05-15 19:11 in Propeller 1
Just getting started with Propeller on the Demo board and have a couple
of questions:

1. The very first demo program, Output.spin, works fine, for
pins 16 or 17. Changing the pin number to 18, for instance,
causes to LEDs to blink. Explanation ?

2. Does anyone have timing information for the math functions,
i.e. number of cycles, just roughly.


Thanks,
John-

Comments

  • JohnPJohnP Posts: 15
    edited 2008-05-14 18:39
    Sorry, I solved the first question - you know how
    it is with new users (enthusiastic but clueless).

    John-
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-05-14 23:23
    Which math functions, assembler or spin? The number of cycles for all the assembler instructions are in the data sheet and manual (all 4 cycles). The spin instructions are around 40 to 100 times slower. If you want to find out do something like this
    PUB test(num1,num2):temp1,temp2,temp3
      temp1:=cnt
      temp3:=num1+num2
      temp2:=cnt
      return temp2-temp1
    
    



    Something to be careful of is that this will take different amounts of time depending on where the variables are.
  • JohnPJohnP Posts: 15
    edited 2008-05-15 01:17
    Thanks for the reply.

    I saw the assembler cycles; should have mentioned
    I was curious about the Spin cycles.

    I have tested in the way you suggest in other languages, however,
    I'm just getting started with Spin and I'm not an adept programmer
    in any language.

    Thanks,
    John-
  • Cluso99Cluso99 Posts: 18,069
    edited 2008-05-15 02:22
    Try the VGA Demo - it's magic cool.gif
  • Ken PetersonKen Peterson Posts: 806
    edited 2008-05-15 17:12
    speaking of spin cycles....has anyone made a propeller based washing machine?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • tpw_mantpw_man Posts: 276
    edited 2008-05-15 18:27
    @Ken Peterson
    LOL, but I do not think so.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I am 1011, so be surprised!


    Advertisement sponsored by dfletch:
    Come and join us on the Propeller IRC channel for fast and easy help!
    Channel: #propeller
    Server: irc.freenode.net or freenode.net
    If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com
    tongue.gif
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-05-15 19:11
    Ken Peterson said...
    speaking of spin cycles....has anyone made a propeller based washing machine?

    Oh no! I'm not going there.. Then I've have one more task to do before I can play with the Propeller. [noparse]:)[/noparse] [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
Sign In or Register to comment.