[SOLVED] Problem with TPIC6B595N shift register

Status
Not open for further replies.

addisonElliott

Newbie level 6
Joined
Apr 1, 2013
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,395
Hello, I am working on a LED matrix and I ordered some shift registers to use. I have never used them before so I just set them up on a test circuit with four output LEDs just to get a feel of what programming will be needed to use this thing. Long story short, I tried every possible outcome and I don't get any response from the shift register. They are from China on ebay. I actually got a refund from the first batch and ordered another from the same seller to see if it was just that; the results were the same each time. The guy just gets it from a supplier in China, but I am starting to think they are bad.

I would just like a confirmation that I am doing it right since I have never used these. For all I know, I could be doing something wrong. Here's the setup I have:
All three GNDs are connected to a ground, and the VCC is connected.
SER IN is connected to D0
SRCK is connected to D1
RCK is connected to D2
ENABLE is connected to D3
SRCLR is connected to D4

This is my code:
Code:
int main(void)
{
	/*
		D0 - SER IN
		D1 - SRCK
		D2 - RCK
		D3 - ENABLE
		D4 - SRCLR
	*/
	DDRD = 0b00011111;
	PORTD = (1 << 4);

	uint8_t i;
	for (i = 0; i < 7; ++i)
	{
		PORTD |= (1 << 0);
		PORTD |= (1 << 1); // SRCK high
		_delay_ms(1);
		PORTD &= ~(1 << 1); // SRCK low
	}

	PORTD |= (1 << 2); // RCK high
	_delay_ms(1000);
	PORTD &= ~(1 << 2); // RCK low

    return 0;
}
 

I can't comment on your code but when you test a chip, use the specs and follow the same conditions to check each pin is correct. Do you have a pullup resistor on each open drain output?




follow the logic. I doubt the chips are bad.
 

Attachments

  • 595.gif
    32.4 KB · Views: 99

I would follow it but it does confuse me. What does word generator mean? Should I just put those in the micro controller.

There is no graph of the serial clear so what do I set that to? Reading about the pins, enable should be set to low so keeping it high shouldn't accomplish anything.

- - - Updated - - -

Although I still don't understand the test circuit, I went through and looked through the internals of it and found out that it does not output a positive signal, it outputs a negative. So I switched my LEDs around and it works perfectly Thank you.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…