Can it really be that slow compared with an Arduino Uno ?
retromicro
Posts: 24
in Propeller 1
Hi
I've got one of those 64x16 LED dot matrix displays and can get a steady display on it using an Arduino Uno R3.
I was hoping to use a Prop with one cog to display a frame buffer and another to do other things including writing into the frame buffer.
So, I converted the fundamentals of the code into Spin and found that I get a very flickery display.
Probing the shift register latch data outputs on both controllers shows a significant performance difference. I attach screenshots. Dividing the frequency by the rows (16) will show the panel refresh rates.
I also attached the Arduino and Spin code examples.
Am I missing something here ?
Thanks
I've got one of those 64x16 LED dot matrix displays and can get a steady display on it using an Arduino Uno R3.
I was hoping to use a Prop with one cog to display a frame buffer and another to do other things including writing into the frame buffer.
So, I converted the fundamentals of the code into Spin and found that I get a very flickery display.
Probing the shift register latch data outputs on both controllers shows a significant performance difference. I attach screenshots. Dividing the frequency by the rows (16) will show the panel refresh rates.
I also attached the Arduino and Spin code examples.
Am I missing something here ?
Thanks
Comments
Or: C using SimpleIDE.
Spin is interpreted and is much slower than either Pasm or C.
How did I know that you were going to say that ?
I spent half the Eighties writing assembly language for just the same reason and even back then most of it was for bit banging but it feels like we shouldn't need to do that now.
I guess that I'll just have to get on with it. Or VHDL.
-Phil
We don't, actually and although it continues to be ignored, PropBASIC will give you PASM speed and is easier than using SPIN or any other language for that matter.
Ultimately the speed of the Arduino is because it's executing machine code, not interpreting it like Spin.
And I'm getting ~5.4 kHz on the latch line which is 0.186 ms high time and so short of a low time that I don't trust the 0.25us reported by my logic analyzer.
Thanks. So I pasted that in and got a decent increase in performance.
Whoa !
Seriously, that really brought a smile to my face thanks.
I just need to work out where to paste it all into a blank template and I'll report back with the visual quality and a snap from the scope.
http://learn.parallax.com/propeller-c-simple-protocols/spi-example
Would I be able to run this on a single cog and call from Spin code running on another ?
Thanks
Possible... Yes I think so. Easy? Not really. You could convert the rest of your program to C++ with spin2cpp though
Just an update. I decided to learn some Propeller assembly language and now I have a very smooth display panel. There's still tidying up to do but the trickiest part is done.
Thanks