Rainbowduino V3 Interrupt vs. Serial Communication

Hi all,

Currently I’m trying to write some code for my Rainbowduino V3 which should be able to receive full 8x8 frames at 20-25 frames/s send out by a Java application via a serial connection over the build-in USB connector. Right now I’m able to stream those 8x8 frames pretty reliable with 25fps to my Rainbowduino and I’m also able to get the provided Rainbowduino3.0 Library up and running using some drawing routines in the Rainbowduino controller itself.

But if I try to combine both than I get lots of data corruption errors on my serial connection. From my understanding this is coming from conflicts between the Rainbdowduino interrupt that drives the LEDs and the Arduino Library interrupt used to handle the serial communication. I’ve also tried once to rewirte the Rainbowduino3.0 library using the FlexiTimer2 library directly in the Arduino sketch to control the interrupt handling but this lead to the same results. I’m not an interrrupt expert so that I don’t know if I can tweak something in that area to fix this.

Some questions that I do have right now: Do you think this is actually doable what I try to archive there or am I fighting against some hardware restrictions that I won’t be able to work around? If a serial connection isn’t an option: Will a I2C connection between an Arduino and a Rainbowduino suffer from the same problems? Does the Wire Library also use interrupts to handle the incoming data?

Ideas, anyone? :slight_smile:

Greetings,
Markus

Hi~
Can you post you Arduino code in here,so I can check if the Code’s problem?
Before I use the Rainbowduino to contral the RainCube,I write a C# software to contral the Rainbow cube,It can work so good.
So i think the hardware is not the problem.I also use the Rainbowduino Lib,I do not change it,it can work so good.