bianchi77
Advanced Member level 4
- Joined
- Jun 11, 2009
- Messages
- 1,313
- Helped
- 21
- Reputation
- 44
- Reaction score
- 20
- Trophy points
- 1,318
- Location
- California
- Activity points
- 9,442
Guys
Do I make a correct SPI init on ATMEGA128 ?
My clock is 16Mhz,
what's the clock for SPI (SCK) ?
Code:
Thank you
Do I make a correct SPI init on ATMEGA128 ?
My clock is 16Mhz,
what's the clock for SPI (SCK) ?
Code:
Code:
void spi_init(void)
{
SPCR = 0x52; //setup SPI: Master mode, MSB first, SCK phase low, SCK idle low
SPSR = 0x00;
}