Going crazy with PIC16F and 74HC595 serial-parallel register

Status
Not open for further replies.

quintosardo

Newbie level 3
Joined
Jul 3, 2006
Messages
4
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,315
74hc595 serial

Hi,
I'm new here, I've found this very interesting forum by internet search and, so, I subscribed.

I'm writing because I'm going crazy with a very basic problem:

I'm using a PIC microcontroller to drive a Philips 74HC595 serial-parallel register. I've seen discussions about this here, I've downloaded a C example, too, and it contains exactly what I already knew (74HC595 should be very easy to use).

I cannot solve this:
I send a byte from the PIC to the register, it gets strange outputs (sometime the right one, sometimes another one), and after 2 or 3 times it gest stuck and the output doesn't change anymore.
I'm using ports a, d and e from PIC.
I've connected the two clocks together (shift and latch) so I drive both with a single PIC port. Then I close the byte with one clock cicle more (because the manual says that if you connect the clocks together shift is one step forward).
My system runs with a 10MHz clock, I set a huge pause between clock_up/clock_down (about 10x20x20 cycles).

Going crazy with this.

What can be the problem?
Maybe lack of pull-up resistors?
Maybe the wrong kind of outputs from the PIC?

Any idea?

Thanks a lot for any suggestion

Quinto
 

Re: Going crazy with PIC16F and 74HC595 serial-parallel regi

Solved.

It is possible to drive a 595 with 2 wires:

- serial data in
- shift and latch clocks tied together

You have to add one clock up/dw because (like in the datasheet) latch clock is one step behind shift clock when tied together.


This isn't a good solution if you care about outputs toggling while setting a new configuration
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…