Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

Driving LED's using CD74HC595 shift register

Status
Not open for further replies.

indiantuktuk

Newbie level 6
Joined
Apr 30, 2009
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Bangalore, India
Activity points
1,356
shift register control led

Hi,

I would wish to drive LED's using the shift register with TMS320F2812 DSP. Have anyone tried this.
Could you let me know how to programme in CCS and control the LED's.

Thx
:D
 

mandar_mahajan

Full Member level 2
Joined
Jul 8, 2009
Messages
134
Helped
7
Reputation
14
Reaction score
5
Trophy points
1,298
Location
mumbai
Activity points
2,090
Hello Mr,
I have used 74HC595 shift reg but i am using c language for programming. If u want it in c then i can provide.
Anyway's refer to the datasheet of 74HC595, it is very simple & easy to implement.


Regards
mandar
 

indiantuktuk

Newbie level 6
Joined
Apr 30, 2009
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Bangalore, India
Activity points
1,356
Dear Mr.Mandar,
Thanks for the response. Could you please share the program. It would provide me clues / directions to develop it further and match to my requirement.

Thx
:D
 

mandar_mahajan

Full Member level 2
Joined
Jul 8, 2009
Messages
134
Helped
7
Reputation
14
Reaction score
5
Trophy points
1,298
Location
mumbai
Activity points
2,090
#define MOSI P2_2
#define SPI_CLK P2_5
#define STROBE P2_6
#define MASTER_RESET P2_7

//*****************************//
// INITIALIZE THIS AT THE START OF PRG.//
//*****************************//
MOSI = 0;
SPI_CLK = 0;
MASTER_RESET = 1;
STROBE = 0;

//*****************************//
void load_seg_data(unsigned char value)
{
unsigned char ch;
for(ch = 0; ch < 8; ch++)
{
if(value & 0x80) // The check is made on the MSB.
MOSI = 1;
else
MOSI = 0;

SPI_CLK = 1; PIN 11 OF 74HC595
STROBE = 0;

SPI_CLK = 0;
value <<= 1; // MSB first
}
STROBE = 1; // RCK PIN 12 OF 74HC595
STROBE = 0;

}


THIS IS THE ROUTINE, U CAN USE IT TO GLOW THE LED'S BY PASSING THE DESIRED VALUE......

rEGARDS
MANDAR
 

indiantuktuk

Newbie level 6
Joined
Apr 30, 2009
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Bangalore, India
Activity points
1,356
Thanks Mandar for the info.

From the program I could understand that the shift register is connected to serial port SIMO / SOMI. Am I right?.

However I have a query. I have connected the shift register to GPIO pin of the processor. Could this be implemented?.
Please suggest.

Thx
:D
 

mandar_mahajan

Full Member level 2
Joined
Jul 8, 2009
Messages
134
Helped
7
Reputation
14
Reaction score
5
Trophy points
1,298
Location
mumbai
Activity points
2,090
U can connect as it is not driven by the SPI engine. But it is always a good practice to follow the SPI connections(CLK,MISO,MOSI & SS).

MOSI-------master out slave in (I am not sure about this pin)

Which controller u r using & also post ur schematic.
 

indiantuktuk

Newbie level 6
Joined
Apr 30, 2009
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Bangalore, India
Activity points
1,356
Dear Mandar,

Apologise for the delay. Please find enclosed the schematics.

I have connected the inputs A,B,CLK,CLR to GPIO pins of the processor (TMS320F2812).

Let me know if you need any more information.

Thx
:D
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top