Colorado
Offline
Edison Member
Karma: 39
Posts: 1204
Reviving dead brain cells with Arduinos.
|
 |
« on: January 11, 2013, 11:48:10 pm » |
I use my SPI pins to control LED strings which don't have a slave select. They simply take DATA and SCK to work. But when uploading new code through a programmer connected to the same SPI pins, it sends the LED string into a psychedelic rainbow of colors. After all, it's an SPI signal, and the LED string is interpreting it as well. So my question is, is there a way to isolate whatever is connected to the SPI bus from getting affected by the programmer as it's uploading code?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 4
Posts: 187
|
 |
« Reply #1 on: January 12, 2013, 12:23:55 am » |
So my question is, is there a way to isolate whatever is connected to the SPI bus from getting affected by the programmer as it's uploading code?
Yes, by dip switch/any manual switch.
Which LED strings you are using?
|
|
|
|
|
Logged
|
From Idea To Invention
|
|
|
|
Colorado
Offline
Edison Member
Karma: 39
Posts: 1204
Reviving dead brain cells with Arduinos.
|
 |
« Reply #2 on: January 12, 2013, 12:26:47 am » |
Yeah, that's kinda hard to do in an enclosure. They're regular WS2801 strings. All they use is DATA and SCK (and VCC/GND)
|
|
|
|
|
Logged
|
|
|
|
|
|
|
Colorado
Offline
Edison Member
Karma: 39
Posts: 1204
Reviving dead brain cells with Arduinos.
|
 |
« Reply #4 on: January 12, 2013, 12:36:11 am » |
That won't work in an enclosure where I need to open the thing and pull the guts out just to pull the shield off to reprogram, etc., etc. Uh, no. So basically this tells me there is no easy way to do this, electronically at least, without physically handling the hardware. Thanks. I'll figure something else out.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 4
Posts: 187
|
 |
« Reply #5 on: January 12, 2013, 12:37:45 am » |
>>that's kinda hard to do in an enclosure.
Add a transistor between VCC and power source. Turn the transistor in Saturation through software but in that case one PIN resource need.
|
|
|
|
|
Logged
|
From Idea To Invention
|
|
|
|
Offline
Full Member
Karma: 4
Posts: 187
|
 |
« Reply #6 on: January 12, 2013, 12:41:50 am » |
One more thing calculate all values of resistors RB RE RC etc for switching according to your case. 
|
|
|
|
|
Logged
|
From Idea To Invention
|
|
|
|
Colorado
Offline
Edison Member
Karma: 39
Posts: 1204
Reviving dead brain cells with Arduinos.
|
 |
« Reply #7 on: January 12, 2013, 12:45:29 am » |
No need, the strips come prebuilt with everything on them. Just connect SPI lines. I'll try a transistor or FET to cut VCC from the strips.
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15309
Measurement changes behavior
|
 |
« Reply #8 on: January 12, 2013, 12:45:32 am » |
One more thing calculate all values of resistors RB RE RC etc for switching according to your case.  You intentions and idea my be good, but without a schematic drawing of what you are trying to say, it probably won't get much chance at being implemented. Lefty
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 4
Posts: 187
|
 |
« Reply #9 on: January 12, 2013, 12:58:24 am » |
I don't know how to add picture here but i attach a schematic. If we can turn on and off the motor then we can also do that. If there is some thing wrong please let me know.
|
|
|
|
« Last Edit: January 12, 2013, 01:14:31 am by Cybernetician »
|
Logged
|
From Idea To Invention
|
|
|
|
Colorado
Offline
Edison Member
Karma: 39
Posts: 1204
Reviving dead brain cells with Arduinos.
|
 |
« Reply #10 on: January 12, 2013, 01:14:09 am » |
Oh, THOSE resistors. Yeah I get what you're saying. I need to figure out how to calculate those to begin with. It's just switching 5V ...
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13896
Lua rocks!
|
 |
« Reply #11 on: January 12, 2013, 02:03:01 am » |
|
|
|
|
|
Logged
|
|
|
|
|
Colorado
Offline
Edison Member
Karma: 39
Posts: 1204
Reviving dead brain cells with Arduinos.
|
 |
« Reply #12 on: January 12, 2013, 02:18:14 am » |
Yes I could do that, except the library ( FastSPI) used to drive them uses the native SPI port. And I have no idea how to hack it to use a different port.
|
|
|
|
|
Logged
|
|
|
|
|
|