> 1.I must use 3 IO to control the shift register. (data, srclr, clock) #define data PORTA,0 #define srclr PORTA,1 #define clock PORTA,2 I am used to define port pins as variables when it's possible so I dont end up not knowing which pin is doing what. > 2. Any time I adjust a bit, I must set/reset them all (shifting). - right. > 3. To code for this puppy, I will need a delay, clock routine of 5khz > a clock line low (for not yet determined amount of time) > a data send routine > a clock high (for a not yet determined amount of time) ; RESET shift registers (since 595 max freq if 20Mhz and ; PICs instrunctions execute at Fosc/4 no need for delays ; and I thing the relays won't sense these speed, but it they ; do you only have to integrate the command signals ; PIC pin - Resistor - Capacitor to ground - transistor base ; to get a hardware delay so the relays will bu munb to the fast changes) bcf srclr nop nop bsf srclr ;send data movlw .8 ; you have to send 8 bits movwf loopvar ; variable for controling the loop loop: bcf clock rrf outbyte,f ; put bit to be sent in CARRY btfss status,c bcf data btfsc status,c bsf data bsf clock ; put clock high nop ; wait a short while nop decfsz loopvar,f ; if all 8 bites sent then get out you are donne goto loop bcf clock ;leave clock low return You get away like this without any delay routine, clock routine (5kHz?) this is the routine I am using in my project and it's tested > 4. I only have to clock when updating register - right > 5. If I used 2 shift registers, I could use the same line for clock on both > since clock by itself won't affect register. - not quite right. If you are updating both of them in the same routine (you obtain a 16bit shift register) you have common clock and reset. The registers have to be cascaded in order to obtain this, but if you want two independent 8 bit shift registers, you have to have separate clock lines since the clock "moves" the data at the input to te "next" output. You still can have common data lines since data without clock does nothing. This is not "trouble" as you call it. It's experience and cost saving! Stick on using only what you need and you'l have better and cheaper projects! PICs with more pins have more functions and that means to you more trouble in writting the code. Hope beeing of some help, Mircea Chiriciuc EMCO INVEST P.S. The wiring is the one I used and it seems OK to me. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads