Speed.. Propeller vs. Arduino Micro
tj4shee
Posts: 25
Really hoping someone can help me understand the problem... or at least the reasoning....
I have a 0.96 " 128x96 pixel single color OLED with an SSD1306 chip... attached via I2C... I have ported the Adafruit libraries over to SimpleIDE.
Here are the 2 platforms being compared.... both running pretty much the same C code and using I2C.
Prop Prof Dev board... Prop1 with a 6.25 MHz Crystal.... running at 100 MHz with PLL16x
Freeduino with ATmega328u4 and 16 MHz crystal
the Freeduino is running MUCH faster... I have not yet gotten times on the both of them... but it is very discernible.
The way data is updated and transferred to the SSD1306 is via a complete rewrite of the screen buffer... from a char array maintained and updated by the C program.
Any one have any ideas ? I would really like to get the graphics running quicker using the propeller.
Thanks.... TJ
I have a 0.96 " 128x96 pixel single color OLED with an SSD1306 chip... attached via I2C... I have ported the Adafruit libraries over to SimpleIDE.
Here are the 2 platforms being compared.... both running pretty much the same C code and using I2C.
Prop Prof Dev board... Prop1 with a 6.25 MHz Crystal.... running at 100 MHz with PLL16x
Freeduino with ATmega328u4 and 16 MHz crystal
the Freeduino is running MUCH faster... I have not yet gotten times on the both of them... but it is very discernible.
The way data is updated and transferred to the SSD1306 is via a complete rewrite of the screen buffer... from a char array maintained and updated by the C program.
Any one have any ideas ? I would really like to get the graphics running quicker using the propeller.
Thanks.... TJ
Comments
While C is faster than Spin, in order to get real speed from the Propeller you need to use a PASM driver for the low level I2C communication.
I've used the SSD1306 with an fast PASM SPI driver but I haven't adapted the driver to I2C.
My version of the OLED code (with an even faster SPI driver than the OBEX version) is attached to the following post.
http://forums.parallax.com/showthread.php/157136-Interesting-little-4-digit-LCD-TINY-display!?p=1290092&viewfull=1#post1290092
There are PASM versions of I2C drivers and I think it's possible to combine PASM with C but I don't know how to do this.
C code compiled to LMM is probaly executing it's "instructions" at a quarter of that, 6.26MHz.
That may be comparable to the Freedino execution rate.
Anyway, we need more info. What is the actual speed difference. And ultimately show us the code.
Without seeing exactly what you are doing nobody can suggest any optimizations.
The link above is just API documentation. See here for original libpropeller source code.