Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

M8 SPI

2004-01-14 by David VanHorn

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. (at least in the sim..)

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.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.