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?
On not-RT kernels that kind of delay functions are hardly that accurate.
Is easier to get that timing on an Atmega or any other 8 bits IC than in interpreted language on a full fledged OS running a non RT kernel.
The reason is easy, in the Atmega you have every clock cycle at your disposal to make whatever signal you need. The limits are on the clock source and you have to be sure how many clock cycles your instructions needs.
On a full fledged OS interrupts from other processes / hardware can delay your signal so you wont get an accurate delay function.
You can also, disable most hardware, build a RT kernel, and make a kernel module to try to get close to that accuracy, but I would settle for an external IC doing just that signal for you and communicate with that IC via I2C /TWI or other means to drive it from your raspberry.
I would even think on getting an Arm Cortex M0 like the ATSAM D20 to drive it at 54Mhz to have a little more flexibility, or a Teensy board with an MK20 Cortex M4 that runs at 72Mhz.
On not-RT kernels that kind of delay functions are hardly that accurate.
Is easier to get that timing on an Atmega or any other 8 bits IC than in interpreted language on a full fledged OS running a non RT kernel.
The reason is easy, in the Atmega you have every clock cycle at your disposal to make whatever signal you need. The limits are on the clock source and you have to be sure how many clock cycles your instructions needs.
On a full fledged OS interrupts from other processes / hardware can delay your signal so you wont get an accurate delay function.
You can also, disable most hardware, build a RT kernel, and make a kernel module to try to get close to that accuracy, but I would settle for an external IC doing just that signal for you and communicate with that IC via I2C /TWI or other means to drive it from your raspberry.
I would even think on getting an Arm Cortex M0 like the ATSAM D20 to drive it at 54Mhz to have a little more flexibility, or a Teensy board with an MK20 Cortex M4 that runs at 72Mhz.