NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » SCK outside of SPI

January 05, 2011
by weijiajun
weijiajun's Avatar

So I have a shift register that I am trying to use that is not the SPI version but rather a serial to parallel version 74HC164N. Anyways the question I have is can I still use the SCK as a clock or is that only there for SPI. I know I could create a "manual" clock but I wondered if there was already a way to do this.

Thanks.

January 05, 2011
by Ralphxyz
Ralphxyz's Avatar

I believe a clock pulse is a clock pulse so try it, see what you get.

Ralph

January 05, 2011
by mrobbins
(NerdKits Staff)

mrobbins's Avatar

Hi weijiajun,

We used the '164 serial-to-parallel shift register for our Robotic Xylophone video, and drove it from the SPI bus (MOSI and SCK pins out from microcontroller), so it definitely works fine. The "manual" clock option also works.

Mike

January 06, 2011
by Rick_S
Rick_S's Avatar

I've programmed 74HC595's with SPI as well. It's very similar to the 164, just with the option to cascade through the serial output. It works fine. If you look in the Photography Club Rating Project thread, about half way down, I posted some sample code for the 595. It may or may not help, but hopefully could give you an Idea of another implementation along with Mike's Xylophone project.

Rick

January 06, 2011
by weijiajun
weijiajun's Avatar

Thanks for the links and ideas. Rick after you suggestion I just picked up some 595s from digikey so I will play with those when I get them.

My original reason for not wanting to use SP1 was because I didn't see a CS(SS) on the 164 and I was already going to use SPI to talk to an SD card. However after looking at your implementation Mike I think it would work if I used pin A as a CS. What are you thoughts on that?

Post a Reply

Please log in to post a reply.

Did you know that microcontrollers have two different kinds of memory, program space (flash) and SRAM? Learn more...