SPI Problem

Hello Everybody,

I’m working with a Rabbit minicore RCM5700, and I’m trying to write by SPI
serial bus using the SPI.LIB library. I’m using Dynamic C version 10.44 and
it’s libraries.

I want to use PORT B as SPI port, so I have defined #define SPI_SER_B,
before include SPI.LIB, in other words, my real code is:

#define SPI_SER_B
#define SPI_CLK_DIVISOR 5
#define SPI_MASTER //we are master
#use “spi.lib”

When I write to SPI by SPIWrite function I can’t see any data in PC4 line,
but SCK line (PB0) is working properly.

I have read in SPI.LIB header:
“This library is intended for use only with the Rabbit 4000 processor.”
and I have a Rabbit 5000 processor so I think it could be a little
different, is there a new SPI library for these processors? where can I get
it?

If you had the same error as me in the past, can you help me?

Thanks in advance

Carmen

Hi, I have exect the same problem. SPI using the Rabbit (RCW 5700) works allright if I use it as master (thermocouple-digital IC that sends the temperature to my Rabbit). But if I want to send data to a LED driver it doesn work. The ~CS is allright, the clock is OK, but I cant find the data port (using spi serial port B).

Hi,

I resolved the problem using a new library instead SPI.LIB supply by Rabbit Enviroment (DC_RABBIT_10.44). This new library is SPITecnalia, and I attach you below. I used PORTB as SPI Port

This library has a few changes to the old one. One of them is to set up SPI clock mode. Another change is in order to set up PC4 as a serial port output by setting bit 4 in the PCFR register. The SPI driver was written before Rabbit 5000 was in existence and port C was fixed.

I hope you have success with this library

Best Regards

Carmen