Shop OBEX P1 Docs P2 Docs Learn Events
Shift In/Out — Parallax Forums

Shift In/Out

Zack BloomZack Bloom Posts: 7
edited 2006-10-26 20:34 in Propeller 1
Does anyone have a good set of assembly based Serial Shift In and Out functions?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-10-26 00:38
    SPIN is pretty fast for serial shift in and out functions. What is it exactly that you want to accomplish?
  • JavalinJavalin Posts: 892
    edited 2006-10-26 10:00
    Look in the "Assembler tricks" sticky thread at the top of this forum. Beau has posted and excellent set of examples including SPI/shiftin-out routines.
  • Beau SchwabeBeau Schwabe Posts: 6,560
    edited 2006-10-26 16:27
    Zack Bloom,

    Keep in mind when looking at that thread, you may need to insert delays.· The code was tested with 74HC165 and 74HC595's but for some·devices
    the Assembly SPI example might be too fast.




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Zack BloomZack Bloom Posts: 7
    edited 2006-10-26 20:21
    My specific application at the moment is to interface the HM55B compass. I would rather use asm then spin, if I can get more speed why not?
  • Zack BloomZack Bloom Posts: 7
    edited 2006-10-26 20:29
    Ha, I'm an iddot. I just saw the code I need in the object library.
  • Mike GreenMike Green Posts: 23,101
    edited 2006-10-26 20:34
    The HM55B compass does not need the speed of assembly language. SPIN is much easier to use than assembly, much easier to read, has basic operators that don't exist in assembly (like multiplication and division). The ability to structure programs around subroutine calls with parameters, local variables, objects, case and if statements, etc. makes constructing and debugging a program much easier.
Sign In or Register to comment.