[Top][All Lists]

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

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

From: Anton Erasmus
Subject: Re: [avr-gcc-list] SPI troubles on atmega8
Date: Thu, 12 Dec 2002 08:18:10 +0200

On 02/12/10 at 11:25 Jamie Morken wrote:

>I am trying to get the SPI on my atmega8 chip to send 1 byte over the MOSI
>After doing the send I wait for the transmit complete flag in the SPI
>to be set.  For some reason the flag is not being set and I don't think
>any data is
>being transmitted either.
>I put the code I am using here:
>It locks up right before the line:
>       PRINT("byte sent");


Try reading the  SPSR register before writing the SPDR register.
Reading the SPSR register will clear the flag.

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

reply via email to

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