Shop OBEX P1 Docs P2 Docs Learn Events
Tutorial for review please! — Parallax Forums

Tutorial for review please!

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2011-04-01 12:45 in Propeller 1
I'm working on an introductory tutorial designed to move very quickly into basic spin programming with some simple LED demos. I'd really appreciate some feedback on this.


http://dl.dropbox.com/u/7557533/temp/Propeller%20Programming%20First%20Steps.pdf


Thanks gang.

OBC

Comments

  • Dave HeinDave Hein Posts: 6,347
    edited 2011-04-01 12:24
    The line that reads
      dira[16..22] := %1111_1111  ' Set P0 thru P6 to output
    

    Should probably be
      dira[16..22] := %111_1111  ' Set P16 through P22 to output
    

    Only 7 bits are being set, so the constant only needs to be seven ones. Of course, eight ones would work also. The word "through" is better than the abbreviated term "thru" for people where English is not their first language.

    Also, the range 16..22 is bit-reversed from the normal bit ordering. It may be less confusing to use 22..16, but either form is OK.

    Dave
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2011-04-01 12:42
    Exactly the reason I'm posting it here! A second set of eyes!

    Actually, the demo will be increased to 8bits. I seem to have misplaced one when I was transcribing the text from a different board I was using here.

    Thanks!

    OBC
  • Dave HeinDave Hein Posts: 6,347
    edited 2011-04-01 12:45
    I read through the tutorial again, and the 16..22 form is OK at this point, but it will need some explaining later on when you show that OUTA can be written to as a 32-bit value. You should explain what the "%" character means before the 1111_1111 digits.
Sign In or Register to comment.