I have an spi interface set up on my stmega328 that works well for the most part. In one case when using it with a device the first bit is held hi in every case.
So sending 0x01, 0x42 comes across as 0x01, 0xC2
This is my spi set up: SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR1)|(1<<SPR0)|(1<<DORD)|(1<<CPHA)|(1<<CPOL);//needed for psx, could try without (1<<SPR0)
implementation like so:
SPDR = podatek;
while(!(SPSR & (1<<SPIF)));
I'm pretty sure its hardware related as the device is designed to communicate to a play station controller and does so for all but one I have. In this one case I get the above effect. I'm more curios in what would cause that? Maybe a week pullup? I added the schematic (this was for an atmega8 board) .