/* * DON'T use the MOSI/MISO pins. They're for ISP programming only! * Read the datasheet. */ DDRB |= _BV(PB4); // as output (latch) DDRB |= _BV(PB6); // as output (DO) - data out DDRB |= _BV(PB7); // as output (USISCK) - clock DDRB &= ~_BV(PB5); // as input (DI) - data in PORTB |= _BV(PB5); // pullup on (DI)