Help with using Shift Register to interface with 74HC595

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
joli_601446
Level 5
Level 5
10 likes given 10 sign-ins 5 sign-ins

Hello, I have recently purchased the CY8CKIT-044 PSoC® 4 M-Series Pioneer Kit and having a great time learning how to do simple projects. I am trying to write a simple program to interface with a 74HC595 Shift Register to control 8 LEDS. The HC595 has a Clock input, a Serial Data Input and a Latch. I am trying to use the Shift Register in the PSoc Creater and need some help with the top schematic. I have uploaded my top schematic for review. I want to know how I can create a bursted clock that will be used to clock in the data the the HC595. I have tried to use the Clock component from the SYSTEM group and connect it to a Digital Output pin but it won't compile. If anyone could give me some suggestions of know of an example that uses an Shift Register please let me know.

   

 

   

Thanks,

   

Joe

0 Likes
6 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted
        It is not clear why external HC595 is needed to control 8 LEDs, when all can be done inside PSoC4 without external components?   
0 Likes
lock attach
Attachments are accessible only for community members.
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Here is an example that just uses PSOC.  This example was made for a PSOC that had an LCD so if you want to light LEDS you will need to write that code.

0 Likes
lock attach
Attachments are accessible only for community members.
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Here is a PDF on the design.

0 Likes
JeCo_264681
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

You didn't describe the project and its goal. But you can control a lot of LEDs with minimum number of pins by Charlieplexing. This method lets you use only N output pins to control (N*N)-N output LEDs. Google it.

0 Likes
joli_601446
Level 5
Level 5
10 likes given 10 sign-ins 5 sign-ins

Hello and thanks everyone for responding to my post. I've been doing some Arduino experiments with my daughter and in the last experiment we used an 74HC595 to control 8 LEDs. It was pretty easy, mainly because there's books that describe how to code the little processor. So every week we do a lab and I'm trying to do the same lab experiment on the CY8CKIT-044.  I found the Shift Register in the list of components and thought it would be easy but I hit a few roadblocks mainly on the wiring. I know how to control the latch and the serial data will be from the shift register but I ned to get a bursted clock working. I thought I could use an AND gate with a clock input and an enable from the main.c program that would gate the clock on and off. But first I need to get a Clock connected to an output pin. Thanks for the examples. I'll try to get things working. Its fun stuff and a way for me to learn a new processor. 

   

 

   

Thanks,

   

Joe

   

California

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted
        Joe, I suppose that the project goal is to blink LEDs in a circular pattern at slow rate of few Hz. The easiest way to do that in software code, not using shift register. Just drop ControlReg on schematic and connect outputs to pins. When you write a value to the Control Reg, it will update 8 LEDs., etc. But, of course, soldering is more fun (when it's smoking high).   
0 Likes