did somebody already used shift registers with the spi?
I am sending a word of 8 bits which I reads correctly on the oscilloscope, but not on the exits of the shift register!
“wiring okâ€
did somebody already used shift registers with the spi?
I am sending a word of 8 bits which I reads correctly on the oscilloscope, but not on the exits of the shift register!
“wiring okâ€
lpcH2129:
did somebody already used shift registers with the spi?I am sending a word of 8 bits which I reads correctly on the oscilloscope, but not on the exits of the shift register!
“wiring okâ€
You can run the 595 at 3.3V or 5V. Either way you go, you shouldn’t have to put any resistors inline as long as you’re running your uC at 3.3V.
On the 595, make sure that your SCLR pin is tied to high logic level and your G pin is tied to low logic level. Also, make sure that you clock RCLK once after you get all of your info transferred over SPI or the sent data won’t appear at the outputs of the 595. SCK will obviously be tied to your SPI clock output on your micro and SER would connect to your micro’s SPI MOSI pin.
I think you can tie the RCLK (or ST_CP or whatever it is called) to the SPI chip select. This way, the output register is updated as the chip select becomes inactive at the end of transfer.
Good call, bertrik. I forgot about having the CS pin on the uC.
thank you very much for your answers,
for the shift registers it regulated, now I have another problem, when I sending of characters via the SPI and by looking at the exit on an oscillo, its not tke same,
but when I sending of figures the mosi signal is correct!? a suggestion? I send the code
thank you
void lcd_data(unsigned char c )
{
spi(0xA0); //E =1, RW =0 ,RS=1
spi(c);
valid();
}
void affiche ( unsigned char *car)
{
int i=0;
for(i=0;i<16;i++)
{ lcd_data(car*);*
}
}