simulavr-devel
[Top][All Lists]
Advanced

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

[Simulavr-devel] SPI Device Support?


From: Joel Sherrill
Subject: [Simulavr-devel] SPI Device Support?
Date: Tue, 17 Mar 2009 16:25:20 -0500
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Hi,

I have tracked down the message I got to
it looking a lot like something is not
right in the SPI support :

============================
/* compiled with -mmcpu=atmega128 */
#include <avr/io.h>

int main(void) {
 /* Set up SPI to talk to ADS1258 */
 SPCR = (1<<MSTR) | (1 << SPE);
}
============================

results in this message:

spsr is read only! (0x69 =  main+0x1)

It looks like it should be able to write to
SPCR to put it into master mode.  The offending
line is very close to the example in the atmega128
manual.

And that brings up the next question.. Since I
have to simulate a TI ADS1258 SPI analog, does
anyone have any suggestions on how to hook a
simulated device on the SPI bus?

--
Joel Sherrill, Ph.D.             Director of Research & Development
address@hidden        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
  Support Available             (256) 722-9985






reply via email to

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