Go Down

Topic: Arduino Due SPI_CLOCK_DIV64 Troubleshooting (Read 494 times) previous topic - next topic

sbmizrahi

Hi folks!

I'm new to this forum and would really appreciate your help!

I have just bought an Arduino Due because I need extra processing power to run a Connect 4 game and utlimately a chess game I am planning to write. I am running the code on Arduino Uno and everything works perfectly well. I use an Olimex 8x8 rgb LED matrix to display the board game.

I have reconnected it to the Due and cannot get it to drive the Led matrix. The code downloads and runs (I can it see from Serial monitor) but there is a problem with the LED matrix: it will not display the Board: I only have a single red led on the top left corner.

The problem I believe has to do with  SPI.setClockDivider. On Arduino Uno it was set at SPI_CLOCK_DIV64. As far as I understand this means running the device at 250 khz (16Mhz / 64). I understand the Due runs at 84 Mhz (which is why I bought it) with a maximum divider set at 255 which means the slowest speed I can get is 329 khz which is way too fast for the Led Matrix.

Does anyone know how I can resolve this clock problem?
Can I slow the Due speed down to drive the display at 250 khz?
Will the Olimex display run at higher speeds?
Or will I need to invest in a new Led Matrix?

Would really appreciate some solutions

Simon


Go Up