[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] SPI troubles on atmega8

From: Jamie Morken
Subject: Re: [avr-gcc-list] SPI troubles on atmega8
Date: Wed, 11 Dec 2002 14:04:38 -0800

> Although your comment next to the SS_BIT pin states correctly that when in
master mode (which seems like what you are trying to do) it should be
configured as output, your DDRB assignment configures it as an input. It may
not be the root cause of your problem, but it certainly contributes to a
sickly behaving SPI interface.
>Looking at your code, it seems that you havn't set the SS_BIT as an output.
If it's left as an input and is driven low, the SPI system becomes a slave
and you are not going to be able to initiate data transfer.  Set that bit as
an output and see what happens.
I hope that fixes your problem.  I went through a bunch of "fun" on the
weekend playing with SPI and a CAN controller.

that fixed it

avr-gcc-list at http://avr1.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]