View Full Version : Shift In/Out
10-26-2006, 06:57 AM
Does anyone have a good set of assembly based Serial Shift In and Out functions?
10-26-2006, 07: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, 05: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 (Parallax)
10-26-2006, 11:27 PM
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:firstname.lastname@example.org)
IC Layout Engineer
10-27-2006, 03: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?
10-27-2006, 03:29 AM
Ha, I'm an iddot. I just saw the code I need in the object library.
10-27-2006, 03: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.