Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Problem with TPIC6B595N shift register

Status
Not open for further replies.

addisonElliott

Newbie level 6
Newbie level 6
Joined
Apr 1, 2013
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
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?

595.gif
595sch.gif

follow the logic. I doubt the chips are bad.
 

Attachments

  • 595.gif
    595.gif
    32.4 KB · Views: 102

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top