View Full Version : Shift In/Out

Zack Bloom
10-26-2006, 07:57 AM
Does anyone have a good set of assembly based Serial Shift In and Out functions?

Mike Green
10-26-2006, 08:38 AM
SPIN is pretty fast for serial shift in and out functions. What is it exactly that you want to accomplish?

10-26-2006, 06:00 PM
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 Schwabe
10-27-2006, 12:27 AM
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 (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

Zack Bloom
10-27-2006, 04:21 AM
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 Bloom
10-27-2006, 04:29 AM
Ha, I'm an iddot. I just saw the code I need in the object library.

Mike Green
10-27-2006, 04:34 AM
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.