# SPI in RCM6700

**URL:** https://forums.digi.com/t/spi-in-rcm6700/9483
**Category:** Rabbit
**Created:** [May 9, 2012, 4:13pm UTC](https://forums.digi.com/t/spi-in-rcm6700/9483 "2012-05-09T16:13:18Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![carmenc](https://avatars.discourse-cdn.com/v4/letter/c/7ea924/32.png) [@carmenc](https://forums.digi.com/u/carmenc)
#### Post date: [May 9, 2012, 4:13pm UTC](https://forums.digi.com/t/spi-in-rcm6700/9483/1 "2012-05-09T16:13:18Z")

</div>

Hello Everybody,

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

My code is:

#define SPI\_CLOCK\_MODE 2  
#define SPI\_SER\_B  
#define SPI\_CLK\_DIVISOR 100  
#define CLOCK\_PORT B  
#define CLOCK\_BIT 0  
#define SPI\_RX\_PORT SPI\_RX\_PD  
#define SPI\_MODE\_SERIAL  
#define SPI\_MASTER //we are master

#use “SPI.LIB”

When I try to read from an FPGA I get an invalid value, but I see, with an scope, that timing is correct and FPGA puts a correct value in RX line.  
I have the same code with an RCM5700 and everything goes fine.

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

Thanks in advance

Carmen

---

<div class="post-metadata">

### Author: ![gvelasco](https://avatars.discourse-cdn.com/v4/letter/g/3d9bf3/32.png) [@gvelasco](https://forums.digi.com/u/gvelasco)
#### Post date: [January 9, 2013, 2:25pm UTC](https://forums.digi.com/t/spi-in-rcm6700/9483/2 "2013-01-09T14:25:08Z")

</div>

There is a patch for SPI in Dynamic C 10.xx:

[http://www.digi.com/support/downloads/index?Hu88OhfOyta1iXqAaeDCVt1oxGv8ROm9JKrc0XGVAw3MgH3via8Ivhx6pcb3NF7B](http://www.digi.com/support/downloads/index?Hu88OhfOyta1iXqAaeDCVt1oxGv8ROm9JKrc0XGVAw3MgH3via8Ivhx6pcb3NF7B)

---

<div class="post-metadata">

### Author: ![cpigilam](https://avatars.discourse-cdn.com/v4/letter/c/fbc32d/32.png) [@cpigilam](https://forums.digi.com/u/cpigilam)
#### Post date: [January 23, 2013, 6:40am UTC](https://forums.digi.com/t/spi-in-rcm6700/9483/3 "2013-01-23T06:40:13Z")

</div>

Hello, in the Dynamic C 10.70 already the SPI.LIB file has been updated. No need to use this patch in DC 10.70. But check the application SPITEST\_4000.C provided with this patch. It may helpful.
