Shop OBEX P1 Docs P2 Docs Learn Events
Teaching Assembly Language--Newbie questions — Parallax Forums

Teaching Assembly Language--Newbie questions

JoeAJoeA Posts: 33
edited 2007-08-09 20:45 in General Discussion
I teach a computer science course in Machine Code/Assembly Language.
The objective is to give students some familiarity with how computers work at the bits and bytes level.
We formerly taught Intel 8088 assembly, but since that is now obsolete,
lately I have been using a hypothetical machine.
But I'm thinking of switching to a microcontroller, which should be more relevant and practical.
But which one?
BASIC Stamp doesn't seem to have a machine code/assembly language.
The SX has a simple but interesting architecture, with interrupts (and a stack?),
and the the "Exploring the SX Microcontroller" seems to be a text at the right level.
The Propeller is also interesting, but there doesn't seem to be much "beginner" material.
1. What are your thoughts on using SX vs. Propeller vs. ??? for an machine language/assembly course?
2. What hardware configuration would I need:
a. Can I use SX with a Stamp BOE or a Propeller EdKit, or would I need the SX Tool Kit?
b. Can I use SX Assembler or SX/B with the BOE and StampSX?
c. Is there a USB version of the SX toolkit?
d. If not, what function would I loose substituting the SX-Blitz for the SX-Key?
3. Is there any material equivalent to "What is a Microcontroller" for starting out with SX (or Propeller)?

JoeA

Comments

  • Capt. QuirkCapt. Quirk Posts: 872
    edited 2007-07-31 05:38
    You may want to READ THIS, Pual Baker (Parallax Engineer) and Mike Green make a good case for learning assembly with the Propeller over the SX. After buying the "Spin Stamp" and giving it a try on my own,·I decided I need a bit more "hand holding" and opted to continue with learning the SX because it's so well documented.

    Personally I think the Idea of "Parallel Processing" of the Propeller, is extreamly powerful and is certainly the future. I'm no expert, but would rather take a course that offered a similar structure to a multi-core processor than a "Serial Processing" mpu or·cpu.

    Do you teach in So-Calif.?

    Bill


    Post Edited (Capt. Quirk) : 7/31/2007 7:33:19 AM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2007-07-31 06:20
    1) Capt. Quirk has pointed you to a discussion of my thoughts. I've learned too many different machine instruction sets to bother counting and taught some of them at a graduate school level. For beginning students, you want as regular an instruction set as possible with very few special cases. You would like to have reasonably good manuals and a good enough development kit that the basics can be taught.
    2a) You can't use the SX with a Stamp BOE or a Propeller EdKit. You need some kind of SX board and the SX-Blitz or SX-Key
    2b) The Stamps use either a PIC or an SX processor, but the processor is not directly accessible so you can't reprogram it. The program included with the Stamps is the Basic interpreter.
    2c) I don't think so. The SX-Blitz and SX-Key use a serial RS232 connection. You can use any USB to Serial Adapter that properly implements the control lines. There are ones from FTDI, Parallax, Keyspan, and others that do this.
    2d) You lose the ability to do in-circuit debugging when you substitute an SX-Blitz for an SX-Key.
    3) The books that come with the various SX toolkits (or are downloadable for free if you choose not to buy the paper versions).
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2007-07-31 06:33
    1. What are your thoughts on using SX vs. Propeller vs. ??? for an machine language/assembly course?
    A. There are more educational resources available for the SX chips, and the ASM is similar to some of the PICs. The SX IDE can also be used with SX-Sim, which lets you run ASM programs with no SX hardware.

    2. What hardware configuration would I need:
    a. Can I use SX with a Stamp BOE or a Propeller EdKit, or would I need the SX Tool Kit?
    A. The SX-28 can be used directly on the SX-Tech & Professional Development Boards in a dedicated socket. It can be used indirectly on any board that provides a breadboarding area, providing you can wire it up properly. Note that the Propeller EdKit uses a normal breadboard, so you should be able to easily substitute an SX-28. The SX-28/48 are available as Protoboards, as is the Propeller.

    b. Can I use SX Assembler or SX/B with the BOE and StampSX?
    A. Assuming you are referring to the BS2SX Stamp Module, the answer is no. It is PBasic only.

    c. Is there a USB version of the SX toolkit?
    A. No, but Parallax does sell their own USB to Serial Adapter.
    Edit: Go with what Mike Green says. Also, the SX-Tech board doesn't give you a direct serial interface the way the BOE does. I'm not sure about the PDB, or the various Propeller boards.

    d. If not, what function would I loose substituting the SX-Blitz for the SX-Key?
    A. Live, in-circuit debugging. The SX-Blitz isn't the value it used to be. When it was introduced, the SX-Key was $100 vs $30 for the SX-Blitz. Now the prices are $50 & $30, making it only $20 more for the debugging capability.

    3. Is there any material equivalent to "What is a Microcontroller" for starting out with SX (or Propeller)?
    A. There is no direct equivalent, but there are materials being developed. You could fairly easily adapt the WaM text to the SX or Propeller by modifying the circuits as needed and translating the PBasic code's functionality as appropriate.

    Post Edited (Kevin Wood) : 7/31/2007 6:41:08 AM GMT
  • JoeAJoeA Posts: 33
    edited 2007-08-08 22:10
    3. Is there any material equivalent to "What is a Microcontroller" for starting out with SX (or Propeller)?
    A. There is no direct equivalent, but there are materials being developed. You could fairly easily adapt the WaM text to the SX or Propeller by modifying the circuits as needed and translating the PBasic code's functionality as appropriate.
    Post Edited (Kevin Wood) : 7/31/2007 6:41:08 AM GMT
    Adapting the material sounds like a reasonable project that could be accomplished over the course of the semester.· Is an editable version of the source text of WaM or Propeller manuals available?· What are the intellectual property considerations?

    JoeA
  • Capt. QuirkCapt. Quirk Posts: 872
    edited 2007-08-09 03:03
    Why don't you buy this book "Programming the SX Microcontroller"·first and then decide?

    It puts "Exploring the SX Microcontroller" to shame in comparison.··Programming the SX Microcontroller: A Complete Guide by Gunther Daubach is a mixture of the basics and real world experience. He shows you the common mistakes and pitfalls and explains why they happen. The book is divided into 3 basic parts, (1) the main tutorials, (2) Reference material, regarding the SX chip itself and SASM. (3) Many projects and again commentary from Gunther's real world experience.

    But if you want to look at the Propeller, all the available texts,·are in·the Stickies section of the·Propeller forums

    Post Edited (Capt. Quirk) : 8/9/2007 3:13:14 AM GMT
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2007-08-09 07:15
    To follow up on Capt. Quirk's suggestion, you might want to just use this kit for your students:

    www.parallax.com/detail.asp?product_id=45181

    You get a lot for the price.
  • BeanBean Posts: 8,129
    edited 2007-08-09 11:28
    You can always have each of the students use the simulator (SX-Sim) to get their programs working. Then have a few SX-Tech Tool Kits that they can actually run their programs to see the work on REAL hardware.

    That way you don't have to buy an SX-Tech Tool Kit for EACH student.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Teacher: What is the difference between ignorance and apathy ?
    Student: I don't know and I don't care
    Teacher: Correct !
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • JoeAJoeA Posts: 33
    edited 2007-08-09 17:02
    So much to choose from! Thanks for all the input.
    After reviewing earlier comments, at this point I'm leaning toward the Propeller.
    But maybe I'll get some of each and let the students do a comparison!

    JoeA
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2007-08-09 17:13
    For a beginner's class, I strongly recommend the SX. The Propeller is an awesome, powerful device, and therefore much more complex than the SX. As Bean mentioned, your students can do a lot with the simulator SXSim. With the Propeller, they would have to work with real (and more expensive( hardware, as there is no Propeller simulator available.

    I've been teaching 8080s, 6800s, Z-80s and other microprocessors many years ago, so I know this business. I would have been glad if some device like the SX28 had been available at that time at such a low price.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • Steph LindsaySteph Lindsay Posts: 767
    edited 2007-08-09 20:45
    Hello Joe,
    ·
    There are two beginner-level books for the SX in the works, but the emphasis is on SX/B and not assembly.· One is Practical SX/B by Jon Williams; the first two sections of that book are posted in this forum.· The second, by John Kauffman, going to be a mostly-SX/B adaptation of What's a Microcontroller?
    ·
    We do not generally make the editable Word files of Exploring the SX, What's a Microcontroller? or the Propeller Manual available to the public.· However, you will find free·PDF downloads for most Parallax-authored books and they are unlocked.·We have had good results with copying images from them for making·Power-Point course material.·Our copyright policy allows for reproduction of the material for educational use (with Parallax hardware only), as long as you charge the student no more than your cost of making copies.· If you extract and adapt text and pictures from our downloads for your own classroom materials, please just cite the source.
    ·
    You can download a source code preview for Guenther Daubach's excellent book Programming the SX Microcontroller from this page:
    ··
    ·http://www.parallax.com/sx/downloads.asp

    Parallax has not published a beginner-level guide to Propeller Assembly.· The Propeller Education Kit Labs that have been released to date do provide a step-by-step introduction to Spin; you can find them through the sticky-thread in the Propeller forum.

    -Stephanie Lindsay
    Editor, Parallax Inc.
Sign In or Register to comment.