hi.
I am new to Pi. What I want to do is making a delay function of 50ns in python or C. I have not written a single code for in python till now.
Please tell me if its possible or not.Should I over-clock the Pi to get that delay?
hi.
I am new to Pi. What I want to do is making a delay function of 50ns in python or C. I have not written a single code for in python till now.
Please tell me if its possible or not.Should I over-clock the Pi to get that delay?
Hi folks.
Many of you guys are still confused with my specification. So Here are they in detail:-
I am trying to make a screen of resolution 180X100.
So total number of leds = 18000
At maximum brightness each led can consume 50mA of current.
Maximum current consumption = 18000x0.05 = 900A
Maximum power consumption = 18000x0.05x5 = 4.5KW
the screen size would be 3m by 1.33m.
Strips (of length 3m) are connected horizontally in series. Power as well as the signal would also be carried horizontally.
The data of pixel values to be written on screen would be provided serially from another system.
And that is where the problem in my system lies.
I have a total of 18000 leds. 3 bytes are required for each pixel. One frame requires a data of 54Kb. The refresh rate that would properly stream a video, is 25Hz.
So on serial communication I would require a speed of 1.35Mbps. Maximum speed with any serial comm is 115200 i.e. 14.0625Kbps.
Previously I tried with Teensy3.1 and arduino Mega. Both have the above limitation.
That is the reason that I want to switch these boards with Pi.
Following is a site were I found something related to "How to patch linux kernel with rt kernel?"
https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO
Let me know would it work with Pi or not.
Hi folks.
Many of you guys are still confused with my specification. So Here are they in detail:-
I am trying to make a screen of resolution 180X100.
So total number of leds = 18000
At maximum brightness each led can consume 50mA of current.
Maximum current consumption = 18000x0.05 = 900A
Maximum power consumption = 18000x0.05x5 = 4.5KW
the screen size would be 3m by 1.33m.
Strips (of length 3m) are connected horizontally in series. Power as well as the signal would also be carried horizontally.
The data of pixel values to be written on screen would be provided serially from another system.
And that is where the problem in my system lies.
I have a total of 18000 leds. 3 bytes are required for each pixel. One frame requires a data of 54Kb. The refresh rate that would properly stream a video, is 25Hz.
So on serial communication I would require a speed of 1.35Mbps. Maximum speed with any serial comm is 115200 i.e. 14.0625Kbps.
Previously I tried with Teensy3.1 and arduino Mega. Both have the above limitation.
That is the reason that I want to switch these boards with Pi.
Following is a site were I found something related to "How to patch linux kernel with rt kernel?"
https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO
Let me know would it work with Pi or not.
@John Alexander: I did not misunderstand the 50ns versus 50us. I tried to make clear that asking for 50us (1000 times longer than in the question) will already give you wildly inaccurate results.
There are now two threads about this. Confusing! On another forum I frequent the moderators would close one thread and point everybody to the other thread.
[When people ignore enough advice given: I switch to "answering the questions" mode. As opposed to "trying to help".]
Let me know would it work with Pi or not.
Yes. It will work with pi. Not with /your/ raspberry pi though.
To write 1 to led strip you have to set data in high for 800ns and then low for 450ns.
To write 0 to led strip you have to set data in high for 400ns and then low for 850ns.
As you can see both values are in steps of 50ns. So if I am able to generate delay function in multiples of 50ns, then
if(data_write == '1')
{
pin = HIGH;
delaynano(800);
pin = low;
delaynano(450);
}
if(data_write == '0')
{
pin = HIGH;
delaynano(400);
pin = low;
delaynano(850);
}
This would be much more simple.
I would write:
pin = HIGH
delay_nano (400);
if (data) {delay_nano (400);pin = LOW;}
else {pin = LOW;delay_nano (400);}
delay_nano (400);
However, this way your CPU will be 100% busy during the sending of the data. There is no way you can handle more than one chain at a time. Any interrupt will corrupt one or more bits. As I said, this is in no way going to help you finish your project.
You are setting your goals too far. "I want to build a rocket and go to the moon" is a project they achieve in comic books or in movies. Not in real life.
For /you/ a nice project is to make fancy patterns on five of these led strips in series. Then 6*3=18 strips in series. (that's 1/16th of your big screen!)
If you want you can see that as "necessary steps towards the big display".