Provato anche così e con diversi delay..1,5,15ms ma niente.. niente da fare..
/*************************************************************************
Function: SPI_init()
Purpose: initialize the SPI bus
**************************************************************************/
void SPI_init (void)
{
DDRB = 0xFF;
PORTB = 0xFF;
DDRB = _BV(PB0) | _BV(PB3) | _BV(PB5); // set SCK,MOSI,PB0 as Fsync
PORTB = _BV(PB5) | _BV(PB0); // SCK and PB0 high
SPCR = _BV(SPE)| _BV(MSTR)| _BV(CPOL); // Enable SPI // Set Master mode // Set clk to inv.
// SPCR |= _BV(SPR0) // Clk speed = fck/4, SPR0,SPR1 = 0,0 // uncomment for fck/16
}
Secondo voi c'è qualcosa di sbagliato qui?