archimag0, I am at the Maker Faire with the Spark Team but when I get back home Monday I will port the library for you if you don’t mind waiting.
That’s so kind of you to offer peekay - thank you so much. I can of course wait as long as you need!
archimag0, I am reviewing the code and I need to know if you wish to use hardware SPI instead of the software SPI? Are you trying to run a specific example that I can look at?
Hi peekay123; at this point I’m just trying to get the examples ( https://github.com/freetronics/DMD2/tree/master/examples ) to run to see that it actually works - once I have those going I plan to start developing my own project. What would the advantages/disadvantages be to hardware vs software?
Ok, so it seems all the examples use “SoftDMD” which is the software SPI. I will switch the examples to hardware SPI and port the library to the Spark so you can test. Stay tuned!
You rock! Thank you.
@archimag0, I have the library ported and compiling. I find parts to be “sloppy” but I believe we can get it working. I have to go over a couple of items and I will post it on my github later so you can test it.
Things to know: I setup the example to use hadware SPI. The pins connect as follows:
Spark DMD A5 R (MOSI) A3 CLK (SCK) A0 nOE (A0 supports PWM for brightness other than 255) D4 A D3 B D2 SCK
The SPI clock is set to 4.5MHz. Let me know how it goes!
Thanks peekay!! I’ll try and test it tonight or tomorrow. Fingers crossed!
It’s a start! The library is setup to NOT use the hardware timer. Perhaps this is the problem. I may need to put a logic analyzer on the outputs to see what it’s doing. It just means more work
Yay, work! Well let me know what you need from me…
Just a quick thought–the old software SPI is going to be a lot slower than 4.5MHz. Maybe you should try
SPI_CLOCK_DIV64 for 1.125 MHz.
@bko I just tried that - no change unfortunately.
I also just realized that this DMD library is version 2 of the original library here, https://github.com/freetronics/DMD - perhaps the older version will provide some clues?
DMD2 is in beta so that may be an issue. @archimag0 did you check your wiring against the pins I set the defaults to? I will look at porting the older library and perhaps we can go from there. Stand by
UPDATE: I have the DMD library ported (using the IntervalTimer library to boot!). I will have it on github in the morning… I need sleep!
Wow, you work fast! I’ll test it tonight. I did check my wiring several times.
@archimag0, the [DMD library] is on my github.
!!! NOTE: DMD reads the default SPI CS pin (A2) to see if another device is using the SPI bus. If the value read is not HIGH, the DMD will NOT refresh. This may need to be modified or the CS pin pulled HIGH for the code to function correctly. Keep me posted!
I just tested the DMD1 library and I get the same result. Hmm…
EDIT: Not sure if this is relevant, but I was playing with the wiring to see if that had anything to do with it, and if I pull the A and B wires and start playing with them it makes different LEDs light up. Something is happening…
@archimag0, I just realized that these are 5V displays! You will need to use level shifters (3.3v to 5V) between the Spark and the Freetronics unit. Are you using level shifters?
Oh shoot! How did I miss that. Good catch! I hope that’s it…