virtualdave
Well-known member
Hi all,
Need some pointers, or at least an acknowledgment that what I'm trying to do isn't possible.
I'm currently developing this on the t2 to make sure everything works as expected before I port everything to the t3 (or perhaps everything works swimmingly on the t2 and won't need to port to the t3...tbd!)
my set-up:
1. I have two teensy 2's talking to each other wirelessly via the lovely nRF24L01 nordic radios using the rf24 library (i.e. https://github.com/maniacbug/RF24). Communication is working great. In particular I have button presses on one teensy turning on LEDs on the other (LEDs attached to few open digital pins on the teensy)
2. On the teensy with the LEDs I've also have a tlc5940 IC. This also works fine by itself (i.e. no radio), controlling 48 sets of LEDs independently. I'm using the "teensy modified" tlc5940 library for this (http://www.pjrc.com/teensy/td_libs_Tlc5940.htm)
my problem:
both the nordic radios and the tlc5940 communicate via SPI. I'm not that familiar with SPI communication, and so I am a lemming and just connect everything up the way the libraries tell me to. That means pins 1 (SCK on both), 2 (MOSI on the nordic/SIN on the tlc5940), and 9 (CE on nordic/GSCLK on the 5940) are shared between the libraries and therefore the radios and tlc5940 share those pins. Hoping that all would work fine I went ahead and physically connected everything and loaded both libraries and code and unfortunately I get random flashes from the LEDs attached to the tlc5940, and no sign that messages sent to the radio on the same board actually do what they are suppose to. I didn't expect it to work, but thought I would try.
questions:
is there a way to get both the radio and tlc5940 to play nicely on the same SPI bus on the t2?
is this something that the t3 can handle given that it might handle more than one spi bus?
If anyone has any pointers on where I can look for more information, even related to how the arduino library handles SPI, would be greatly appreciated.
Thanks in advance!
David
P. S. my problem seems somewhat related to this which I've been following closely:
http://forum.pjrc.com/threads/123-Need-help-with-Teensy3-uSD-WS2801-LED-strips-SPI-problem
Need some pointers, or at least an acknowledgment that what I'm trying to do isn't possible.
I'm currently developing this on the t2 to make sure everything works as expected before I port everything to the t3 (or perhaps everything works swimmingly on the t2 and won't need to port to the t3...tbd!)
my set-up:
1. I have two teensy 2's talking to each other wirelessly via the lovely nRF24L01 nordic radios using the rf24 library (i.e. https://github.com/maniacbug/RF24). Communication is working great. In particular I have button presses on one teensy turning on LEDs on the other (LEDs attached to few open digital pins on the teensy)
2. On the teensy with the LEDs I've also have a tlc5940 IC. This also works fine by itself (i.e. no radio), controlling 48 sets of LEDs independently. I'm using the "teensy modified" tlc5940 library for this (http://www.pjrc.com/teensy/td_libs_Tlc5940.htm)
my problem:
both the nordic radios and the tlc5940 communicate via SPI. I'm not that familiar with SPI communication, and so I am a lemming and just connect everything up the way the libraries tell me to. That means pins 1 (SCK on both), 2 (MOSI on the nordic/SIN on the tlc5940), and 9 (CE on nordic/GSCLK on the 5940) are shared between the libraries and therefore the radios and tlc5940 share those pins. Hoping that all would work fine I went ahead and physically connected everything and loaded both libraries and code and unfortunately I get random flashes from the LEDs attached to the tlc5940, and no sign that messages sent to the radio on the same board actually do what they are suppose to. I didn't expect it to work, but thought I would try.
questions:
is there a way to get both the radio and tlc5940 to play nicely on the same SPI bus on the t2?
is this something that the t3 can handle given that it might handle more than one spi bus?
If anyone has any pointers on where I can look for more information, even related to how the arduino library handles SPI, would be greatly appreciated.
Thanks in advance!
David
P. S. my problem seems somewhat related to this which I've been following closely:
http://forum.pjrc.com/threads/123-Need-help-with-Teensy3-uSD-WS2801-LED-strips-SPI-problem