Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Datasheet - Page 2 — Parallax Forums

Propeller Datasheet

2»

Comments

  • cgraceycgracey Posts: 14,133
    edited 2006-02-25 19:10
    Those counts look right to me.

    Chip Gracey
    Parallax, Inc.
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-02-25 19:26
    Then I got the DJNZ timing correct?

    That it uses 4 cycles when counting AND jumping, and 8 when it counts down to 0 and not jumping?
    (On the Z80 its the opposite as the DJNZ command uses 10 cycles when counting and Jumping, and 7 when counting down to 0 and not jumping)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • cgraceycgracey Posts: 14,133
    edited 2006-02-25 19:38
    Yes, you got it right.

    I know it looks backwards, but because of the order of data fetching in the COG ram, it was possible to make the branch-true condition the non-exception, so that it takes the minimal 4 clocks. The exceptional fall-through takes 8 clocks. This way, looping is fast.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-02-25 20:32
    No, it's not fast, it's a Speed demon...

    smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • danieldaniel Posts: 231
    edited 2006-02-25 21:18
    Tracy,

    Thanks for the information, and confirmation of some of my thoughts.

    It like a good puzzle, to fit the Propeller into what one already knows, suspects he knows, and to imagine how it will change what one knows.

    Daniel
  • Tracy AllenTracy Allen Posts: 6,656
    edited 2006-02-26 21:28
    I was wondering too, about that 4 cycles for the loop-back vs 8 cycles for drop-through. Thanks for the clarification, Chip.

    Am I correct in thinking that a sequence like this

    WAITPNE D,S
    MOV D,inA

    would certainly capture a transient input state with a hold time expectation of not much less than 5/system clock rate? For example, the changed state inA should hold for no less than 62.5 nanoseconds when the master clock rate is 80mhz, or 0.25 milliseconds for master clock = 20 khertz.

    Is the same thing true of the equivalent Spin code, or does it have to wait for the interpreter to fetch and decode the instruction after the WAITPNE (state,mask,port)?

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