GPIO pulse in nanoseconds
Posted: Wed Nov 21, 2018 3:38 pm
Hey,
I try to interact with a TLC5940 via C. I use Rapsbian as OS and I am not sure how I can realize something like
pulse(int nanoseconds){
setPinOutHigh
sleep(nanoseconds)
setPinOutLow
sleep(nanoseconds)
}
The timing diagram requires for example a period of at least 3ns for some signals. So is nanosleep() the way to go, even if it may take länger. Or is there a more consistent way to interact with so precise Timing?
I try to interact with a TLC5940 via C. I use Rapsbian as OS and I am not sure how I can realize something like
pulse(int nanoseconds){
setPinOutHigh
sleep(nanoseconds)
setPinOutLow
sleep(nanoseconds)
}
The timing diagram requires for example a period of at least 3ns for some signals. So is nanosleep() the way to go, even if it may take länger. Or is there a more consistent way to interact with so precise Timing?