Try using shiftout and shiftin. It's one less thing to worry about in your coding. Also, at 4 MHz, I don't believe your pauseus can go much below 20 uS minimum. Use five nops using asm if you need such a short delay. Shiftin uses the 0 mode, and Shiftout the 1.
Ron
Bookmarks