Hi.
Maybe silly question.
I have this setup with 4 * tpic6b595 in series
if i send like this code.
Can i send 4 parts of data right after each other, or do the LATCH need to come to last ?
Meaning, will the update of shift register be notitsable ?
Maybe silly question.
I have this setup with 4 * tpic6b595 in series
if i send like this code.
C:
#define DATA_pin PORTBbits.RB2
#define LATCH_pin PORTAbits.RA5
#define CLCOK_pin PORTBbits.RB1
void clock_signal(void){
CLCOK_pin = 1;
__delay_us(500);
CLCOK_pin = 0;
__delay_us(500);
}
void latch_enable(void)
{
LATCH_pin = 1;
__delay_us(500);
LATCH_pin = 0;
}
void send_data(unsigned int data_out)
{
int i;
for (i=0 ; i<8 ; i++)
{
DATA_pin = (data_out >> i) & (0x01);
clock_signal();
}
latch_enable(); // Data finally submitted
}
void main (void)
{
//init allthing, that part is ok.
while (1)
{
send_data(0b00000011);
send_data(0b11000000);
send_data(0b00110000);
send_data(0b00001100);
}
}
Meaning, will the update of shift register be notitsable ?
Last edited: