Great job guys on the netduino though! Using Visual C# is next to heaven, too bad there is just too much over head.
- Netduino Forums
- → Bamboosam's Content
Bamboosam's Content
There have been 7 items by Bamboosam (Search limited from 28-September 23)
#43821 Any chance of being able to speed up SPI - NP2?
Posted by Bamboosam on 20 January 2013 - 08:34 PM in Netduino Plus 2 (and Netduino Plus 1)
#43824 Any chance of being able to speed up SPI - NP2?
Posted by Bamboosam on 20 January 2013 - 08:53 PM in Netduino Plus 2 (and Netduino Plus 1)
Ok, Ill try that. Thank you
#43820 Any chance of being able to speed up SPI - NP2?
Posted by Bamboosam on 20 January 2013 - 08:30 PM in Netduino Plus 2 (and Netduino Plus 1)
ok, I thought it had to do with SPI, I was hoping the NP2 @ 168mHz even though using .Net would be considerably faster than an Atmega @ 16mHz. Bummer
#43817 Any chance of being able to speed up SPI - NP2?
Posted by Bamboosam on 20 January 2013 - 08:16 PM in Netduino Plus 2 (and Netduino Plus 1)
The code is very simple right now, and I created the exact pattern on my arduino and it is noticeably slower on the NP2. I've pretty much maxed out my last project using an Atmega 1284p @ 16mHz, so I am in the jump to a better processor to achieve more complex patterns.
public static void LightStripSpi()
{
int i = 0;
var spi = new SPI(new SPI.Configuration(Cpu.Pin.GPIO_NONE,
false, 0, 0, false, true, 2000, SPI.SPI_module.SPI1));
var colors = new byte[3 * 94];
var zeros = new byte[3 * ((32 + 63) / 64)];
byte r = 0;
byte g = 0;
byte b = 0;
byte spin = 0;
while (true)
{
// all pixels off
for (int ix = 0; ix < colors.Length; ++ix) colors[ix] = (byte)(0x80 | 0);
switch (i)
{
case 0: r = 127; b = 0; g = 0; break;
case 1: r = 0; b = 127; g = 0; break;
case 2: r = 0; b = 0; g = 127; break;
case 3: r = 127; b = 0; g = 127; break;
case 4: r = 0; b = 127; g = 127; break;
case 5: r = 127; b = 127; g = 0; break;
case 6: r = 127; b = 127; g = 127; break;
}
for (byte o = 0; o < 94; o+=47){
for (byte e = 0; e < 4; e++)
{
colors[(((o + e + spin) % 94) * 3) + 0] = (byte)(0x80 | r); //blue
colors[(((o + e + spin) % 94) * 3) + 1] = (byte)(0x80 | g); //red
colors[(((o + e + spin) % 94) * 3) + 2] = (byte)(0x80 | ; //green
colors[(((93 - (o + e + spin) % 94)) * 3) + 0] = (byte)(0x80 | r); //blue
colors[(((93 - (o + e + spin) % 94)) * 3) + 1] = (byte)(0x80 | g); //red
colors[(((93 - (o + e + spin) % 94)) * 3) + 2] = (byte)(0x80 | ; //green
}
}
spi.Write(colors);
spi.Write(zeros);
i++;
i %= 7;
spin++; spin %= 94;
}
}
#43812 Any chance of being able to speed up SPI - NP2?
Posted by Bamboosam on 20 January 2013 - 07:38 PM in Netduino Plus 2 (and Netduino Plus 1)
I've noticed my lpd8806 strips running significantly slower than on an arduino. So the max SPI clock rate is 2000 kHz, is there any way I can speed that up?
#43612 Is it possible to create a windows forms application that will program the Ne...
Posted by Bamboosam on 17 January 2013 - 04:52 PM in Netduino Plus 2 (and Netduino Plus 1)
Great, thanks guys. Dave: That is a great idea! I didn't realize that is possible. Does the ND+2 run slower doing it that way?
#43546 Is it possible to create a windows forms application that will program the Ne...
Posted by Bamboosam on 16 January 2013 - 06:45 PM in Netduino Plus 2 (and Netduino Plus 1)
Is it possible to create a windows forms application that will program the Netduino Plus 2? If so how difficult of a task will it be? I want to be able to update the program on the netduino plus 2 and be able to upload the new program using a windows forms application, separate from Visual Studio.
- Netduino Forums
- → Bamboosam's Content
- Privacy Policy