...
u08 ads7809Init(void)
{
// initialize spi interface
spiInit();
/* External DATACLK = 100kHz ~ 10MHz */
// switch to f/4 bitrate
cbi(SPCR, SPR0);
cbi(SPCR, SPR1); // SPI Clock Rate: 2MHz
// sbi(SPSR, SPI2X);
// setup clock
/*
If EXT/INT is HIGH, data will be output synchronized
to the clock input on DATACLK.
*/
sbi(ADS7809_CKS_DDR, ADS7809_CKS_PIN);
sbi(ADS7809_CKS_PORT, ADS7809_CKS_PIN); // External Clock
...