romel_emperado
Advanced Member level 2
- Joined
- Jul 23, 2009
- Messages
- 606
- Helped
- 45
- Reputation
- 132
- Reaction score
- 65
- Trophy points
- 1,318
- Location
- philippines
- Activity points
- 6,061
The ’HC597 and CD74HCT597 are high-speed silicon gate
CMOS devices that are pin-compatible with the LSTTL 597
devices. Each device consists of an 8-flip-flop input register
and an 8-bit parallel-in/serial-in, serial-out shift register. Each
register is controlled by its own clock. A “low” on the parallel
load input (PL) shifts parallel stored data asynchronously into
the shift register. A “low” master input (MR) clears the shift
register. Serial input data can also be synchronously shifted
through the shift register when PL is high.
The secret is to identify the right terms with sufficient selectivity. You can e.g. try "shiftregister io" and get mostly microprocessor related hits on the first page.how come google is not giving me this site.. I already gone in searching up to page 10 of google
The secret is to identify the right terms with sufficient selectivity. You can e.g. try "shiftregister io" and get mostly microprocessor related hits on the first page.
Proteus has both 74HC597 and 74HCT597
---------- Post added at 17:24 ---------- Previous post was at 17:22 ----------
you need a clock and a data input, it resembles the SPI protocol but you do it manually using two pins, you change the state of one pin as a clock to shift the data and you read the data using the other pin, then shift one more and read again until you read all the bits
#define IN_LATCH PORTDbits.RD0 //to shift the parallel port input pin states (D0-D7) to the parallel register
#define PLOAD PORTDbits.RD1 //move the data present in the parallel input register to the serial shift register
#define CLOCK PORTDbits.RD2 //to shift the bits out on the serial data output pin 9
#define DATA_INPUT PORTDbits.RD3 //data line input
int get_data()
{
int data = 0,i;
/* latch input PINs */
IN_LATCH = 0;
delayms(1);
IN_LATCH = 1;
PLOAD = 0; //move data to serial shift register
for (i=7; i>=0; i--)
{
toggle_clock(); //clock out
if(DATA_INPUT)
data |= (1 << i); //store data received
}
PLOAD = 1;
return data;
}
void toggle_clock()
{
CLOCK = 0;
delayms(1);
CLOCK = 1;
}
Hi Romel,
Here are a few more examples of using a shift register with C source code:
Using shift registers to extend the microcontroller I/O
Can you move over? The 74HC595 8 bit shift register - Arduino but nice tutorial
LED matrix using shift registers
Hope they help,
BigDog
These are nice tutorials but they describe the serial to parallel conversion using 74HC595, Romel is asking for parallel to serial using 74HC597
Alex
---------- Post added at 01:07 ---------- Previous post was at 00:39 ----------
Set DS to 0 (output) can be hardwired
Set MR to 1 (output) can be hardwired
Set STCP to 0 (output) needs to be toggled
Set PL to 1 (output) needs to be toggled
Set SHCP to 0 (output) needs to be toggled
to load data
Set STCP to 1
delay 1us
Set STCP to 0 (load flip flop)
delay 1us
Set PL to 0
delay 1us
Set PL to 1 (parallel load)
now bit 7 is already available for read
toggle clock SHCP (to 1 and then again to 0)
now bit 6 is available for read
toggle clock SHCP (to 1 and then again to 0)
....
Set DS to 0 (output) can be hardwired
Set MR to 1 (output) can be hardwired
Set STCP to 0 (output) needs to be toggled
Set PL to 1 (output) needs to be toggled
Set SHCP to 0 (output) needs to be toggled
We use the 595 by presenting a bit of data on the serial data input pin 14 (DS) and then toggling the shift register clock input pin 11(SH_CP) as shown in Figure 5. We do this for the 8-bits that we want to shift into the register, then we toggle the shift register clock input pin 12 (ST_CP) to cause the 595 to move the data from the serial shift register to the parallel output register. We can hook these in series so that the serial data output line pin 9 is connected to the next 595s serial data input pin 14 (DS). The only difference is that we shift in 16-bits instead of 8 as with the single 595.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?