SPI problem

David VanHorn <[email protected]> Tue, 13 Jan 2004 14:37:54 -0500
Newsgroups gmane.comp.hardware.avr.general
Message-ID <[email protected]>
What am I missing here?

I'm setting up SPI as a master on a mega 8, but it never outputs any data, and SPIF never sets.

SPSR is 0x01 ( I want double speed mode)
SPCR is 0x50 ( I want fast, master, enabled, no int)

DDRB is 0xEF
PORTB is 0x14
PINB is 0x0C, but I don't think it matters.

When I drop the data in SPDR (in sim) the data dissapears on the next cycle, but that's it. Nothing happens on the PORTB pins, and SPIF in SPSR never sets, so I hang waiting for transmit to complete.