avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] SPI problem fixed


From: Jack Valmadre
Subject: Re: [avr-gcc-list] SPI problem fixed
Date: Thu, 19 Aug 2004 15:05:41 +1000

I fixed the problem.  Looks like I had to read the incoming data before
transmitting again.
This code worked fine:

 SPDR = 0xAA; //sync byte
 while(!(SPSR & (1<<SPIF)));
 readBuf = SPDR;

 SPDR = 0x01; //getmodinfo
 while(!(SPSR & (1<<SPIF)));
 readBuf = SPDR;

Thanks anyway
Jack.


----- Original Message ----- 
From: "Jack Valmadre" <address@hidden>
To: <address@hidden>
Sent: Thursday, August 19, 2004 12:57 PM
Subject: Re: [avr-gcc-list] SPI problem


> The LED should stay on until the power is cut or the micro is reset.
> Jack
>
>
> ----- Original Message ----- 
> From: "Rick Mann" <address@hidden>
> To: <address@hidden>
> Sent: Thursday, August 19, 2004 12:34 PM
> Subject: Re: [avr-gcc-list] SPI problem
>
>
> >
> > On Aug 18, 2004, at 16:52, Jack Valmadre wrote:
> >
> > > I have an LED attached to pin 5 on port D, but the LED does not light
> > > up, so
> > > the program doesn't seem to make it past the second transmit.
> >
> > If the line isn't going high (or low) for very long, then you'll never
> > see the LED light up. You should check with an oscilloscope.
> >
> > -- 
> > Rick
> >
> >
> > _______________________________________________
> > avr-gcc-list mailing list
> > address@hidden
> > http://www.avr1.org/mailman/listinfo/avr-gcc-list
>
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://www.avr1.org/mailman/listinfo/avr-gcc-list



reply via email to

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